[
https://issues.jenkins-ci.org/browse/JENKINS-13125?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=162015#comment-162015
]
OHTAKE Tomohiro commented on JENKINS-13125:
-------------------------------------------
Reproduced with Jenkins 1.461 running on Winstone.
The archived file's length is 1716 bytes.
It seems that "last-byte-pos" in Content-Range header is always bigger by 1
byte.
{code}
GET ****** HTTP/1.1
Range: bytes=0-1
Host: ******:8888
HTTP/1.1 206 Partial Content
Server: Winstone Servlet Engine v0.9.10
Last-Modified: Wed, 25 Apr 2012 01:54:31 GMT
Expires: Wed, 25 Apr 2012 01:54:31 GMT
Accept-Ranges: bytes
Content-Type: application/java-archive
Content-Range: 0-2/1716
Content-Length: 2
Connection: Keep-Alive
Date: Wed, 25 Apr 2012 08:49:28 GMT
X-Powered-By: Servlet/2.5 (Winstone/0.9.10)
GET ****** HTTP/1.1
Range: bytes=1715-
Host: ******:8888
HTTP/1.1 206 Partial Content
Server: Winstone Servlet Engine v0.9.10
Last-Modified: Wed, 25 Apr 2012 01:54:31 GMT
Expires: Wed, 25 Apr 2012 01:54:31 GMT
Accept-Ranges: bytes
Content-Type: application/java-archive
Content-Range: 1715-1716/1716
Content-Length: 1
Connection: Keep-Alive
Date: Wed, 25 Apr 2012 08:50:00 GMT
X-Powered-By: Servlet/2.5 (Winstone/0.9.10)
{code}
> HTTP Content-Range Header one byte past file length
> ---------------------------------------------------
>
> Key: JENKINS-13125
> URL: https://issues.jenkins-ci.org/browse/JENKINS-13125
> Project: Jenkins
> Issue Type: Bug
> Components: www
> Affects Versions: current
> Reporter: Roland Schulz
>
> Downloading a PDF artifact using Chrome (17.0.963.79 m on Windows) the HTTP
> header for the last partial entity-body sent back by Jenkins contains:
> Content-Range: 2613923-2646691/2646691\r\n
> I believe this is wrong according to
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.16 . I believe
> the last range should be 2613923-2646690/2646691, because the numbers are
> 0-indexed.
> I'm not sure whether this is caused by this or is a separate issue, but
> Chrome keeps requesting the same last partial segment and Jenkins returns the
> same one in an endless loop. Thus Chrome is stuck loading the PDF at 100% in
> the endless loop. This only happens with the Chrome embedded PDF viewer. The
> file downloads correctly with "Save as".
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira