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

5204 reject missing host #5205

Closed

Conversation

NilsRenaud
Copy link
Contributor

An HTTP/1.1 message MUST be rejected with an HTTP 400 error code when no Host header is present. See https://datatracker.ietf.org/doc/html/rfc9112#section-3.2

See #5204 for details.

An HTTP/1.1 message MUST be rejected with an HTTP 400 error code when no Host header is present. See https://datatracker.ietf.org/doc/html/rfc9112#section-3.2

See eclipse-vertx#5204 for details.

Signed-off-by: Nils Renaud <renaud.nils@gmail.com>
@NilsRenaud
Copy link
Contributor Author

I've not added any tests since I'm not really sure it's the right place to have this check.
Maybe we could add a new place such as verifyRequest() to handle such things.
Any thoughts ?

@vietj
Copy link
Member

vietj commented May 21, 2024

vert-x3/vertx-web#2612

@vietj vietj closed this May 21, 2024
@NilsRenaud
Copy link
Contributor Author

Is there a reason why it's handled in vert.x web rather than Vert.x core ?

@vietj
Copy link
Member

vietj commented May 23, 2024

a couple of reasons:

We might revisit that later I think.

@NilsRenaud
Copy link
Contributor Author

Ok, though I would love to have a flag like .permitInvalidInput(boolean) to have 2 versions of Vert.x core:

  • true: for testing purpose
  • false: in production (default)

@vietj
Copy link
Member

vietj commented May 23, 2024

I think instead we should try in vertx-web to move this code to a validation handler that would be executed first to make things more clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants