]> git.kaiwu.me - nginx.git/commitdiff
Cache: increased cache header Vary and ETag lengths to 128.
authorMaxim Dounin <mdounin@mdounin.ru>
Fri, 10 Feb 2017 14:49:19 +0000 (17:49 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Fri, 10 Feb 2017 14:49:19 +0000 (17:49 +0300)
This allows to store larger ETag values for proxy_cache_revalidate,
including ones generated as SHA256, and cache responses with longer
Vary (ticket #826).

In particular, this fixes caching of Amazon S3 responses with CORS
enabled, which now use "Vary: Origin, Access-Control-Request-Headers,
Access-Control-Request-Method".

Cache version bumped accordingly.

src/http/ngx_http_cache.h

index 5b135e209fb402208ec6c829af1251621a232d84..f9e96640998c62a6b4a02f1249df8b73f271b234 100644 (file)
 #define NGX_HTTP_CACHE_SCARCE        8
 
 #define NGX_HTTP_CACHE_KEY_LEN       16
-#define NGX_HTTP_CACHE_ETAG_LEN      42
-#define NGX_HTTP_CACHE_VARY_LEN      42
+#define NGX_HTTP_CACHE_ETAG_LEN      128
+#define NGX_HTTP_CACHE_VARY_LEN      128
 
-#define NGX_HTTP_CACHE_VERSION       4
+#define NGX_HTTP_CACHE_VERSION       5
 
 
 typedef struct {