416 HTTP Response Issue

anish10dec nginx-forum at forum.nginx.org
Fri Jun 11 12:14:22 UTC 2021


Hi Team,

Though we have proxy cache valid defined to cache only respective response
code , nginx caching 416 response.

proxy_cache_valid  200 206  10d;
proxy_cache_key    $uri$http_range;

416 is returned from upstream server and its getting cached on Ngnix.

Even with default settings by not specifying http response behavior is
same.
proxy_cache_valid  10d;


Sample response cached on CDN for 416 Response

KEY:
/content/entry/wvdata/68/49/314af040c2c611ebad1619ca96fe25b8_2492_a.mp4bytes=12130626-12373254
HTTP/1.1 416 Requested Range Not Satisfiable^M
Server: nginx^M
Date: Tue, 01 Jun 2021 15:10:06 GMT^M
Content-Type: text/html^M
Content-Length: 190^M
Connection: close^M
Expires: Thu, 01 Jul 2021 14:10:43 GMT^M
Cache-Control: max-age=2592000^M
Access-Control-Allow-Origin: *^M
Access-Control-Allow-Methods: GET, POST, OPTIONS^M
Access-Control-Allow-Headers:
DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type^M
Content-Range: bytes */4194304^M

Posted at Nginx Forum: https://forum.nginx.org/read.php?2,291835,291835#msg-291835



More information about the nginx mailing list