- changed version to 1.1
- edited description
Range header result in invalid Content Length with MediaBrowser REST interface
Issue #586
invalid
When I'm downloading an image using the REST, all works fine. However, when specifying a Range header the response is a bit unexpected:
For instance, with this request:
GET /cds/resource/54/COVER_IMAGE,flv_player?authToken=28d2fff726ab4672885a4569c3a42a6a HTTP/1.1
Connection: Keep-Alive
Accept: */*
Accept-Encoding: identity
Range: bytes=0-20000
Host: localhost:23425
Results in:
HTTP/1.1 200 OK
Connection: close
Cache-Control: no-cache
Date: Thu, 11 Oct 2012 10:42:46 GMT
Server: Restlet-Framework/2.0.10
Content-Length: 20001
Content-Type: image/jpeg
As you can see, the Content-Length is calculated from the Range header, but the original file is only 6544 bytes long. In the case that the filesize is smaller than the specified range, it should return the original filesize.
Comments (3)
-
repo owner -
repo owner bytes ranges have actually not been implemented in CDS so far. There is another ticket (
#563) open for delivering partial files, possibly using other means.I have now implemented a check so that byte range request will return 406.
-
repo owner - changed status to invalid
- Log in to comment