206部分内容不接受来自服务器的数据

时间:2019-03-11 13:54:28

标签: http web video partial http-status

我正在尝试使用206部分内容部分返回视频,我正确传输了所有标头,但请求仅传递了4kb,但是如果我回答200 OK,则视频可以正常工作,这是什么问题?

(如果我回答200 OK,则无法倒带视频)

enter image description here

enter image description here

enter image description here

类型:文档

请求:

GET / HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
Cache-Control: max-age=0
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36
DNT: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: ru,en;q=0.9

响应:

HTTP/1.1 200 OK
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Mon, 11 Mar 2019 19:03:00 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Accept-Ranges: bytes
Content-Encoding: gzip
Content-Type: video/mp4; charset=utf-8
Date: Mon, 11 Mar 2019 19:03:02 GMT
Content-Length: 16766763
Keep-Alive: timeout=15,max=100

============================================

类型:媒体

请求:

GET / HTTP/1.1
Host: 127.0.0.1:8080
Connection: keep-alive
DNT: 1
Accept-Encoding: identity;q=1, *;q=0
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36
Accept: */*
Referer: http://127.0.0.1:8080/
Accept-Language: ru,en;q=0.9
Range: bytes=0-

响应:

HTTP/1.1 206 Partial Content
Expires: Mon, 26 Jul 1997 05:00:00 GMT
Last-Modified: Mon, 11 Mar 2019 19:03:02 GMT
Cache-Control: no-store, no-cache, must-revalidate
Pragma: no-cache
Accept-Ranges: bytes
Content-Type: video/mp4; charset=utf-8
Date: Mon, 11 Mar 2019 19:03:02 GMT
Keep-Alive: timeout=15,max=100
Content-Range: bytes 0-29593599/29593600
Content-Length: 29593600

1 个答案:

答案 0 :(得分:0)

问题出在本地主机上,一切都可以在服务器上运行,谢谢:)