Skip to content

Commit

Permalink
add comment for adding Content-Length header
Browse files Browse the repository at this point in the history
  • Loading branch information
jay-choe committed Sep 18, 2024
1 parent bbec180 commit 30079f9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions core/src/main/java/feign/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ else if (field.equals(ACCEPT_ENCODING)) {
}

if (body == null && request.httpMethod().isWithBody()) {
// To use this Header, set sun.net.http.allowRestrictedHeaders true.
connection.addRequestProperty("Content-Length", "0");
}

Expand Down

0 comments on commit 30079f9

Please sign in to comment.