-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GH-9489: Remove
Content-Length
HTTP before sending GET request
Fixes: #9489 Issue link: #9489 If request message has a `Content-Length` HTTP, it is still mapped to the target HTTP request even if that one is indicated as "no-body" (`GET`, `HEAD`, `TRACE`). In this case Netty fails to decode such a missed body with error: ``` java.lang.IllegalArgumentException: text is empty (possibly HTTP/0.9)), version: HTTP/1.0 ``` * Since `Content-Length` is not supposed to be supported for those methods, remove it altogether from the HTTP request headers * Add nullability API into the `org.springframework.integration.http.outbound` * Check received HTTP request on the server side that it does not have such a header for `GET` **Auto-cherry-pick to `6.3.x` & `6.2.x`**
- Loading branch information
1 parent
a6f9e78
commit 891dca7
Showing
4 changed files
with
55 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
...ration-http/src/main/java/org/springframework/integration/http/outbound/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
/** | ||
* Provides classes supporting outbound endpoints. | ||
*/ | ||
@org.springframework.lang.NonNullApi | ||
@org.springframework.lang.NonNullFields | ||
package org.springframework.integration.http.outbound; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters