nodejs/node

allow insecure-http-header parsing to be requested per server

Closed this issue · 2 comments

Is your feature request related to a problem? Please describe.
Please describe the problem you are trying to solve.

Some servers deviate from HTTP spec enougth that Node.js can't communicate with them, but "work" when --insecure-http-parser is enabled globally. It would be useful to be able to use this mode, as a client, only when connecting to known bad servers.

See: #30567 (comment)

cc: @addaleax

Sounds good! I’m assuming we could implement this the same way we’re doing it for maxHeaderSize? I’m happy to take this on if you like.

The global flag was a necessity, IMO, see #30567 (comment), but per connection would be nice, too.

@addaleax To be clear, I'm not personally requesting this. It seems like a nice API addition, and at least 1 person has asked for it , and you mentioned an interest, but maybe its a good first contribution for someone else. As you wish.