summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMaxim Dounin <mdounin@mdounin.ru>2017-02-10 17:49:19 +0300
committerMaxim Dounin <mdounin@mdounin.ru>2017-02-10 17:49:19 +0300
commit5544756296e5abaecb5f640753d6de939b701035 (patch)
tree14ba903845ab24627a6432d73c562f4ac4a22102
parentb9a031622b7bf586a9c724dade16abfac188f2f2 (diff)
downloadnginx-5544756296e5abaecb5f640753d6de939b701035.tar.gz
nginx-5544756296e5abaecb5f640753d6de939b701035.tar.bz2
Cache: increased cache header Vary and ETag lengths to 128.
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.
-rw-r--r--src/http/ngx_http_cache.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/http/ngx_http_cache.h b/src/http/ngx_http_cache.h
index 5b135e209..f9e966409 100644
--- a/src/http/ngx_http_cache.h
+++ b/src/http/ngx_http_cache.h
@@ -24,10 +24,10 @@
#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 {