<div dir="auto">But the partial data is been continuously sending back to client. Squid didn't wait for the complete file to download</div><br><div class="gmail_quote"><div dir="ltr">On Sat, 8 Sep 2018, 20:08 Amos Jeffries, <<a href="mailto:squid3@treenet.co.nz">squid3@treenet.co.nz</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 8/09/18 7:44 PM, Hariharan Sethuraman wrote:<br>
> And here is my HTTP request and reply:<br>
> 1. HEAD request to read image information<br>
> 2. GET request to download the image<br>
> <br>
<br>
Not quite. GET partial / Range request to fetch the content.<br>
<br>
Squid converted it into a full request for the backend server due to<br>
range_offset_limit -1. But that does mean Squid had to download ~240MB<br>
of data before anything starts being sent to the client.<br>
<br>
<br>
<br>
> (2)<br>
> 2018/09/08 07:28:39.155| 11,2| client_side.cc(1278) parseHttpRequest:<br>
> HTTP Client REQUEST:<br>
> ---------<br>
> GET /DcKbz9kqMQXK-zp95pv9LH11kjhTpxOJsJ-1FYEL4<br>
> Host: <a href="http://example.com:3129" rel="noreferrer noreferrer" target="_blank">example.com:3129</a> <<a href="http://example.com:3129" rel="noreferrer noreferrer" target="_blank">http://example.com:3129</a>>^M<br>
> Range: bytes=242819145-^M<br>
> User-Agent: curl/7.56.1^M<br>
> Accept: */*^M<br>
> <br>
<br>
<br>
> 2018/09/08 07:28:39.938| 11,2| http.cc(2261) sendRequest: HTTP Server<br>
> REQUEST:<br>
> ---------<br>
> GET /DcKbz9kqMQXK-zp95pv9LH11kjhTpxOJsJ-1FYEL4<br>
> User-Agent: curl/7.56.1^M<br>
> Accept: */*^M<br>
> Host: <a href="http://exampletarget.com" rel="noreferrer noreferrer" target="_blank">exampletarget.com</a> <<a href="http://exampletarget.com" rel="noreferrer noreferrer" target="_blank">http://exampletarget.com</a>>^M<br>
> Via: 1.1 jb7mgd (squid/4.2)^M<br>
> Surrogate-Capability: jb7mgd="Surrogate/1.0"^M<br>
> X-Forwarded-For: **.**.**.**^M<br>
> Cache-Control: max-age=0^M<br>
> Connection: keep-alive^M<br>
> <br>
> 2018/09/08 07:28:44.359| 11,2| http.cc(723) processReplyHeader: HTTP<br>
> Server RESPONSE:<br>
> ---------<br>
> HTTP/1.1 200 OK<br>
> Date: Sat, 08 Sep 2018 07:28:40 GMT^M<br>
> Server: Apache/2.2^M<br>
> Content-Disposition: attachment; filename=somefile.iso;^M<br>
> Last-Modified: Fri, 20 Jul 2018 18:23:10 GMT^M<br>
> ETag: "4a54c59-11653800-571726350bf80"^M<br>
> Accept-Ranges: bytes^M<br>
> Content-Length: 291846144^M<br>
> Keep-Alive: timeout=5, max=100^M<br>
> Connection: Keep-Alive^M<br>
> Content-Type: application/unknown^M<br>
> <br>
> 2018/09/08 07:28:44.361| 11,2| Stream.cc(267) sendStartOfMessage: HTTP<br>
> Client REPLY:<br>
> ---------<br>
> HTTP/1.1 206 Partial Content^M<br>
> Date: Sat, 08 Sep 2018 07:28:40 GMT^M<br>
> Server: Apache/2.2^M<br>
> Content-Disposition: attachment; filename=somefile.iso;^M<br>
> Last-Modified: Fri, 20 Jul 2018 18:23:10 GMT^M<br>
> ETag: "4a54c59-11653800-571726350bf80"^M<br>
> Accept-Ranges: bytes^M<br>
> Content-Type: application/unknown^M<br>
> X-Cache: MISS from jb7mgd^M<br>
> X-Cache-Lookup: MISS from jb7mgd:3128^M<br>
> Via: 1.1 jb7mgd (squid/4.2)^M<br>
> Connection: keep-alive^M<br>
> Content-Range: bytes 242819145-291846143/291846144^M<br>
> Content-Length: 49026999^M<br>
> <br>
> Thanks,<br>
> Hari<br>
> <br>
> On Sat, Sep 8, 2018 at 9:48 AM Hariharan Sethuraman wrote:<br>
> <br>
> Hi Amos,<br>
> <br>
> This is what I see when the download is in progress:<br>
> <br>
> KEY 44000000000000000902000000000000<br>
> STORE_PENDING NOT_IN_MEMORY SWAPOUT_NONE PING_DONE<br>
> RELEASE_REQUEST,DISPATCHED,PRIVATE,VALIDATED<br>
<br>
So file stored in memory and scheduled for removal.<br>
<br>
> LV:1536379799 LU:1536379801 LM:1532110990 EX:-1<br>
> 4 locks, 1 clients, 1 refs<br>
> Swap Dir -1, File 0XFFFFFFFF<br>
> GET<br>
> <a href="https://example.com/DhAskLOUpvRG2oeR_f_FxYTyLVHIN5esRF-LXOUKwkwyT0TOf6xO-AUm3KaM" rel="noreferrer noreferrer" target="_blank">https://example.com/DhAskLOUpvRG2oeR_f_FxYTyLVHIN5esRF-LXOUKwkwyT0TOf6xO-AUm3KaM</a><br>
> inmem_lo: 99225582<br>
> inmem_hi: 99324372<br>
> swapout: 0 bytes queued<br>
> <br>
<br>
Amos<br>
<br>
</blockquote></div>