Skip to content

header_io.ml''s parse doesn't support multi-line "folded" headers #1033

@askvortsov1

Description

@askvortsov1

The HTTP 1.1 spec allows for header values to be split across several lines:

HTTP/1.1 header field values can be folded onto multiple lines if the
continuation line begins with a space or horizontal tab. All linear
white space, including folding, has the same semantics as SP. A
recipient MAY replace any linear white space with a single SP before
interpreting the field value or forwarding the message downstream.

For example:

Header: value1, value2

should be parsed equivalently to:

Header: value1,
        value2

This has since been deprecated except for use within the message/http media type, but this occasionally pops up in the wild, and other HTTP header parsers support it according to this StackOverflow answer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions