-
Bug
-
Resolution: Cannot Reproduce
-
Major
-
None
My Jenkins server is running with the default Winstone servlet engine as packaged for RHEL5. It responds with HTTP/1.1, Connection: close, and Transfer-Encoding: chunked. It then sends data in HTTP/1.0 mode where it closes the connection when done and does no chunked encoding.
I updated another jenkins server to the latest (1.503) and I still see the incorrect Transfer-Encoding.
HTTP/1.1 200 OK Date: Wed, 27 Feb 2013 19:55:19 GMT Server: Winstone Servlet Engine v0.9.10 Cache-Control: no-cache Pragma: no-cache Expires: -1 Content-Type: text/html;charset=UTF-8 X-Powered-By: Servlet/2.5 (Winstone/0.9.10) Connection: close Transfer-Encoding: chunked <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html><head><title>Monitoring JavaMelody on _git.fastinfra.net</title> <link rel='stylesheet' href='?resource=monitoring.css' type='text/css'/> ...
A proper chunked encoding should prefix every chunk with the chunk length in hex and append a CRLF after the chunk.
"<chunklen as hex>\r\n\r\n<chunkdata>\r\n"
After the final chunk an empty chunk is sent to signal the end of the chunk encoded response.
"0\r\n\r\n"
Another place where superfluous headers are being sent is /ajaxExecutors and /ajaxBuildQueue. Both of these set Content-Encoding: gzip while not gzipping the content.
HTTP/1.1 200 OK Date: Wed, 27 Feb 2013 19:55:08 GMT Server: Winstone Servlet Engine v0.9.10 Content-Encoding: gzip Content-Type: text/html;charset=UTF-8 Content-Length: 268 X-Powered-By: Servlet/2.5 (Winstone/0.9.10) Connection: close <table id="executors" ....