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

Refactor UriEndpoint #2700

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

yuzawa-san
Copy link
Contributor

@yuzawa-san yuzawa-san commented Feb 20, 2023

Clean up UriEndpoint logic to be based around the java.net.URI and to avoid reparsing at various points in the client request process. Move relevant methods into this class. Construct instances using static method. Only calculate derived values on demand (e.g. toExternalForm) when needed in the various request implementations. Cleaned up redirection logic. Added additional tests. Made conversion from InetSocketAddress more efficient (removed the substrings which trimmed out the ports). Fixed FailedHttpClientRequest.uri() from returning full URI rather than just Netty definition of "uri" which is raw path and query.

Fixes #829

yuzawa-san added a commit to yuzawa-san/reactor-netty that referenced this pull request Feb 20, 2023
Clean up UriEndpoint logic to be based around the java.net.URI. Move relevant methods into this class. Construct instances using static method. Only calculate derived values on demand (e.g. toExternalForm) when needed in the various request implementations. Cleaned up redirection logic. Added additional tests. Made conversion from InetSocketAddress more efficient (removed the substrings which trimmed out the ports). Fixed HttpClientTest to support ipv6 (by using NetUtil.toSocketAddressString to get the [] around the address, and also fixed FailedHttpClientRequest.uri() from returning full URI rather than just Netty definition of "uri" which is raw path and query. Fixed ClientTransportTest to support ipv6.

Fixes reactor#829
yuzawa-san added a commit to yuzawa-san/reactor-netty that referenced this pull request Feb 20, 2023
Clean up UriEndpoint logic to be based around the java.net.URI. Move relevant methods into this class. Construct instances using static method. Only calculate derived values on demand (e.g. toExternalForm) when needed in the various request implementations. Cleaned up redirection logic. Added additional tests. Made conversion from InetSocketAddress more efficient (removed the substrings which trimmed out the ports). Fixed HttpClientTest to support ipv6 (by using NetUtil.toSocketAddressString to get the [] around the address, and also fixed FailedHttpClientRequest.uri() from returning full URI rather than just Netty definition of "uri" which is raw path and query. Fixed ClientTransportTest to support ipv6.

Fixes reactor#829
yuzawa-san added a commit to yuzawa-san/reactor-netty that referenced this pull request Feb 21, 2023
Clean up UriEndpoint logic to be based around the java.net.URI. Move relevant methods into this class. Construct instances using static method. Only calculate derived values on demand (e.g. toExternalForm) when needed in the various request implementations. Cleaned up redirection logic. Added additional tests. Made conversion from InetSocketAddress more efficient (removed the substrings which trimmed out the ports). Fixed HttpClientTest to support ipv6 (by using NetUtil.toSocketAddressString to get the [] around the address, and also fixed FailedHttpClientRequest.uri() from returning full URI rather than just Netty definition of "uri" which is raw path and query. Fixed ClientTransportTest to support ipv6.

Fixes reactor#829
@violetagg
Copy link
Member

@yuzawa-san I'm gonna take a look at this

yuzawa-san added a commit to yuzawa-san/reactor-netty that referenced this pull request Mar 3, 2023
Clean up UriEndpoint logic to be based around the java.net.URI. Move relevant methods into this class. Construct instances using static method. Only calculate derived values on demand (e.g. toExternalForm) when needed in the various request implementations. Cleaned up redirection logic. Added additional tests. Made conversion from InetSocketAddress more efficient (removed the substrings which trimmed out the ports). Fixed HttpClientTest to support ipv6 (by using NetUtil.toSocketAddressString to get the [] around the address, and also fixed FailedHttpClientRequest.uri() from returning full URI rather than just Netty definition of "uri" which is raw path and query. Fixed ClientTransportTest to support ipv6.

Fixes reactor#829
yuzawa-san added a commit to yuzawa-san/reactor-netty that referenced this pull request Mar 15, 2023
Clean up UriEndpoint logic to be based around the java.net.URI. Move relevant methods into this class. Construct instances using static method. Only calculate derived values on demand (e.g. toExternalForm) when needed in the various request implementations. Cleaned up redirection logic. Added additional tests. Made conversion from InetSocketAddress more efficient (removed the substrings which trimmed out the ports). Fixed HttpClientTest to support ipv6 (by using NetUtil.toSocketAddressString to get the [] around the address, and also fixed FailedHttpClientRequest.uri() from returning full URI rather than just Netty definition of "uri" which is raw path and query. Fixed ClientTransportTest to support ipv6.

Fixes reactor#829
yuzawa-san added a commit to yuzawa-san/reactor-netty that referenced this pull request Mar 19, 2023
Clean up UriEndpoint logic to be based around the java.net.URI. Move relevant methods into this class. Construct instances using static method. Only calculate derived values on demand (e.g. toExternalForm) when needed in the various request implementations. Cleaned up redirection logic. Added additional tests. Made conversion from InetSocketAddress more efficient (removed the substrings which trimmed out the ports). Fixed HttpClientTest to support ipv6 (by using NetUtil.toSocketAddressString to get the [] around the address, and also fixed FailedHttpClientRequest.uri() from returning full URI rather than just Netty definition of "uri" which is raw path and query. Fixed ClientTransportTest to support ipv6.

Fixes reactor#829
@violetagg violetagg self-requested a review March 20, 2023 07:39
@violetagg violetagg added the type/enhancement A general enhancement label Mar 29, 2023
@violetagg violetagg added this to the 1.0.31 milestone Mar 29, 2023
yuzawa-san added a commit to yuzawa-san/reactor-netty that referenced this pull request Mar 30, 2023
Clean up UriEndpoint logic to be based around the java.net.URI. Move relevant methods into this class. Construct instances using static method. Only calculate derived values on demand (e.g. toExternalForm) when needed in the various request implementations. Cleaned up redirection logic. Added additional tests. Made conversion from InetSocketAddress more efficient (removed the substrings which trimmed out the ports). Fixed HttpClientTest to support ipv6 (by using NetUtil.toSocketAddressString to get the [] around the address, and also fixed FailedHttpClientRequest.uri() from returning full URI rather than just Netty definition of "uri" which is raw path and query. Fixed ClientTransportTest to support ipv6.

Fixes reactor#829
yuzawa-san added a commit to yuzawa-san/reactor-netty that referenced this pull request Apr 4, 2023
Clean up UriEndpoint logic to be based around the java.net.URI. Move relevant methods into this class. Construct instances using static method. Only calculate derived values on demand (e.g. toExternalForm) when needed in the various request implementations. Cleaned up redirection logic. Added additional tests. Made conversion from InetSocketAddress more efficient (removed the substrings which trimmed out the ports). Fixed HttpClientTest to support ipv6 (by using NetUtil.toSocketAddressString to get the [] around the address, and also fixed FailedHttpClientRequest.uri() from returning full URI rather than just Netty definition of "uri" which is raw path and query. Fixed ClientTransportTest to support ipv6.

Fixes reactor#829
@violetagg violetagg modified the milestones: 1.0.31, 1.0.32 Apr 6, 2023
yuzawa-san added a commit to yuzawa-san/reactor-netty that referenced this pull request Apr 18, 2023
Clean up UriEndpoint logic to be based around the java.net.URI. Move relevant methods into this class. Construct instances using static method. Only calculate derived values on demand (e.g. toExternalForm) when needed in the various request implementations. Cleaned up redirection logic. Added additional tests. Made conversion from InetSocketAddress more efficient (removed the substrings which trimmed out the ports). Fixed HttpClientTest to support ipv6 (by using NetUtil.toSocketAddressString to get the [] around the address, and also fixed FailedHttpClientRequest.uri() from returning full URI rather than just Netty definition of "uri" which is raw path and query. Fixed ClientTransportTest to support ipv6.

Fixes reactor#829
@violetagg violetagg modified the milestones: 1.0.32, 1.0.33 May 2, 2023
Clean up UriEndpoint logic to be based around the java.net.URI. Move relevant methods into this class. Construct instances using static method. Only calculate derived values on demand (e.g. toExternalForm) when needed in the various request implementations. Cleaned up redirection logic. Added additional tests. Made conversion from InetSocketAddress more efficient (removed the substrings which trimmed out the ports). Fixed HttpClientTest to support ipv6 (by using NetUtil.toSocketAddressString to get the [] around the address, and also fixed FailedHttpClientRequest.uri() from returning full URI rather than just Netty definition of "uri" which is raw path and query. Fixed ClientTransportTest to support ipv6.

Fixes reactor#829
@violetagg
Copy link
Member

@yuzawa-san I'm gonna review this for 1.0.33

@violetagg violetagg removed this from the 1.0.33 milestone Jun 2, 2023
@violetagg violetagg modified the milestones: 1.1.8, 1.1.9 Jun 2, 2023
@violetagg violetagg modified the milestones: 1.1.9, 1.1.x Backlog Jun 29, 2023
@violetagg violetagg modified the milestones: 1.1.x Backlog, 1.2.x Backlog Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Revise UriEndpointFactory/UriEndpoint
2 participants