Details
-
Bug
-
Status: Resolved (View Workflow)
-
Minor
-
Resolution: Fixed
-
Jenkins 2+
Description
Behind a reverse proxy a requests may fail with this error
WARNING o.e.jetty.util.log.JavaUtilLog#warn: badMessage: 400 Bad Host header for HttpChannelOverHttp@123456{r=0,c=false,a=IDLE,uri=/foo/bar/}
In Jenkins 2.0 Jetty was upgraded from 8.1 to 9.2 which removes AJP functionality, and also requires that if the HOST: field is used it can not be empty.
KO:
GET /foo/bar HTTP/1.1\r\nHOST: \r\nConnection: Close\r\n\r\n
OK:
GET /foo/bar HTTP/1.1\r\nHOST:null \r\nConnection: Close\r\n\r\n
Current winstone version includes Jetty server 9.2.15.v20160210.
The fix is in 9.3.... See:
https://github.com/eclipse/jetty.project/issues/592. https://github.com/eclipse/jetty.project/commit/7e16731b9dac0d5b6ae5424a13c83fd4ef46dc4f
The Jetty version embedded in winstone must be upgraded to have a fix
The workaround is to take care to never send an empty HOST
Attachments
Issue Links
- links to
Code changed in jenkins
User: Olivier Lamy
Path:
README.md
pom.xml
src/java/winstone/HostConfiguration.java
src/java/winstone/HttpsConnectorFactory.java
src/java/winstone/LocalStrings.properties
src/java/winstone/cmdline/Option.java
src/java/winstone/realm/ArgumentsRealm.java
src/java/winstone/realm/FileRealm.java
src/testwebapp/WEB-INF/web.xml
http://jenkins-ci.org/commit/winstone/16a1f190035a9ac32c62b9736c30808cfa5ff63d
Log:
Merge pull request #32 from olamy/features/jetty_9.2.21.v20170120
[JENKINS-40693, JENKINS-43713] upgrade to jetty 9.4.x
Compare: https://github.com/jenkinsci/winstone/compare/59d84ed22913...16a1f190035a