-
Notifications
You must be signed in to change notification settings - Fork 10
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
Apache Client Bug Fix #694
Conversation
downgrade from v5.2.2 -> v5.2.1 deleted header import deleted helper method convertMapToHeader(Map<String, String> headerMap)
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@@ -11,8 +11,8 @@ java { | |||
|
|||
dependencies { | |||
//client | |||
implementation 'org.apache.httpcomponents.client5:httpclient5:5.2.2' | |||
implementation 'org.apache.httpcomponents.client5:httpclient5-fluent:5.2.2' | |||
implementation 'org.apache.httpcomponents.client5:httpclient5:5.2.1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we changed our code, do we need to also downgrade? Or can we keep the latest version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit: I misinterpreted the question the first time. The answer is Yes. The reason is that there were two bugs. One which involved the incompatibility of the import, which blew the POST request when executed. And two, the invalid proxy
error that the client throws. The invalid proxy error was discovered after I fixed the issue with the import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I see.
I'm a little confused about the header issue. What exactly is wrong with the headers? Maybe I could pair with you on this?
"name": "dogCow", | ||
"first": "last" | ||
] | ||
def bhArr = [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be worth commenting these tests and having an item to uncomment them in the devex/opex backlog in the future when we get bumped to a bug free version?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jcrichlake I think that's a good idea
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good thought. Since the org.apache.hc.core5.http.Header
is not supported in the 5.3.x version, we will not be utilizing the convertMapToHeader(Map<String, String> headerMap)
helper function. This unit test was designed to test the functionality of the helper function. Once the helper function gets deleted, there is no need for this test case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha, thanks for clarifying
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I actually just looked. 5.2.3 was just released on November 28th. The bug report for Apache says it was fixed in this version. Can we just upgrade to that to fix the bug?
Version 5.2.3 is out and the Header import works with it. |
Apache Client Bug Fix
This PR addresses the issues caused by updating Apache client 5 from version 5.2.1 to 5.2.2. The main issues were incompatibility from the
org.apache.hc.core5.http.header
import and the client would throw aninvalid proxy
error whenever a post request was executed.Changes
org.apache.hc.core5.http.header
import has been deletedconvertMapToHeader(Map<String, String> headerMap)
helper method has been deleted along with test caseIssue
#689
Checklist