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

feat: accept absolute-form URI for request-target #232

Merged
merged 3 commits into from
Mar 22, 2025

Conversation

usualoma
Copy link
Member

@usualoma usualoma commented Mar 18, 2025

fixes #228

HTTP/1.1

This PR will enable the acceptance of absolute-forms as defined in RFC 9112.

https://datatracker.ietf.org/doc/html/rfc9112#section-3.2.2

GET http://www.example.org/pub/WWW/TheProject.html HTTP/1.1

HTTP/2

In HTTP/2, the request target is specified by ":scheme", ":authority", and ":path", so absolute-form cannot be used for ":path" (it will be treated as an invalid request and will throw an error).
With this PR, however, HTTP/2 will now refer to the ":scheme" in the request header, rather than being fixed at "https".

@usualoma usualoma force-pushed the accept-request-for-proxy branch from 530c1cf to 695e1c0 Compare March 18, 2025 23:13
@usualoma usualoma force-pushed the accept-request-for-proxy branch from 695e1c0 to 33d399d Compare March 20, 2025 23:00
@usualoma usualoma changed the title WIP: feat: accept absolute-form URI for request-target feat: accept absolute-form URI for request-target Mar 21, 2025
@usualoma usualoma marked this pull request as ready for review March 21, 2025 11:08
@usualoma
Copy link
Member Author

@yusukebe
Would you please review this?

Copy link
Member

@yusukebe yusukebe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@yusukebe
Copy link
Member

Hi @usualoma

I think this is perfect. Let's go with this. Thanks!

@yusukebe yusukebe merged commit c32bab2 into honojs:main Mar 22, 2025
3 checks passed
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.

Bug: 400 response when the http request target is in absolute-form
2 participants