nginx vs. dashas-player: 206 Partial Content Problem

vendredi 7 août 2015

Moin,

Ich versuch' den dash.as Player (http://ift.tt/1MRIwQd) mit content vom eigenen Server zu fuettern. Dabei gibts ein Problem mit einem HTML-Feature: "Partial content".
Damit kann anscheinend die Applikation vom Webserver nur ein paar Bytes eines Files anfordern. Das probiert der dash.as Player, aber mein Webserver (nginx-1.9.2) schnallt's nicht. Wireshark sagt z.B, dass folgendes passiert:

Code:

GET /oops-20120802-8b.mp4?bytes=0-591 HTTP/1.1
Host: 172.16.100.106
User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:28.0) Gecko/20100101 Firefox/28.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://ift.tt/1Iv5AhF
Connection: keep-alive

HTTP/1.1 200 OK
Server: nginx/1.9.2
Date: Fri, 07 Aug 2015 09:23:03 GMT
Content-Type: video/mp4
Content-Length: 959409
Last-Modified: Wed, 08 Jul 2015 14:00:56 GMT
Connection: keep-alive
ETag: "559d2d18-ea3b1"
Accept-Ranges: bytes

....ftypdash....iso6mp41...8moov...lmvhd.....?...?....V"...................................................
usw...

Wenn ich mit
Code:

curl -v --header "Range: bytes=0-591" http://ift.tt/1MRIxnt -o bla.mp4
arbeite, dann "versteht" der Webserver das - curl erzaehlt dann sowas:
Code:

* About to connect() to 172.16.100.106 port 80 (#0)

*  Trying 172.16.100.106...

% Total    % Received % Xferd  Average Speed  Time    Time    Time  Current
                                Dload  Upload  Total  Spent    Left  Speed

  0    0    0    0    0    0      0      0 --:--:-- --:--:-- --:--:--    0
* connected

* Connected to 172.16.100.106 (172.16.100.106) port 80 (#0)
> GET /oops-20120802-8b.mp4 HTTP/1.1
> User-Agent: curl/7.27.0
> Host: 172.16.100.106
> Accept: */*
> Range: bytes=0-591
>
< HTTP/1.1 206 Partial Content
< Server: nginx/1.9.2
< Date: Fri, 07 Aug 2015 10:39:59 GMT
< Content-Type: video/mp4
< Content-Length: 592
< Last-Modified: Wed, 08 Jul 2015 14:00:56 GMT
< Connection: keep-alive
< ETag: "559d2d18-ea3b1"
< Content-Range: bytes 0-591/959409
<
{ [data not shown]

100  592  100  592    0    0  327k      0 --:--:-- --:--:-- --:--:--  578k
* Connection #0 to host 172.16.100.106 left intact
* Closing connection #0

Sprich: Die Anfrage sieht anders aus, und prinzipiell kann nginx auch Partial Content rausgeben, er versteht bloss die Anfrage des Players nicht. Wie kann ich nginx beibringen, dass er so einen Suffix: "?bytes=0-591" kapiert und entsprechend beantwortet (eben 206 statt 200)?

Gruss
WK


0 commentaires:

Enregistrer un commentaire

 

Lorem

Ipsum

Dolor