1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Fix typo in maximum URI path length

Follow-up to https://github.com/puma/puma/pull/2168
This commit is contained in:
Patrik Ragnarsson 2020-08-23 11:38:24 +02:00
parent fbce7c5f76
commit 0b5db45d0d
3 changed files with 5 additions and 5 deletions

View file

@ -11,7 +11,7 @@
* EXPERIMENTAL: Added `nakayoshi_fork` option. Reduce memory usage in preloaded cluster-mode apps by GCing before fork and compacting, where available. (#2093, #2256)
* Added pumactl `thread-backtraces` command to print thread backtraces (#2054)
* Added incrementing `requests_count` to `Puma.stats`. (#2106)
* Increased maximum URI path length from 2048 to 8196 bytes (#2167)
* Increased maximum URI path length from 2048 to 8192 bytes (#2167, #2344)
* `lowlevel_error_handler` is now called during a forced threadpool shutdown, and if a callable with 3 arguments is set, we now also pass the status code (#2203)
* Faster phased restart and worker timeout (#2220)
* Added `state_permission` to config DSL to set state file permissions (#2238)

View file

@ -54,7 +54,7 @@ DEF_MAX_LENGTH(FIELD_NAME, 256);
DEF_MAX_LENGTH(FIELD_VALUE, 80 * 1024);
DEF_MAX_LENGTH(REQUEST_URI, 1024 * 12);
DEF_MAX_LENGTH(FRAGMENT, 1024); /* Don't know if this length is specified somewhere or not */
DEF_MAX_LENGTH(REQUEST_PATH, 8196);
DEF_MAX_LENGTH(REQUEST_PATH, 8192);
DEF_MAX_LENGTH(QUERY_STRING, (1024 * 10));
DEF_MAX_LENGTH(HEADER, (1024 * (80 + 32)));

View file

@ -144,14 +144,14 @@ class Http11ParserTest < Minitest::Test
parser = Puma::HttpParser.new
req = {}
# Support URI path length to a max of 8196
# Support URI path length to a max of 8192
path = "/" + rand_data(7000, 100)
http = "GET #{path} HTTP/1.1\r\n\r\n"
parser.execute(req, http, 0)
assert_equal path, req['REQUEST_PATH']
parser.reset
# Raise exception if URI path length > 8196
# Raise exception if URI path length > 8192
path = "/" + rand_data(9000, 100)
http = "GET #{path} HTTP/1.1\r\n\r\n"
assert_raises Puma::HttpParserError do