Skip to content

Commit

Permalink
[java] Update check for content-length header
Browse files Browse the repository at this point in the history
  • Loading branch information
pujagani committed Sep 16, 2022
1 parent 9433860 commit 0b85339
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public java.net.http.HttpRequest createRequest(HttpRequest req) {
for (String name : req.getHeaderNames()) {
// Avoid explicitly setting content-length
// This prevents the IllegalArgumentException that states 'restricted header name: "Content-Length"'
if (name.equals("Content-Length")) {
if (name.equalsIgnoreCase("content-length")) {
continue;
}
for (String value : req.getHeaders(name)) {
Expand Down

0 comments on commit 0b85339

Please sign in to comment.