Home  >  Article  >  Backend Development  >  Simulate a request for a picture. The request header contains range, but why is there no content-range field returned?

Simulate a request for a picture. The request header contains range, but why is there no content-range field returned?

WBOY
WBOYOriginal
2016-08-29 08:50:481165browse

This is the request header

<code>GET http://subversion.apache.org/images/windows.png HTTP/1.1
Host: subversion.apache.org
Range: 1000-3000
Content-Length: 14
Pragma: no-cache
</code>

This is the response header

<code>HTTP/1.1 200 OK
Date: Sun, 28 Aug 2016 01:33:56 GMT
Server: Apache/2.4.7 (Ubuntu)
Last-Modified: Thu, 14 Jan 2010 21:29:52 GMT
ETag: "1403-47d2696640237"
Accept-Ranges: bytes
Content-Length: 5123
Content-Type: image/png
Cache-Control: no-cache
</code>

He directly returned a complete picture. As expected, it should be a partial picture

Reply content:

This is the request header

<code>GET http://subversion.apache.org/images/windows.png HTTP/1.1
Host: subversion.apache.org
Range: 1000-3000
Content-Length: 14
Pragma: no-cache
</code>

This is the response header

<code>HTTP/1.1 200 OK
Date: Sun, 28 Aug 2016 01:33:56 GMT
Server: Apache/2.4.7 (Ubuntu)
Last-Modified: Thu, 14 Jan 2010 21:29:52 GMT
ETag: "1403-47d2696640237"
Accept-Ranges: bytes
Content-Length: 5123
Content-Type: image/png
Cache-Control: no-cache
</code>

He directly returned a complete picture. As expected, it should be a partial picture

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn