Opened 3 years ago

Last modified 3 years ago

#1357 closed defect

slice+if_range problem — at Initial Version

Reported by: cjhust@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.12.x
Keywords: Cc:
uname -a:
Linux localhost.localdomain 3.10.0-327.22.2.el7.x86_64 #1
nginx -V: nginx version: nginx/1.11.2

Description

server {

listen 8888;

location / {

root html;

}

}

server {

listen 8000;

location / {

slice 128K;
proxy_set_header range $slice_range;
proxy_pass http://127.0.0.1:8888/;

}

}

server {

listen 8001;

location / {

proxy_pass http://127.0.0.1:8888/;

}

}

#curl http://127.0.0.1:8001/4K.mp4 -o /dev/null -v -H 'range: bytes=1-2' -H 'if-range: Wed, 09 Aug 2017 08:29:34 GMT'

  • About to connect() to 127.0.0.1 port 8001 (#0)
  • Trying 127.0.0.1... % 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 to 127.0.0.1 (127.0.0.1) port 8001 (#0)

GET /4K.mp4 HTTP/1.1
User-Agent: curl/7.29.0
Host: 127.0.0.1:8001
Accept: */*
range: bytes=1-2
if-range: Wed, 09 Aug 2017 08:29:34 GMT

< HTTP/1.1 206 Partial Content
< Server: nginx/1.11.2
< Date: Tue, 15 Aug 2017 03:54:28 GMT
< Content-Type: video/mp4
< Content-Length: 2
< Connection: keep-alive
< Last-Modified: Wed, 09 Aug 2017 08:29:34 GMT
< ETag: "598ac7ee-1000"
< Content-Range: bytes 1-2/4096
<
{ [data not shown]
100 2 100 2 0 0 1010 0 --:--:-- --:--:-- --:--:-- 2000

  • Connection #0 to host 127.0.0.1 left intact

return 206, meet expectation



#curl http://127.0.0.1:8000/4K.mp4 -o /dev/null -v -H 'range: bytes=1-2' -H 'if-range: Wed, 09 Aug 2017 08:29:34 GMT'

  • About to connect() to 127.0.0.1 port 8000 (#0)
  • Trying 127.0.0.1... % 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 to 127.0.0.1 (127.0.0.1) port 8000 (#0)

GET /4K.mp4 HTTP/1.1
User-Agent: curl/7.29.0
Host: 127.0.0.1:8000
Accept: */*
range: bytes=1-2
if-range: Wed, 09 Aug 2017 08:29:34 GMT

< HTTP/1.1 200 OK
< Server: nginx/1.11.2
< Date: Tue, 15 Aug 2017 03:54:46 GMT
< Content-Type: video/mp4
< Content-Length: 4096
< Connection: keep-alive
< Last-Modified: Wed, 09 Aug 2017 08:29:34 GMT
< ETag: "598ac7ee-1000"
< Accept-Ranges: bytes
<
{ [data not shown]
100 4096 100 4096 0 0 1036k 0 --:--:-- --:--:-- --:--:-- 1333k

  • Connection #0 to host 127.0.0.1 left intact

return 200, not meet expectation

Is there some reason for slice module?
for user viewport, slice and no slice method must not change the HTTP result.

Change History (0)

Note: See TracTickets for help on using tickets.