|
||||||||
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
[JIRA] (JENKINS-15150) Content is returned for HEAD requests when using gzip
steffen.pin...@tasktop.com (JIRA) Wed, 12 Sep 2012 23:15:54 -0700
- [JIRA] (JENKINS-15150) Content is return... steffen.pin...@tasktop.com (JIRA)
- [JIRA] (JENKINS-15150) Content is r... steffen.pin...@tasktop.com (JIRA)
- [JIRA] (JENKINS-15150) Content is r... an...@java.net (JIRA)
- [JIRA] (JENKINS-15150) Content is r... steffen.pin...@tasktop.com (JIRA)
- [JIRA] (JENKINS-15150) Content is r... michael.m.cla...@gmail.com (JIRA)
The example below is maybe more clear than the description. This violates the HTTP spec that states that the "server MUST NOT return a message-body in the response" for HEAD requests: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html#sec9.4.
$ nc localhost 8080
HEAD /? HTTP/1.1
Accept-Encoding: gzip,deflate
HTTP/1.1 200 OK
Server: Winstone Servlet Engine v0.9.10
Content-Encoding: gzip
Expires: 0
Cache-Control: no-cache,must-revalidate
X-Hudson-Theme: default
Content-Type: text/html;charset=UTF-8
X-Hudson: 1.395
X-Jenkins: 1.481
X-Jenkins-Session: 16e694bb
X-Hudson-CLI-Port: 55248
X-Jenkins-CLI-Port: 55248
X-Jenkins-CLI2-Port: 55248
X-SSH-Endpoint: 127.0.0.1:38694
Content-Length: 3750
Connection: Keep-Alive
Date: Thu, 13 Sep 2012 06:09:02 GMT
X-Powered-By: Servlet/2.5 (Winstone/0.9.10)
Set-Cookie: JSESSIONID.e8d41638=2a67514147fe0022332ef37297bd0dfd; Path=/; HttpOnly
�Z�r�H���B��]����6�
▒|oll���e����y��Y�'۬]`�v73#�Tʫ2�Y�ѯ���ۧ~[��cſ▒ǿH��
...
The same happens when the Accept-Encoding header is not included. The difference is though that the server closes the connection (for whichever reason) so subsequent requests are likely to succeed. It would be better if the server kept the connection alive and returned a valid response.
$ nc localhost 8080
HEAD /? HTTP/1.1
HTTP/1.1 200 OK
Server: Winstone Servlet Engine v0.9.10
Expires: 0
Cache-Control: no-cache,must-revalidate
X-Hudson-Theme: default
Content-Type: text/html;charset=UTF-8
X-Hudson: 1.395
X-Jenkins: 1.481
X-Jenkins-Session: 16e694bb
X-Hudson-CLI-Port: 55248
X-Jenkins-CLI-Port: 55248
X-Jenkins-CLI2-Port: 55248
X-SSH-Endpoint: 127.0.0.1:38694
Connection: Close
Date: Thu, 13 Sep 2012 06:11:13 GMT
X-Powered-By: Servlet/2.5 (Winstone/0.9.10)
Set-Cookie: JSESSIONID.e8d41638=d616b2e4bd984bb32e675c49e87662ff; Path=/; HttpOnly
<!DOCTYPE html><html><head>
...