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

Add support for Apache HttpClient 5.0 #1164

Closed
mdeinum opened this issue Oct 21, 2020 · 25 comments
Closed

Add support for Apache HttpClient 5.0 #1164

mdeinum opened this issue Oct 21, 2020 · 25 comments

Comments

@mdeinum
Copy link
Contributor

mdeinum commented Oct 21, 2020

Current Apache Http Client 4.x is supported however there is also Apache Http Client 5.0 (and I believe 5.1 is in the making), which contains some breaking changes. Might be worthwhile to add support for Http Client 5.0 next to the 4.5.

Or add some documentation on how to configure the Apache Http Client using the ClientHttpRequestFactory abstraction in Spring itself to configure the Apache Http Client, this would save adding additional support into this and use the abstraction from Spring itself instead.

@zielarz25
Copy link

+1 It becomes even more important now, when spring-mvc 6.x requires Apache Http Client 5.1+, but spring-ws still needs httpclient 4.x, resulting in some projects having two similar dependencies, potentially conflicting ones

@mdeinum
Copy link
Contributor Author

mdeinum commented Jan 2, 2023

You don't need to use the http client v4, as mentioned you can also use the ClientHttpRequestFactory (the infrastructure used by the RestTemplate) and you can use any supported version. Maybe that should become the default instead of have different implementation for different clients.

@gregturn
Copy link
Contributor

gregturn commented Jan 4, 2023

Apparently, there are some official guides for migrating: https://hc.apache.org/httpcomponents-client-5.2.x/migration-guide/index.html

I need to study them to ensure we are properly aligning with their expectations.

@gregturn gregturn added this to the 4.0.1 milestone Jan 4, 2023
@gregturn
Copy link
Contributor

gregturn commented Jan 4, 2023

@artemptushkin I invite you to track this ticket on our progress towards HttpClient 5 support.

@gregturn
Copy link
Contributor

gregturn commented Jan 4, 2023

As a reminder, this ticket is aimed at ADDING support for HttpClient 5, not breaking current users presently on HttpClient 4.x.

I will further check what Spring Framework is doing to see whether or not adding such support would dictate deprecating HttpClient 4 support or not.

@daromnik
Copy link

Hello, is there any news on this issue ?

@gregturn gregturn modified the milestones: 4.0.1, 4.0.2 Jan 12, 2023
@gregturn
Copy link
Contributor

I did a first cut implementing it, and the code compiled, but the test cases all broke with some mysterious "Stream already closed" exception that I have yet to debug. I'm not sure if it's how I'm using the code, or if it is simply a false expectation in the test cases that needs to be shook out.

@Facedancer1984
Copy link

Hello.
Are there any updates on this issue?

@gregturn gregturn modified the milestones: 4.0.2, 4.0.3 Feb 23, 2023
@morgan-root14
Copy link

@gregturn
Is there any update on this? Will 4.0.3 allow compatibility with Http Client 5 for the HttpComponentMessageSender?

@daromnik
Copy link

daromnik commented Apr 5, 2023

Hi, is there any news?

@gregturn gregturn modified the milestones: 4.0.3, 4.0.4 Apr 5, 2023
@gregturn gregturn removed this from the 4.0.4 milestone May 11, 2023
@gregturn
Copy link
Contributor

BTW, if anyone wants to investigate working up a pull request implements an Apache HttpClient 5.0-based HttpComponentMessageSender, I'm open to contributions!

@cachescrubber
Copy link
Contributor

@gregturn Please see and review #1356.

gregturn added a commit that referenced this issue May 12, 2023
Related: #1164.
gregturn pushed a commit that referenced this issue May 12, 2023
Resolves #1164.
Original Pull Request: #1356.

polish

polish
gregturn added a commit that referenced this issue May 12, 2023
Related: #1164.
gregturn pushed a commit that referenced this issue May 12, 2023
Resolves #1164.
Original Pull Request: #1356.

polish

polish

polish
gregturn added a commit that referenced this issue May 12, 2023
Related: #1164.
@gregturn
Copy link
Contributor

Thanks @cachescrubber!

Unfortunately, we can't drop any deprecated code in this release, but we're tracking removal on #1321. I added the components you removed back to your commit, and then added an additional polishing commit.

@gregturn gregturn added this to the 4.0.5 milestone May 12, 2023
gregturn pushed a commit that referenced this issue May 12, 2023
gregturn added a commit that referenced this issue May 12, 2023
Related: #1164.
@gregturn
Copy link
Contributor

That’s merged to main. Thanks!

@artemptushkin
Copy link

@gregturn can you please let me know when 4.0.5 will be released approximately? I tested on the snapshot - all good with me, thank you here

kmccarp pushed a commit to kmccarp/spring-projects__spring-ws that referenced this issue Jun 5, 2023
kmccarp pushed a commit to kmccarp/spring-projects__spring-ws that referenced this issue Jun 5, 2023
@artemptushkin
Copy link

@gregturn sorry for pinging, any plans regarding the release 4.0.5? Really waiting it, thank you

@amalajone
Copy link

Yeah we are waiting for 4.0.5 ws-core

@Persi
Copy link

Persi commented Jun 20, 2023

@gregturn As Release 4.0.5 is currently just blocked by a documentation issue, would it be possible to move that issue to next release and create 4.0.5? This is a blocker for migration to Spring Boot 3 for everybody who uses spring-ws with Spring Boot.

@gregturn
Copy link
Contributor

This issue has been released via https://github.com/spring-projects/spring-ws/releases/tag/v4.0.5. It should be picked up in the next release of Spring Boot.

@ammu-n15
Copy link

Can anyone share me the code for HttpComponentsMessageSender with apache http5 support for SSL context and connection pooling

@maryZil
Copy link

maryZil commented Jan 26, 2024

I use version 4.0.10 - its does not work

@mi9rom
Copy link

mi9rom commented Feb 13, 2024

Use HttpComponents5MessageSender instead of HttpComponentsMessageSender

@maryZil
Copy link

maryZil commented Feb 14, 2024

Yes! Thanks.

@VijayGogineni
Copy link

@mi9rom thanks for the suggestion, what is the import for the HttpComponents5MessageSender? I use springboot version 3. will this HttpComponents5MessageSender work for me?

@snigdhasasmal07
Copy link

snigdhasasmal07 commented Mar 27, 2024

@VijayGogineni @maryZil @mi9rom are there any solutions you found for these issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.