Skip to content

Commit

Permalink
Merge pull request #2344 from dentarg/max-path-length/fix-typo
Browse files Browse the repository at this point in the history
Fix typo in maximum URI path length
  • Loading branch information
nateberkopec committed Aug 26, 2020
2 parents fbce7c5 + 0b5db45 commit 68c030c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions History.md
Expand Up @@ -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)
Expand Down Expand Up @@ -66,7 +66,7 @@
* JSON parse cluster worker stats instead of regex (#2124)
* Support parallel tests in verbose progress reporting (#2223)
* Refactor error handling in server accept loop (#2239)

## 4.3.4/4.3.5 and 3.12.5/3.12.6 / 2020-05-22

Each patchlevel release contains a separate security fix. We recommend simply upgrading to 4.3.5/3.12.6.
Expand Down
2 changes: 1 addition & 1 deletion ext/puma_http11/puma_http11.c
Expand Up @@ -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)));

Expand Down
4 changes: 2 additions & 2 deletions test/test_http11.rb
Expand Up @@ -144,14 +144,14 @@ def test_max_uri_path_length
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
Expand Down

0 comments on commit 68c030c

Please sign in to comment.