Skip to content

Fix isOriginForm and isAsteriskForm#12568

Merged
normanmaurer merged 2 commits intonetty:4.1from
jkjk822:patch-1
Jul 8, 2022
Merged

Fix isOriginForm and isAsteriskForm#12568
normanmaurer merged 2 commits intonetty:4.1from
jkjk822:patch-1

Conversation

@jkjk822
Copy link
Copy Markdown
Contributor

@jkjk822 jkjk822 commented Jul 6, 2022

Motivation:

These methods would always return false using the previously implementation (URI#getSchemeSpecificPart is documented to never return null). They also had other implementation errors.

Modification:

Edit methods to conform with RFC 7230.

Result:

Methods handle the basic examples provided in RFC 7230. More test cases can be added as needed.

These methods would always return false using the previously implementation (URI#getSchemeSpecificPart is documented to *never* return `null`). They also had other implementation errors. Correct these and make sure they at least handle the basic examples provided in RFC 7230. More test cases can be added as needed.
@normanmaurer normanmaurer requested review from ejona86 and slandelle July 7, 2022 18:13
Comment thread codec-http/src/main/java/io/netty/handler/codec/http/HttpUtil.java Outdated
Reduce these methods to string comparisons, and add overrides that take strings directly.
Use these new methods where we had previously switched to string comparison directly.
@normanmaurer normanmaurer added this to the 4.1.79.Final milestone Jul 8, 2022
@normanmaurer normanmaurer merged commit 2f7234b into netty:4.1 Jul 8, 2022
@normanmaurer
Copy link
Copy Markdown
Member

Thanks a lot!

normanmaurer pushed a commit that referenced this pull request Jul 8, 2022
Motivation:

These methods would always return false using the previously implementation (URI#getSchemeSpecificPart is [documented](https://docs.oracle.com/javase/8/docs/api/java/net/URI.html#getSchemeSpecificPart--) to *never* return `null`). They also had other implementation errors.

Modification:

Edit methods to conform with RFC 7230.

Result:

Methods handle the basic examples provided in RFC 7230. More test cases can be added as needed.
@jkjk822 jkjk822 deleted the patch-1 branch July 8, 2022 22:40
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.

3 participants