ApacheHttpClient unreleased socket
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.8k
- Forks
- 1.9k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 41
Description
the Openfeign client - ApacheHttpClient - does not explicitly close the socket connection after reading the http response.
The recommended approach according to the examples specified in the Apache HttpComponents is to explicitly call CloseableHttpResponse#close() from a finally clause.
Example from apache readme
This might lead to resource leaks due to unreleased socket resources in the event of errors and other exception scenarios.
after reading the response the program should explicitly close the socket
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in httpclient/src/main/java/feign/httpclient/ApacheHttpClient.java at the response handling around line 169, and compare it with the Apache HttpComponents close-response example linked in the issue. Done means the response explicitly closes on normal and exception paths; validate the change with the HTTP client tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100