Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Increase default HTTP_MAX_HEADER_SIZE to 16kb #484

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion http_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ typedef unsigned __int64 uint64_t;
* to a very large number (e.g. -DHTTP_MAX_HEADER_SIZE=0x7fffffff)
*/
#ifndef HTTP_MAX_HEADER_SIZE
# define HTTP_MAX_HEADER_SIZE (80*1024)
# define HTTP_MAX_HEADER_SIZE (160*1024)
Copy link
Contributor

@ploxiln ploxiln Jun 20, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this changes the default of 80 KiB to 160 KiB

(nodejs was already setting a different max header size - either using http_parser_set_max_header_size(), or not using this http-parser at all, but rather https://github.com/nodejs/llparse - I'm not sure)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep! I see that now. I'll investigate where this is supposed to go. I do wonder if this value should be set to the same as wherever else it is set in node?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#endif

typedef struct http_parser http_parser;
Expand Down