Opened 9 years ago
Last modified 7 years ago
#772 assigned defect
No Vary header on 304 Response.
Reported by: | uudruid74.startssl.com | Owned by: | Maxim Dounin |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | nginx-core | Version: | 1.9.x |
Keywords: | Vary | Cc: | |
uname -a: | Linux navi 2.6.32-042stab108.2 #1 SMP Fri Jun 19 19:47:59 2015 x86_64 Intel(R) Xeon(R) CPU X5670 @ 2.93GHz GenuineIntel GNU/Linux | ||
nginx -V: |
Tengine version: Tengine/2.1.0 (nginx/1.6.2)
TLS SNI support enabled |
Description
Yes, I know its Tengine, but I'm betting this will be in Nginx 1.6.2 as well, as its better to fix it "upstream" so that everyone gets it fixed. Tested this via RedBot.org.
Here, everything is working on regular 200 Response
HTTP/1.1 200 OK
Server: Tengine
Date: Sun, 05 Jul 2015 06:45:18 GMT
Content-Type: text/html; charset=UTF-8
Last-Modified: Sun, 05 Jul 2015 03:15:13 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Vary: Accept-Encoding
Expires: Sun, 12 Jul 2015 06:45:18 GMT
Cache-Control: max-age=604800
Strict-Transport-Security: max-age=63072000; includeSubdomains; preload
X-Content-Type-Options: nosniff
Content-Encoding: gzip
Now, the Vary header is gone (and I'm pretty sure it should be there for this response)
HTTP/1.1 304 Not Modified
Server: Tengine
Date: Sun, 05 Jul 2015 06:45:18 GMT
Last-Modified: Sun, 05 Jul 2015 03:15:13 GMT
Connection: keep-alive
ETag: "5598a141-5eb"
Expires: Sun, 12 Jul 2015 06:45:18 GMT
Cache-Control: max-age=604800
Strict-Transport-Security: max-age=63072000; includeSubdomains; preload
X-Content-Type-Options: nosniff
Change History (3)
comment:1 by , 9 years ago
comment:2 by , 8 years ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:3 by , 7 years ago
Testing nginx static from https://redbot.org result:
HTTP requires 304 Not Modified responses to have certain headers, if they are also present in a normal (e.g., 200 OK response). The 304 response is missing the following headers: vary. This can affect cache operation; because the headers are missing, caches might remove them from their cached copies.
While presence of the Vary header is not required by RFC2616, looks like it's not mandatory with RFC7232. The following patch should fix this: