<div dir="ltr"><div>Коллеги, подскажите почему nginx может иногда отдавать 200 OK и 0 байт в ответе,</div><div>случается для HIT, MISS, EXPIRED</div><br clear="all"><div><div>du -mk /var/lib/nginx/cache/x/d/07/9933b0653bece6387a95b7ad7d15007d</div><div>388 /var/lib/nginx/cache/x/d/07/9933b0653bece6387a95b7ad7d15007d</div><div><br></div><div>head -n 10 /var/lib/nginx/cache/x/d/07/9933b0653bece6387a95b7ad7d15007d<br></div><div>D V0 V4 Va "33fcea30-60630"</div><div>KEY: <a href="http://x/hls/480p/1459415596925.ts">http://x/hls/480p/1459415596925.ts</a></div><div>HTTP/1.1 200 OK</div><div>Server: nginx/1.8.0</div><div>Date: Thu, 31 Mar 2016 09:13:24 GMT</div><div>Content-Type: video/mp2t</div><div>Content-Length: 394800</div><div>Connection: close</div><div>Last-Modified: Thu, 31 Mar 2016 09:13:20 GMT</div><div>ETag: "33fcea30-60630"</div><div><br></div><div>2.61.162.132 - - [31/Mar/2016:09:13:37 +0000] "GET /hls/480p/1459415596925.ts HTTP/1.1" 200 0 "x" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586" "-" 0.000 - - - HIT 394800</div></div><div><br></div><div>где <span class="">log_format</span><span class=""> combined_extra </span><span class="">'</span><span class="">$remote_addr</span><span class=""> - </span><span class="">$remote_user</span><span class=""> [</span><span class="">$time_local</span><span class="">] '</span></div><div>
<p class=""><span class="">'"</span><span class="">$request</span><span class="">" </span><span class="">$status</span><span class=""> </span><span class="">$body_bytes_sent</span><span class=""> '</span></p>
<p class=""><span class="">'"</span><span class="">$http_referer</span><span class="">" "</span><span class="">$http_user_agent</span><span class="">" "</span><span class="">$http_x_forwarded_for</span><span class="">" </span><span class="">$request_time</span><span class=""> </span><span class="">$upstream_header_time</span><span class=""> </span><span class="">$upstream_response_time</span><span class=""> </span><span class="">$upstream_response_length</span><span class=""> </span><span class="">$upstream_cache_status</span><span class=""> </span><span class="">$upstream_http_content_length</span><span class="">'</span><span class="">;</span></p><p class="">Спасибо</p></div><div><br></div>-- <br><div class="gmail_signature">Best regards,<br>Vasil Mikhalenya</div>
</div>