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

NullPointerException for request with empty Host header #36234

Closed
ennishol opened this issue Oct 2, 2023 · 7 comments · Fixed by #36544
Closed

NullPointerException for request with empty Host header #36234

ennishol opened this issue Oct 2, 2023 · 7 comments · Fixed by #36544
Labels
area/vertx kind/bug Something isn't working triage/upstream Used for issues which are caused by issues in upstream projects/dependency
Milestone

Comments

@ennishol
Copy link
Contributor

ennishol commented Oct 2, 2023

Describe the bug

The request without the Host header does work in Quarkus 3.3.1 but not in 3.4.1

curl -iv -H "User-Agent:" -H "Accept:" -H "Host:" http://localhost:8080/foo

Fails with 500 and NullPointerException in log (enabled level ALL)

Vert.x io.vertx.core.net.impl.HostAndPortImpl does not allow an empty Host header anymore and throws NullPointerException
Would it be possible to intercept the request and set a dummy host header to make vert.x happy?
Currently, ContainerRequestFilter is not invoked on that failure

Expected behavior

No response

Actual behavior

No response

How to Reproduce?

No response

Output of uname -a or ver

No response

Output of java -version

No response

GraalVM version (if different from Java)

No response

Quarkus version or git rev

3.4.1

Build tool (ie. output of mvnw --version or gradlew --version)

No response

Additional information

No response

@ennishol ennishol added the kind/bug Something isn't working label Oct 2, 2023
@cescoffier cescoffier added the triage/upstream Used for issues which are caused by issues in upstream projects/dependency label Oct 2, 2023
@cescoffier
Copy link
Member

This is a bug in Vert.x. We would need to fix it there.

@cescoffier
Copy link
Member

I've opened eclipse-vertx/vert.x#4879.

@ennishol
Copy link
Contributor Author

ennishol commented Oct 2, 2023

@cescoffier thanks!

@geoand geoand changed the title NullPointerException for request with empty Host header in j3.4.1 NullPointerException for request with empty Host header Oct 2, 2023
@cescoffier
Copy link
Member

I would need a reproducer.
I was unable to reproduce it with the main branch and 3.4.1. Also @vietj was unable to reproduce it in Vert.x.

@cescoffier cescoffier added the triage/needs-reproducer We are waiting for a reproducer. label Oct 5, 2023
@cescoffier
Copy link
Member

Ok, I was able to reproduce it.

@cescoffier cescoffier removed the triage/needs-reproducer We are waiting for a reproducer. label Oct 5, 2023
@cescoffier
Copy link
Member

Fixed upstream - it will be fixed once we update Vert.x

@querdenker2k
Copy link

@cescoffier I am using Quarkus 3.6.0 and still having the same problem. Looking into the dependency-tree shows that vertx 4.4.6 used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/vertx kind/bug Something isn't working triage/upstream Used for issues which are caused by issues in upstream projects/dependency
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants