请求:
...
Content-Range: bytes 27482871-41601067/41601068
...
我尝试从文件中读取字节,然后进行GZIP压缩。响应结果如下:
response.setStatus(HttpServletResponse.SC_PARTIAL_CONTENT);
...
Server: GlassFish Server Open Source Edition 4.1
X-Powered-By: Servlet/3.1 JSP/2.3 (GlassFish Server Open Source Edition 4.1 Java/Oracle Corporation/1.8)
Date: Thu, 26 Nov 2015 21:44:21 GMT
Accept-Ranges: bytes
Connection: keep-alive
Keep-Alive: timeout=1800
Content-Disposition: attachment;filename*=utf-8''Marq_Aurel_Rayman_Rave_-_Intdo_The_Blue_%28Max_R_remix%29.wav
ETag: Marq_Aurel_Rayman_Rave_-_Intdo_The_Blue_%28Max_R_remix%29.wav-41601068-1403655006000
Cache-Control: private,max-age=604800
Last-Modified: Wed, 25 Jun 2014 00:10:06 GMT
Content-Range: bytes 27482871-41601067/41601068
Content-Encoding: gzip
...
如果我暂停并恢复下载,下载会失败。也许我在范围响应中不应该使用GZIP?
Content-Encoding
! - Aidan FitzpatrickTE
头,也无法解析Transfer-Encoding: gzip, chunked
响应。感觉我们距离在浏览器中看到这个还有很多年的时间。 - Khoi