|
|
|
|
Change By:
|
Daniel Beck
(02/Sep/14 8:52 AM)
|
Summary:
|
Incorrect use of
Jenkins sets
Transfer-Encoding: chunked
and Content-Encoding: gzip causing secondary bugs.
header even though it's not true
|
Description:
|
Today I ran across a problem with our office jenkins server. When I tried to go to /monitoring I was greeted with a page full of gibberish which matches JENKINS-14050. I looked at the traffic using charles proxy and I discovered that the Content-Encoding: gzip was not playing nice with the incorrect Transfer-Encoding: chunked implementation.
I have resolved my issue with /monitoring by disabling gzip encoding. I did this by adding "RequestHeader unset Accept-Encoding" to the Apache proxy that sits in front of my jenkins server. This is functional enough, but it does not address the core issue.
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.
Adding Content-Encoding: gzip to this broken Transfer-Encoding mode reproduced the broken behavior documented in JENKINS-14050.
I updated another jenkins server to the latest (1.503) and
upgraded the monitoring plugin to its newest version and
I still see the incorrect Transfer-Encoding.
{noformat} 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="">... {noformat}
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.
{noformat} 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" .... {noformat}
|
Component/s:
|
monitoring
|
|
|
|
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
|
--
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit
https://groups.google.com/d/optout.
Tried to edit the title and description to narrow it to the real issue.