【发布时间】:2015-11-26 21:57:16
【问题描述】:
请求:
...
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?
【问题讨论】: