File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change 189189 dest = 'experimental_http_parser' ,
190190 help = 'use llhttp instead of http_parser' )
191191
192+ parser .add_option ('--http-max-header-size' ,
193+ action = 'store' ,
194+ default = '8192' ,
195+ help = 'set the max size of HTTP headers [default: %default]' )
196+
192197shared_optgroup .add_option ('--shared-http-parser' ,
193198 action = 'store_true' ,
194199 dest = 'shared_http_parser' ,
@@ -1594,7 +1599,11 @@ def make_bin_override():
15941599
15951600configure_node (output )
15961601configure_library ('zlib' , output )
1602+
1603+ # configure http_parser
15971604configure_library ('http_parser' , output )
1605+ output ['variables' ]['http_max_header_size' ] = options .http_max_header_size
1606+
15981607configure_library ('libuv' , output )
15991608configure_library ('libcares' , output )
16001609configure_library ('nghttp2' , output )
Original file line number Diff line number Diff line change 4747 ],
4848 },
4949
50+ 'variables' : {
51+ 'http_max_header_size%' : '8192'
52+ },
53+
5054 'targets' : [
5155 {
5256 'target_name' : 'http_parser' ,
5660 'defines' : [ 'HTTP_PARSER_STRICT=0' ],
5761 'include_dirs' : [ '.' ],
5862 },
59- 'defines' : [ 'HTTP_MAX_HEADER_SIZE=8192 ' , 'HTTP_PARSER_STRICT=0' ],
63+ 'defines' : [ 'HTTP_MAX_HEADER_SIZE=<(http_max_header_size) ' , 'HTTP_PARSER_STRICT=0' ],
6064 'sources' : [ './http_parser.c' , ],
6165 'conditions' : [
6266 ['OS=="win"' , {
7983 'defines' : [ 'HTTP_PARSER_STRICT=1' ],
8084 'include_dirs' : [ '.' ],
8185 },
82- 'defines' : [ 'HTTP_MAX_HEADER_SIZE=8192 ' , 'HTTP_PARSER_STRICT=1' ],
86+ 'defines' : [ 'HTTP_MAX_HEADER_SIZE=<(http_max_header_size) ' , 'HTTP_PARSER_STRICT=1' ],
8387 'sources' : [ './http_parser.c' , ],
8488 'conditions' : [
8589 ['OS=="win"' , {
Original file line number Diff line number Diff line change 88 # all obj files in static libs into the executable or shared lib.
99 'variables' : {
1010 'variables' : {
11+ 'http_max_header_size%' : 8192 ,
1112 'variables' : {
1213 'force_load%' : 'true' ,
1314 'current_type%' : '<(_type)' ,
168169 'dependencies' : [ 'deps/llhttp/llhttp.gyp:llhttp' ],
169170 }, {
170171 'conditions' : [ [ 'node_shared_http_parser=="false"' , {
172+ 'defines' : [ 'HTTP_MAX_HEADER_SIZE=<(http_max_header_size)' ],
171173 'dependencies' : [ 'deps/http_parser/http_parser.gyp:http_parser' ],
172174 } ] ],
173175 } ],
You can’t perform that action at this time.
0 commit comments