Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HostPortHttpField should handle port-only values #1063

Closed
joakime opened this issue Nov 2, 2016 · 1 comment
Closed

HostPortHttpField should handle port-only values #1063

joakime opened this issue Nov 2, 2016 · 1 comment
Assignees
Labels
Bug For general bugs on Jetty side

Comments

@joakime
Copy link
Contributor

joakime commented Nov 2, 2016

As identified in issue #1062 the syntax of the Host header in jmeter is like this ...

Host: :8080

This format results in an illegal request format in Jetty ...

2016-11-02 14:52:29.900:WARN:oejh.HttpParser:qtp359037866-40: bad HTTP parsed: 400 Bad HostPort for HttpChannelOverHttp@f64c140{r=0,c=false,a=IDLE,uri=null}
org.eclipse.jetty.http.BadMessageException: 400: Bad HostPort
    at org.eclipse.jetty.http.HostPortHttpField.<init>(HostPortHttpField.java:48)
    at org.eclipse.jetty.http.HttpParser.parsedHeader(HttpParser.java:914)
    at org.eclipse.jetty.http.HttpParser.parseHeaders(HttpParser.java:1088)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1320)
    at org.eclipse.jetty.server.HttpConnection.parseRequestBuffer(HttpConnection.java:350)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:234)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:202)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    at org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)
    at org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)
    at java.lang.Thread.run(Thread.java:745)
Caused by: 
java.lang.IllegalArgumentException: Bad host
    at org.eclipse.jetty.util.HostPort.<init>(HostPort.java:82)
    at org.eclipse.jetty.http.HostPortHttpField.<init>(HostPortHttpField.java:44)
    at org.eclipse.jetty.http.HttpParser.parsedHeader(HttpParser.java:914)
    at org.eclipse.jetty.http.HttpParser.parseHeaders(HttpParser.java:1088)
    at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1320)
    at org.eclipse.jetty.server.HttpConnection.parseRequestBuffer(HttpConnection.java:350)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:234)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
    at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:202)
    at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)
@joakime joakime added the Bug For general bugs on Jetty side label Nov 2, 2016
gregw added a commit that referenced this issue Nov 3, 2016
@gregw gregw closed this as completed Nov 3, 2016
@gregw
Copy link
Contributor

gregw commented Nov 3, 2016

@joakime I implemented this to allow the "" string through. Tested in unit test, but not in context of #1062

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side
Projects
None yet
Development

No branches or pull requests

2 participants