﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	uname	nginx_version
1840	Request different accept-encoding types, caching out multiple files. What is the reason?	yunoasgit@…		"
Request different accept-encoding types, caching out multiple files. What is the reason?
If only one type, one cached file
The request is settled. Thank you.



nginx version: nginx/1.16.0
conf:
--------------------------------------------------------------------
        proxy_cache_path /cache/www_cache levels=1:2 keys_zone=www_cache:500m inactive=7d max_size=1000m;
                location ~ .*\.(xml|htm|html|css|js)(.*) {
                        proxy_pass http://www.xxxxxx.com;
                        proxy_redirect off;
                        proxy_set_header Host $host;
                        proxy_set_header   Connection """";
                        proxy_set_header Accept-Encoding '';
                        proxy_http_version 1.1;
                        client_body_buffer_size 128k;
                        proxy_connect_timeout 60;
                        proxy_send_timeout 60;
                        proxy_read_timeout 60;
                        proxy_buffer_size 32k;
                        proxy_buffers 4 32k;
                        proxy_busy_buffers_size 64k;
                        proxy_temp_file_write_size 64k;
                        proxy_cache www_cache;
                        proxy_cache_valid 200 302 30m;
                        proxy_cache_valid 301 30m;
                        proxy_cache_valid any 1m;
                        proxy_cache_key $host$uri$is_args$args;
                }
--------------------------------------------------------------------
test run
#1
curl -o /dev/null ""http://www.xxxxxx.com/common/js/jquery.min.js"" -H ""User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36"" -x 10.1.186.72:80
#2
curl -o /dev/null 'http://www.xxxxxx.com/common/js/jquery.min.js' -H 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36' -H 'accept-encoding: gzip, deflate, br' -x 10.1.186.72:80
#3
curl -o /dev/null 'http://www.xxxxxx.com/common/js/jquery.min.js' -H 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36' -H 'accept-encoding: gzip, deflate' -x 10.1.186.72:80
#4
curl -o /dev/null 'http://www.xxxxxx.com/common/js/jquery.min.js' -H 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36' -H 'accept-encoding: gzip' -x 10.1.186.72:80
#5
curl -o /dev/null 'http://www.xxxxxx.com/common/js/jquery.min.js' -H 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36' -H 'accept-encoding: deflate, gzip' -x 10.1.186.72:80
#6
curl -o /dev/null 'http://www.xxxxxx.com/common/js/jquery.min.js' -H 'User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36' -H 'accept-encoding: deflate, gzip, br ' -x 10.1.186.72:80
--------------------------------------------------------------------
Six different file list,
The content is the same, accept-encoding is different

./6/06/6ba389ade4e2d55d4e66fbb8d99e5066
./0/70/8df2f99ae842a8d7f5d5192da6e39700
./e/dd/2db0e8eef68e05aaa0b9fbb01a7dbdde
./d/09/b829dd1da559e3c80aeaabf58374c09d
./a/c3/547655366b88299921b477dbeeffdc3a
./a/72/61a3eac721aa5d15a14b64630d89172a

Six different file list
--------------------------------------------------------------------
# head -15 ./a/72/61a3eac721aa5d15a14b64630d89172a
H?]?m\8?d]?y|?""5c6d04a1-169d9""Accept-Encoding??
                                                     08
KEY: www.xxxxxx.com/common/js/jquery.min.js
HTTP/1.1 200 OK
Server: openresty
Date: Tue, 27 Aug 2019 05:14:32 GMT
Content-Type: application/javascript; charset=utf-8
Content-Length: 92633
Last-Modified: Wed, 20 Feb 2019 07:41:21 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: ""5c6d04a1-169d9""
Expires: Tue, 27 Aug 2019 06:14:32 GMT
Cache-Control: max-age=3600
Accept-Ranges: bytes

# head -15 ./a/c3/547655366b88299921b477dbeeffdc3a
m?]?m\]?d]?y|?""5c6d04a1-169d9""Accept-EncodingTvU6k)!′w???
KEY: www.xxxxxx.com/common/js/jquery.min.js
HTTP/1.1 200 OK
Server: openresty
Date: Tue, 27 Aug 2019 05:19:26 GMT
Content-Type: application/javascript; charset=utf-8
Content-Length: 92633
Last-Modified: Wed, 20 Feb 2019 07:41:21 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: ""5c6d04a1-169d9""
Expires: Tue, 27 Aug 2019 06:19:26 GMT
Cache-Control: max-age=3600
Accept-Ranges: bytes

# head -16 ./d/09/b829dd1da559e3c80aeaabf58374c09d
H?]?m\8?d]?y|?""5c6d04a1-169d9""Accept-Encoding?)?￥Y
?t
KEY: www.xxxxxx.com/common/js/jquery.min.js
HTTP/1.1 200 OK
Server: openresty
Date: Tue, 27 Aug 2019 05:14:32 GMT
Content-Type: application/javascript; charset=utf-8
Content-Length: 92633
Last-Modified: Wed, 20 Feb 2019 07:41:21 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: ""5c6d04a1-169d9""
Expires: Tue, 27 Aug 2019 06:14:32 GMT
Cache-Control: max-age=3600
Accept-Ranges: bytes

# head -15 ./e/dd/2db0e8eef68e05aaa0b9fbb01a7dbdde
H?]?m\8?d]?y|?""5c6d04a1-169d9""Accept-Encoding-°鯶a?1齽
KEY: www.xxxxxx.com/common/js/jquery.min.js
HTTP/1.1 200 OK
Server: openresty
Date: Tue, 27 Aug 2019 05:14:32 GMT
Content-Type: application/javascript; charset=utf-8
Content-Length: 92633
Last-Modified: Wed, 20 Feb 2019 07:41:21 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: ""5c6d04a1-169d9""
Expires: Tue, 27 Aug 2019 06:14:32 GMT
Cache-Control: max-age=3600
Accept-Ranges: bytes

#head -15 ./0/70/8df2f99ae842a8d7f5d5192da6e39700
H?]?m\8?d]?y|?""5c6d04a1-169d9""Accept-Encoding雨B¨??-|
KEY: www.xxxxxx.com/common/js/jquery.min.js
HTTP/1.1 200 OK
Server: openresty
Date: Tue, 27 Aug 2019 05:14:32 GMT
Content-Type: application/javascript; charset=utf-8
Content-Length: 92633
Last-Modified: Wed, 20 Feb 2019 07:41:21 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: ""5c6d04a1-169d9""
Expires: Tue, 27 Aug 2019 06:14:32 GMT
Cache-Control: max-age=3600
Accept-Ranges: bytes

#head -15 ./6/06/6ba389ade4e2d55d4e66fbb8d99e5066
??]?m\/?d]?y|?""5c6d04a1-169d9""Accept-Encodingk￡-壕]Nf靐f
KEY: www.xxxxxx.com/common/js/jquery.min.js
HTTP/1.1 200 OK
Server: openresty
Date: Tue, 27 Aug 2019 05:18:39 GMT
Content-Type: application/javascript; charset=utf-8
Content-Length: 92633
Last-Modified: Wed, 20 Feb 2019 07:41:21 GMT
Connection: keep-alive
Vary: Accept-Encoding
ETag: ""5c6d04a1-169d9""
Expires: Tue, 27 Aug 2019 06:18:39 GMT
Cache-Control: max-age=3600
Accept-Ranges: bytes
--------------------------------------------------------------------
end
"	defect	closed	minor		other	1.16.x	invalid				nginx version: nginx/1.16.0
