Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Http looping on 416
23-11-2016, 03:14 PM
Post: #3
RE: Http looping on 416
(23-11-2016 01:52 PM)simonc Wrote:  What HTTP headers does your server return? I'm particularly interested in the HTTP version it uses (1.0 or 1.1) and whether it reports a content length, uses chunked transfer encoding or just writes unspecified amounts of data then closes the connection.

If your server does report a length, are that many bytes transferred?

Here is the initial request from the player:
Code:
GET /stream1.mp3?player=00:24:1d:de:68:68 HTTP/1.1
Host: 192.168.4.4:9010
Connection: close
Icy-MetaData: 1
Range: bytes=0-
The response from the server:
Code:
HTTP/1.1 200 OK
Connection: close
Content-Type:  audio/mpeg
Date: Wed, 23 Nov 2016 14:33:39 GMT

(data follows)

After the end of the first request, I receive a second one:
Code:
GET /stream1.mp3?player=00:24:1d:de:68:68 HTTP/1.1
Host: 192.168.4.4:9010
Connection: close
Icy-MetaData: 1
Range: bytes=163760-

I think that I should not receive this at all, and I've tried to answer by 416 for example, which gets the player looping on:
Code:
>ProtocolNetwork::Connect
ProtocolNetwork::Open
<Protocol::Connect
ProtocolHttp::WriteRequest send request
ProtocolHttp::WriteRequest read response
ProtocolHttp::WriteRequest response code 416
ProtocolHttp::ProcessContent 0
ProtocolNetwork::Close
>ProtocolNetwork::Connect
ProtocolNetwork::Open
<Protocol::Connect
ProtocolHttp::WriteRequest send request
ProtocolHttp::WriteRequest read response
ProtocolHttp::WriteRequest response code 416

(etc.)

I checked that I can prevent the player from looping by faking a range response to the second request (4 bogus bytes and a length corresponding to the actual data sent + 4). I tried this with wav data hence the 4 bytes choice. Unfortunately I don't think that I can create a 0-length response ? and I'm afraid that the bogus data could create problems. And it's not really clean of course...

(23-11-2016 07:47 AM)medoc92 Wrote:  I tried to build ohpipipeline from git, with no success.

(23-11-2016 01:52 PM)simonc Wrote:  Have you followed the instructions in the README ? If you had errors during dependency fetching, try fetching dependencies one at a time. E.g.
Code:
./go fetch ohWafHelpers
./go fetch ohNet
./go fetch openssl

I may give it another try. I got through the part which uses mono, and then get a python error about a 'no such file or directory' but it does not say what's missing.

Actually I don't really care about the software player, I'm just using it in hope that it would behave the same as Linn hardware. Do you think that the same problem will occur with actual hardware ?

jf
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: