You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a GET request has a Range bigger than the actual content to be sent in the response, Restlet gives a wrong Content-Length header. The Content-Range header is correct.
Example HTTP Request:
GET /mm/A2LUIXJTVSN7YU HTTP/1.1
host: dummy.com
Accept: */*
Accept-Encoding: deflate, gzip
Range: bytes=0-40960
Connection: Close
HTTP/1.1 206 Partial Content
Accept-Ranges: bytes
Content-Range: bytes 0-40960/1569
Content-Type: text/html;charset=UTF-8
Date: Thu, 07 Jun 2012 18:41:19 GMT
Server: Restlet-Framework/2.0.9
Vary: Accept-Charset,Accept-Encoding,Accept-Language,Accept
Content-Length: 40961
Connection: Close
The text was updated successfully, but these errors were encountered:
Issue was found while working with the facebook opengraph features. As facebook is using a Range request, it does not work if the opengraph object is served by a Restlet application.
I used getRangeService().setEnabled(false) as a workaround
Also, I don't know if it is facebook's HTTP implementation that is wrong: is it accepted to ask for a Range without first making a HEAD request to know the full Content-Length?
I think also this is a bug. Actually there are two bugs since the "Content-Length" is wrong and the "Content-Range" also (see RFC 2616 chapter 14.16 Content-Range : A byte-content-range-spec with a [...] instance-length value is less than or equal to its last-byte-pos value is invalid).
When a GET request has a Range bigger than the actual content to be sent in the response, Restlet gives a wrong Content-Length header. The Content-Range header is correct.
Example HTTP Request:
The text was updated successfully, but these errors were encountered: