From 282d4be092757663ffe1ad1af4f27d503f5893b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6nke=20Ludwig?= Date: Fri, 8 Nov 2013 16:35:57 +0100 Subject: [PATCH] Disable RFC822 compatible behavior for duplicate header fields in the 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. --- source/vibe/http/client.d | 2 +- source/vibe/http/server.d | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/vibe/http/client.d b/source/vibe/http/client.d index 0b88d01f7f..bd9077308d 100644 --- a/source/vibe/http/client.d +++ b/source/vibe/http/client.d @@ -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:"); diff --git a/source/vibe/http/server.d b/source/vibe/http/server.d index 8f572c4826..6e0e5a0e39 100644 --- a/source/vibe/http/server.d +++ b/source/vibe/http/server.d @@ -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);