Skip to content

Commit

Permalink
Disable RFC822 compatible behavior for duplicate header fields in the…
Browse files Browse the repository at this point in the history
… HTTP client/server. Fixes #380.

Nothing in the HTTP client or server currently depends on the old behavior, so it should be save to make the transition here. Other parts where parseRFC5322Header is used will not be affected.
  • Loading branch information
s-ludwig committed Nov 8, 2013
1 parent 862cb7d commit 282d4be
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion source/vibe/http/client.d
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ final class HTTPClientResponse : HTTPResponse {
}

// read headers until an empty line is hit
parseRFC5322Header(client.m_stream, this.headers, HTTPClient.maxHeaderLineLength, alloc);
parseRFC5322Header(client.m_stream, this.headers, HTTPClient.maxHeaderLineLength, alloc, false);

logTrace("---------------------");
logTrace("HTTP client response:");
Expand Down
2 changes: 1 addition & 1 deletion source/vibe/http/server.d
Original file line number Diff line number Diff line change
Expand Up @@ -1439,7 +1439,7 @@ private void parseRequestHeader(HTTPServerRequest req, InputStream http_stream,
req.httpVersion = parseHTTPVersion(reqln);

//headers
parseRFC5322Header(stream, req.headers, MaxHTTPHeaderLineLength, alloc);
parseRFC5322Header(stream, req.headers, MaxHTTPHeaderLineLength, alloc, false);

foreach (k, v; req.headers)
logTrace("%s: %s", k, v);
Expand Down

0 comments on commit 282d4be

Please sign in to comment.