Skip to content

Commit

Permalink
HTTPCLIENT-2361: Tolerate multiple Cookie headers added by the caller
Browse files Browse the repository at this point in the history
  • Loading branch information
ok2c committed Feb 6, 2025
1 parent a68d4a2 commit a1243ed
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,8 @@ public void process(final HttpRequest request, final EntityDetails entity, final
return;
}

final Header cookieHeader = request.getHeader(HttpHeaders.COOKIE);
// Check if a Cookie header is already present
if (cookieHeader != null) {
if (request.containsHeader(HttpHeaders.COOKIE)) {
if (LOG.isDebugEnabled()) {
LOG.debug("Skipping cookie addition, Cookie header already present in the request");
}
Expand Down

0 comments on commit a1243ed

Please sign in to comment.