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 Apache HttpClient host + absolute uri #3694

Merged
merged 13 commits into from
Jul 29, 2021
Merged

Fix Apache HttpClient host + absolute uri #3694

merged 13 commits into from
Jul 29, 2021

Conversation

trask
Copy link
Member

@trask trask commented Jul 28, 2021

Noticed this gap while fixing #3692

Copy link
Contributor

@anuraaga anuraaga left a comment

Choose a reason for hiding this comment

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

Do we need for 4.3 also?

@trask
Copy link
Member Author

trask commented Jul 28, 2021

Do we need for 4.3 also?

What is this 4.3? 😉

@anuraaga
Copy link
Contributor

What is this 4.3? 😉

https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/apache-httpclient/apache-httpclient-4.3/library/src/main/java/io/opentelemetry/instrumentation/apachehttpclient/v4_3/ApacheHttpClientRequest.java#L30

I took a slightly different approach using instanceof, but since the tests are the same may easily have the same bug

@trask
Copy link
Member Author

trask commented Jul 28, 2021

@open-telemetry/java-instrumentation-approvers apologies, i got mixed up a bit between branches and apache httpclient spaghetti, and a couple of changes from this PR leaked into #3692, which is why a couple diffs in this PR are a bit weird

Comment on lines -126 to -129
// TODO(trask) substitute a non-resolving host and port to make sure that the host and port
// from this uri are not used (currently that causes redirect tests to fail
// because Apache HttpClient 5 appears to resolve relative redirects against this uri
// instead of against the host, which is different from Apache HttpClient 4 behavior)
Copy link
Member Author

Choose a reason for hiding this comment

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

this is captured in #3697 now

@trask trask closed this Jul 29, 2021
@trask trask reopened this Jul 29, 2021
@trask trask merged commit 8ecf709 into open-telemetry:main Jul 29, 2021
@trask trask deleted the fix-host-with-absolute-uri branch July 29, 2021 15:35
This was referenced Jul 30, 2021
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