Mercurial > hg > nginx
comparison src/http/ngx_http_upstream.c @ 6290:4d5ac1a31d44
Upstream: proxy_cache_convert_head directive.
The directive toggles conversion of HEAD to GET for cacheable proxy requests.
When disabled, $request_method must be added to cache key for consistency.
By default, HEAD is converted to GET as before.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Wed, 11 Nov 2015 15:47:30 +0300 |
parents | 257b51c37c5a |
children | a93345ee8f52 |
comparison
equal
deleted
inserted
replaced
6289:909b5b191f25 | 6290:4d5ac1a31d44 |
---|---|
762 | 762 |
763 if (rc != NGX_OK) { | 763 if (rc != NGX_OK) { |
764 return rc; | 764 return rc; |
765 } | 765 } |
766 | 766 |
767 if (r->method & NGX_HTTP_HEAD) { | 767 if ((r->method & NGX_HTTP_HEAD) && u->conf->cache_convert_head) { |
768 u->method = ngx_http_core_get_method; | 768 u->method = ngx_http_core_get_method; |
769 } | 769 } |
770 | 770 |
771 if (ngx_http_file_cache_new(r) != NGX_OK) { | 771 if (ngx_http_file_cache_new(r) != NGX_OK) { |
772 return NGX_ERROR; | 772 return NGX_ERROR; |