# HG changeset patch
# User Sangdeuk Kwon <sangdeuk.kwon(a)quantil.com>
# Date 1596515879 -32400
# Tue Aug 04 13:37:59 2020 +0900
# Node ID 6ed0cfe89f288587b6815333bab798d6aedc6137
# Parent da8d758aabebbba833405463aa5a785b4c324495
slice and gzip problem
When slice is enabled, client request content with "Accept-Encoding: gzip"
and "Range: bytes=2048-3071",
nginx serves only partial gzipped content with "200 OK" instead of "206
This response is wrong because nginx reply "200 OK" even if it serves only
Client thinks he receives whole content because of "200 OK".
ngx_http_gzip_filter_module is higher priority than
gzip_filter_module remove slice_filter_module's info when gzip is invoked.
So, nginx reply "200 OK" with gzipped whole content.
But, what if user request has "Range" header (only one slice case),
nginx can't access the previous slice of user request's.
It means nginx can't serve correct content if gzip_filter_module remove
nginx can serve correct content with "206 Partial Content" without gzip
because nginx can't access whole content.
If user reuqest has "Range" header (only one slice case), gzip_filter
should be disabled instead of slice_filter.
diff -r da8d758aabeb -r 6ed0cfe89f28
--- a/src/http/modules/ngx_http_gzip_filter_module.c Mon Jul 27 16:02:15
+++ b/src/http/modules/ngx_http_gzip_filter_module.c Tue Aug 04 13:37:59
@@ -233,6 +233,8 @@
|| (r->headers_out.content_length_n != -1
&& r->headers_out.content_length_n < conf->min_length)
+ || (r->allow_ranges && r == r->main
+ && r->headers_out.content_offset > 0)
|| ngx_http_test_content_type(r, &conf->types) == NULL
Quic connection can be migrated by the ID. And nginx-quic load balancing by reuseport, which using a hash based on 4-tuple of the connection.
How to migrate quic connection when reload/restart?
We can change reuseport behavior by bpf which using a hash based on the quic ID, but it seems useless, because listen processes/pids doubles when nginx reload/restart, and hash result would change