Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 72f0e50

Browse files
committedMar 22, 2024·
Minor wording
1 parent 5fa3723 commit 72f0e50

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed
 

‎cloudplatform/connectivity-apache-httpclient4/src/main/java/com/sap/cloud/sdk/cloudplatform/connectivity/DefaultCsrfTokenRetriever.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,11 @@ private Header retrieveCsrfTokenResponseHeader(
8989
// Additional headers
9090
headers.forEach(( k, values ) -> values.forEach(v -> csrfTokenRequest.addHeader(k, v)));
9191

92-
//The service path gets appended to the destination URI inside the execute request
92+
// The service path gets appended to the destination URI inside the execute request
9393
final HttpResponse csrfResponse = httpClient.execute(csrfTokenRequest);
9494
final Header header = csrfResponse.getFirstHeader(X_CSRF_TOKEN_HEADER_KEY);
9595

96-
// consume and close HTTP input stream
96+
// Consume the HttpEntity and close the connection
9797
EntityUtils.consume(csrfResponse.getEntity());
9898

9999
if( header == null || header.getValue() == null ) {

‎release_notes.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616

1717
### 📈 Improvements
1818

19-
- Close CSRF Token Retrieval response `HttpEntity` and underlying `InputStream` manually.
20-
In case of an error the connection will be closed eagerly.
19+
- Consume CSRF Token Retrieval response `HttpEntity` manually, thus closing underlying `InputStream` eagerly.
20+
In case of an error the connection will not be left open, waiting to be closed by connection manager.
2121

2222
### 🐛 Fixed Issues
2323

0 commit comments

Comments
 (0)
Please sign in to comment.