Skip to content

http: create an option for setting a maximum size for uri parsing#26553

Closed
caiolrm wants to merge 8 commits intonodejs:masterfrom
caiolrm:creating-http-max-uri-limit
Closed

http: create an option for setting a maximum size for uri parsing#26553
caiolrm wants to merge 8 commits intonodejs:masterfrom
caiolrm:creating-http-max-uri-limit

Conversation

@caiolrm
Copy link

@caiolrm caiolrm commented Mar 9, 2019

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: #26296
Refs: expressjs/express#3898

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. http Issues or PRs related to the http subsystem. lib / src Issues and PRs related to general changes in the lib or src directory. semver-major PRs that contain breaking changes and should be released in the next major version. stalled Issues and PRs that are stalled.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

HTTP GET Request with a long URI produces a 400 Bad Request error (should be 414)