-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTP GET Request with a long URI produces a 400 Bad Request error (should be 414) #26296
Comments
It will soon (Node.js 12) return 431 instead of a generic 400. See #25605. The code returned is the same ( |
You can distinguish between them when an on_url callback has been observed but no on_status or on_header_field callbacks. I'm inclined to say it's not worth the additional complexity though. |
The http server wasn't able to tell exactly what caused an HPE_HEADER_OVERFLOW, meaning it would yield a 431 error even if what caused it was the request URI being too long. This adds a limit to the URI sizes through a new option called max-http-uri-size, which will be checked against the actual URIs after on_url callback at the node_http_parser_impl file. Fixes: nodejs#26296 Refs: expressjs/express#3898
Is there anything actionable here? |
Fixed by #25605 |
Performing a GET request with a URI too long (as specified in https://github.com/nodejs/http-parser/blob/master/http_parser.h#L55) throws a 400 Bad Request error. This should be a 414 URI Too Long.
The text was updated successfully, but these errors were encountered: