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

Fix isOriginForm and isAsteriskForm #12568

Merged
merged 2 commits into from Jul 8, 2022
Merged

Fix isOriginForm and isAsteriskForm #12568

merged 2 commits into from Jul 8, 2022

Conversation

jkjk822
Copy link
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.
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
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.

None yet

3 participants