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

Make HTTP_MAX_HEADER_SIZE configurable via gyp #452

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
14 changes: 12 additions & 2 deletions http_parser.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@
],
},

'variables': {
'http_max_header_size%': '8192'
Copy link
Member Author

Choose a reason for hiding this comment

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

@bnoordhuis do you think we should change this back to 80KB here? We will be passing down the variable anyway in Node.js.

Copy link
Member

Choose a reason for hiding this comment

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

I guess it won't hurt backwards compatibility but truthfully, I picked the 80 kb limit at random.

},

'targets': [
{
'target_name': 'http_parser',
Expand All @@ -56,7 +60,10 @@
'defines': [ 'HTTP_PARSER_STRICT=0' ],
'include_dirs': [ '.' ],
},
'defines': [ 'HTTP_PARSER_STRICT=0' ],
'defines': [
'HTTP_MAX_HEADER_SIZE=<(http_max_header_size)',
'HTTP_PARSER_STRICT=0'
],
'sources': [ './http_parser.c', ],
'conditions': [
['OS=="win"', {
Expand All @@ -79,7 +86,10 @@
'defines': [ 'HTTP_PARSER_STRICT=1' ],
'include_dirs': [ '.' ],
},
'defines': [ 'HTTP_PARSER_STRICT=1' ],
'defines': [
'HTTP_MAX_HEADER_SIZE=<(http_max_header_size)',
'HTTP_PARSER_STRICT=1'
],
'sources': [ './http_parser.c', ],
'conditions': [
['OS=="win"', {
Expand Down