-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add toggle to allow empty
Content-Length headers
In go 1.22, they are changing the default behavior in the `net/http` standard library to **REJECT** requests and responses containing an invalid, empty `Content-Length` header. Source: https://tip.golang.org/doc/go1.22#minor_library_changes As per the authors, > The previous behavior may be restored by setting GODEBUG field httplaxcontentlength=1. This commit enables operators to set this GODEBUG field by configuring `gorouter`'s `go.httplaxcontentlength` property. By default, this property will be disabled and gorouter will begin to reject requests that contain invlaid, empty `Content-Length` headers. [#187125229](https://www.pivotaltracker.com/story/show/187125229)
- Loading branch information
1 parent
ae27eed
commit 7f87626
Showing
3 changed files
with
37 additions
and
0 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
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