Skip to content

Commit

Permalink
Update Client.java
Browse files Browse the repository at this point in the history
Fix Isuue OpenFeign#1721 Content-Length may be added twice
  • Loading branch information
izdt committed Jan 25, 2024
1 parent 03856f5 commit 61333de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/java/feign/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ HttpURLConnection convertAndSend(Request request, Options options) throws IOExce
}
}
// Avoid add "Accept-encoding" twice or more when "compression" option is enabled
if (field.equals(ACCEPT_ENCODING)) {
else if (field.equals(ACCEPT_ENCODING)) {
connection.addRequestProperty(field, String.join(", ", request.headers().get(field)));
break;
} else {
Expand Down

0 comments on commit 61333de

Please sign in to comment.