Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

puma/http_parser: support duplicate headers #818

Merged
merged 2 commits into from
Nov 6, 2015
Merged

puma/http_parser: support duplicate headers #818

merged 2 commits into from
Nov 6, 2015

Commits on Nov 6, 2015

  1. ext/puma_http11: handle duplicate headers as per RFC for C ext

    The parser stores headers in a Ruby hash table so that when a header
    is found twice its value replaces the old one. As per RFC[1] this is
    not correct, since duplicated headers should all be considered. In
    particular, they are semantically equivalent to a single header with
    comma separated values. In this case, we follow existing practice of
    joining values with a comma and a single space character.
    
    [1] See RFC2616 section 4.2:
        http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
    unleashed committed Nov 6, 2015
    Configuration menu
    Copy the full SHA
    fdfd7b5 View commit details
    Browse the repository at this point in the history
  2. ext/puma_http11: handle duplicate headers as per RFC for Java ext

    The parser stores headers in a Ruby hash table so that when a header
    is found twice its value replaces the old one. As per RFC[1] this is
    not correct, since duplicated headers should all be considered. In
    particular, they are semantically equivalent to a single header with
    comma separated values. In this case, we follow existing practice of
    joining values with a comma and a single space character.
    
    [1] See RFC2616 section 4.2:
        http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
    unleashed committed Nov 6, 2015
    Configuration menu
    Copy the full SHA
    800cfee View commit details
    Browse the repository at this point in the history