Mailing List Archive

#1777: Range requests problem
#1777: Range requests problem
-----------------------+----------------------
Reporter: llavaud | Type: defect
Status: new | Priority: normal
Milestone: | Component: varnishd
Version: 4.1.0-TP1 | Severity: normal
Keywords: range |
-----------------------+----------------------
Hello,

I use Varnish 4.1.0-TP1 on debian wheezy.

I have a strange problem with range requests, i request a page of the
following size:

{{{
curl 'http://my_host/my_uri' --silent --write-out
'size_download=%{size_download}\n' --output /dev/null
size_download=32876
}}}

Now if i request the url with a range lower than the 32876 bytes (page
size), example:


{{{
curl -i -H 'Range: bytes=0-32875' http://my_host/my_uri

HTTP/1.1 206 Partial Content
Date: Fri, 14 Aug 2015 12:14:37 GMT
Set-Cookie:
eZSESSIDac08b8c73ea29869f9b619cab686aebb=efcsqrs288hr30733qs18u29t4;
expires=Sat, 15-Aug-2015 12:14:38 GMT; path=/
Set-Cookie: e1_provider=europe1; path=/; domain=.europe1.fr
Vary: Accept-Encoding
X-Server: webdynphp54-06
Content-Type: text/html; charset=UTF-8
X-Varnish-Hostname: webcache24
Age: 3
X-S-Maxage: 60
Cache-Control: max-age=120, public
Accept-Ranges: bytes
Content-Range: bytes 0-32875/*
Content-Length: 32876
Connection: keep-alive
}}}


curl end normaly and i got a 206 response from varnish, everything is ok

Now if i request with a range set to 32876, varnish response seem ok:


{{{
curl -i -H 'Range: bytes=0-32875' http://my_host/my_uri

HTTP/1.1 206 Partial Content
Date: Fri, 14 Aug 2015 12:11:22 GMT
Set-Cookie:
eZSESSIDac08b8c73ea29869f9b619cab686aebb=kobb2cu9789ghsf1rqjpb7tcq7;
expires=Sat, 15-Aug-2015 12:11:22 GMT; path=/
Set-Cookie: e1_provider=europe1; path=/; domain=.europe1.fr
Vary: Accept-Encoding
X-Server: webdynphp54-06
Content-Type: text/html; charset=UTF-8
X-Varnish-Hostname: webcache24
Age: 658
X-S-Maxage: 60
Cache-Control: max-age=120, public
Accept-Ranges: bytes
Content-Range: bytes 0-32876/*
Content-Length: 32877
Connection: keep-alive
}}}


but curl end with the following error:


{{{
curl: (18) transfer closed with 1 bytes remaining to read
}}}

This bug is problematic because most of crawler (Facebook, Google, ...)
request page with a Range header and if the requested Range is greater
than the page size, the crawler got a connection error.

Thanks in advance for your help.

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1777>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1777: Range requests problem [ In reply to ]
#1777: Range requests problem
----------------------+------------------------
Reporter: llavaud | Owner:
Type: defect | Status: needinfo
Priority: normal | Milestone:
Component: varnishd | Version: 4.1.0-TP1
Severity: normal | Resolution:
Keywords: range |
----------------------+------------------------
Changes (by fgsch):

* status: new => needinfo


Comment:

Do you have any evidence that any of the crawlers will supply a range that
covers a size larger than the actual size?

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1777#comment:1>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1777: Range requests problem [ In reply to ]
#1777: Range requests problem
----------------------+------------------------
Reporter: llavaud | Owner:
Type: defect | Status: needinfo
Priority: normal | Milestone:
Component: varnishd | Version: 4.1.0-TP1
Severity: normal | Resolution:
Keywords: range |
----------------------+------------------------

Comment (by llavaud):

i have attached a varnishlog of the facebook crawler.

the facebook crawler got the following error:

Curl Error : RECV_ERROR Recv failure: Connection reset by peer

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1777#comment:2>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1777: Range requests problem [ In reply to ]
#1777: Range requests problem
----------------------+------------------------
Reporter: llavaud | Owner:
Type: defect | Status: needinfo
Priority: normal | Milestone:
Component: varnishd | Version: 4.1.0-TP1
Severity: normal | Resolution:
Keywords: range |
----------------------+------------------------

Comment (by llavaud):

i have made an error in my first post, the second curl command is:

curl -i -H 'Range: bytes=0-32876' http://my_host/my_uri

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1777#comment:3>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1777: Range requests problem [ In reply to ]
#1777: Range requests problem
----------------------+------------------------
Reporter: llavaud | Owner:
Type: defect | Status: needinfo
Priority: normal | Milestone:
Component: varnishd | Version: 4.1.0-TP1
Severity: normal | Resolution:
Keywords: range |
----------------------+------------------------
Changes (by slink):

* cc: nils.goroll@… (added)


--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1777#comment:4>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs
Re: #1777: Range requests problem [ In reply to ]
#1777: Range requests problem
----------------------+----------------------------------------
Reporter: llavaud | Owner: Poul-Henning Kamp <phk@…>
Type: defect | Status: closed
Priority: normal | Milestone:
Component: varnishd | Version: 4.1.0-TP1
Severity: normal | Resolution: fixed
Keywords: range |
----------------------+----------------------------------------
Changes (by Poul-Henning Kamp <phk@…>):

* owner: => Poul-Henning Kamp <phk@…>
* status: needinfo => closed
* resolution: => fixed


Comment:

In [121593312daabbef4e290a590b364a099980a8b7]:
{{{
#!CommitTicketReference repository=""
revision="121593312daabbef4e290a590b364a099980a8b7"
Disable speculative Range handling on streaming transactions where
we don't yet know the length.

I attempted to add a way to determine if the object was big enough
*yet* to satisfy the Range, but that was non-viable.

Fixes: #1777
}}}

--
Ticket URL: <https://www.varnish-cache.org/trac/ticket/1777#comment:5>
Varnish <https://varnish-cache.org/>
The Varnish HTTP Accelerator

_______________________________________________
varnish-bugs mailing list
varnish-bugs@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-bugs