Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Http looping on 416
23-11-2016, 04:13 PM (This post was last modified: 23-11-2016 04:34 PM by medoc92.)
Post: #8
RE: Http looping on 416
(23-11-2016 03:28 PM)simonc Wrote:  I don't think that's a valid response. Shouldn't a HTTP 1.1 server supply either a Content-Length header or set Transfer-Encoding: chunked? It looks like your server's response is using the old HTTP 1.0 approach of just closing the connection to indicate end of stream; this isn't valid in HTTP 1.1.

That said, from a quick look at the code, I don't think ProtocolHttp will cope properly with HTTP 1.0 servers that don't specify Content-Length. I'll log this as a bug but I'm afraid it won't be a high priority to address.

Any of the following should get your server working with ohPipeline:
  • Include Content-Length in your response.
  • If you don't always know the length in advance, use chunking in your response. When you reach the end of the resource you're serving, just send a 0 length chunk to indicate end-of-stream
  • If neither of the above suit, you could recognise a range request beyond the end of the resource and return a Content-Length: 0 header to indicate no data remains

Can't use Content-Length (length not known). Using a chunked encoding would be possible but a bit awkward as the Linn client is the first I see with this issue.

I could try the Content-Length: 0 approach. What response code do you think I should use. 206?

And no Content-Range I guess ?

I tried the Content-Lentgth 0 approach with 200 and 206, and this does not work, the player loops.

Adding bogus bytes works at the http level, but it causes issues with mpeg (works with wav but there will be audible issues).

So the conclusion would be that the only possibility is chunked encoding ?
Find all posts by this user


Messages In This Thread
Http looping on 416 - medoc92 - 23-11-2016, 07:47 AM
RE: Http looping on 416 - simonc - 23-11-2016, 01:52 PM
RE: Http looping on 416 - medoc92 - 23-11-2016, 03:14 PM
RE: Http looping on 416 - simonc - 23-11-2016, 03:28 PM
RE: Http looping on 416 - simoncn - 23-11-2016, 03:47 PM
RE: Http looping on 416 - simonc - 23-11-2016, 03:52 PM
RE: Http looping on 416 - medoc92 - 23-11-2016 04:13 PM
RE: Http looping on 416 - simonc - 23-11-2016, 03:30 PM
RE: Http looping on 416 - medoc92 - 24-11-2016, 05:31 PM
RE: Http looping on 416 - simoncn - 24-11-2016, 06:21 PM

Forum Jump: