Permalink
Browse files

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.
  • Loading branch information...
mdounin committed Feb 10, 2017
1 parent b9a0316 commit 5544756296e5abaecb5f640753d6de939b701035
Showing with 3 additions and 3 deletions.
  1. +3 −3 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 {

0 comments on commit 5544756

Please sign in to comment.