Giter Club home page Giter Club logo

Comments (5)

joakime avatar joakime commented on June 17, 2024 1

Looks like the HttpCompliance.UNSAFE_HOST_HEADER setting needs to be passed into HostPortHttpField and then the HostPort constructor that accepts the unsafe boolean.

from jetty.project.

joakime avatar joakime commented on June 17, 2024

You example results in a Bad Authority.

org.eclipse.jetty.http.BadMessageException: 400: Bad HostPort
	at [email protected]/org.eclipse.jetty.http.HostPortHttpField.<init>(HostPortHttpField.java:41)
	at [email protected]/org.eclipse.jetty.http.HttpParser.parsedHeader(HttpParser.java:1068)
	at [email protected]/org.eclipse.jetty.http.HttpParser.parseFields(HttpParser.java:1268)
	at [email protected]/org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:1543)
	at [email protected]/org.eclipse.jetty.server.internal.HttpConnection.parseRequestBuffer(HttpConnection.java:580)
	at [email protected]/org.eclipse.jetty.server.internal.HttpConnection.onFillable(HttpConnection.java:404)
	at [email protected]/org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:322)
	at [email protected]/org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:99)
	at [email protected]/org.eclipse.jetty.io.ByteArrayEndPoint.lambda$new$0(ByteArrayEndPoint.java:58)
	at [email protected]/org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:971)
	at [email protected]/org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1201)
	at [email protected]/org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1156)
	at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: java.lang.IllegalArgumentException: Bad Authority
	at [email protected]/org.eclipse.jetty.util.HostPort.<init>(HostPort.java:165)
	at [email protected]/org.eclipse.jetty.util.HostPort.<init>(HostPort.java:59)
	at [email protected]/org.eclipse.jetty.http.HostPortHttpField.<init>(HostPortHttpField.java:37)
	... 12 more

Which results in a 400 Bad Message directly from the HttpParser, it never reaches HttpConnection#HttpStreamOverHTTP1#headerComplete

from jetty.project.

janbartel avatar janbartel commented on June 17, 2024

@joakime has this issue been fixed in a PR?

from jetty.project.

joakime avatar joakime commented on June 17, 2024

@janbartel no, as we needed the compliance violation listener PR to settle first.

As I merged that PR in the last 24 hours, this is now a candidate to resolve for the next release 12.0.7

from jetty.project.

joakime avatar joakime commented on June 17, 2024

Nothing do in our code, we support the violation setting

from jetty.project.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.