Repository navigation
Accept the asterisk form for OPTIONS - #1952
Merged
Merged
Conversation
nigrosimone
marked this pull request as ready for review
October 3, 2026 05:53
Contributor
|
I don't think it makes sense to implement a bunch of ancient Http 1.0 rules when (ironically) the task we have is to implement the latest version of Http1.1. I think it's far easier to focus on making Http1.1 standards compliant and just cut Http 1.0 out entirely. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
OPTIONS * HTTP/1.1gets a 400 (Http11Probe COMP-OPTIONS-STAR), because consumeRequestLine wants the target to start with/. RFC 9112 3.2.4 defines the asterisk form for a server-wide OPTIONS.The fix also accepts
*when the method is OPTIONS. Other methods with*still get 400 (COMP-ASTERISK-WITH-GET). The app sees*as URL, so a/*route gets it. The check runs only when the target does not start with/.The new test sends
OPTIONS *andGET *, it fails without the fix.With Http11Probe locally only COMP-OPTIONS-STAR moves, from Fail to Pass: 158/159.
for 159/159
The last one is COMP-HTTP10-DEFAULT-CLOSE: today every HTTP/1.0 request gets a 400. Accepting it is about 6 lines (request line, ancientHttp, no automatic 100 Continue and no WebSocket upgrade for 1.0), but it changes behavior, so I ask first: do you want uWS to accept HTTP/1.0?