net/http: readRequest doesn't check URL length #38901
Labels
FeatureRequest
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I was exploring the
net/http
package to see if the HTTP431 Request Header Fields Too Large
and414 URI Too Long
codes were handled already so I don't have to do it myself. I found out that431
is handled, but414 URI Too Long
is not.What did you expect to see?
The server should return a
414 URI Too Long
error code if the request URI is longer than aMaxURIBytes
field added to theServer
struct, in the same fashion asMaxHeaderBytes
for431 Request Header Fields Too Large
.A good default value would be
8190
bytes, as it's the default one in Apache.What did you see instead?
Nothing. This feature is not implemented.
The text was updated successfully, but these errors were encountered: