--insecure-http-parser


在 HTTP 解析器上启用宽大标志。这可能允许与不一致的 HTTP 实现的互操作性。

¥Enable leniency flags on the HTTP parser. This may allow interoperability with non-conformant HTTP implementations.

启用后,解析器将接受以下内容:

¥When enabled, the parser will accept the following:

  • HTTP 标头值无效。

    ¥Invalid HTTP headers values.

  • 无效的 HTTP 版本。

    ¥Invalid HTTP versions.

  • 允许包含 Transfer-EncodingContent-Length 标头的消息。

    ¥Allow message containing both Transfer-Encoding and Content-Length headers.

  • Connection: close 存在时,允许在消息后添加额外数据。

    ¥Allow extra data after message when Connection: close is present.

  • 提供 chunked 后允许额外的传输编码。

    ¥Allow extra transfer encodings after chunked has been provided.

  • 允许使用 \n 而不是 \r\n 作为标记分隔符。

    ¥Allow \n to be used as token separator instead of \r\n.

  • 允许在块之后不提供 \r\n

    ¥Allow \r\n not to be provided after a chunk.

  • 允许在块大小之后和 \r\n 之前存在空格。

    ¥Allow spaces to be present after a chunk size and before \r\n.

上述所有内容都会使你的应用暴露于请求走私或投毒攻击。避免使用此选项。

¥All the above will expose your application to request smuggling or poisoning attack. Avoid using this option.