aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMichael Kaufmann <mail@michael-kaufmann.ch>2016-04-06 14:08:15 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-04-06 14:35:08 +0200
commit3a8e38de2e56dea3ee3ce9ccb48ac9c4cf2dd5ee (patch)
tree13eb71bf33598c6eef81973453a8d54cfcfea517 /lib
parenta24f71aac4a3e94dac37208959cf2208c3d8f724 (diff)
HTTP2: Add a space character after the status code
The space character after the status code is mandatory, even if the reason phrase is empty (see RFC 7230 section 3.1.2) Closes #755
Diffstat (limited to 'lib')
-rw-r--r--lib/http2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/http2.c b/lib/http2.c
index fd3cefe4b..5305eb71e 100644
--- a/lib/http2.c
+++ b/lib/http2.c
@@ -832,7 +832,8 @@ static int on_header(nghttp2_session *session, const nghttp2_frame *frame,
Curl_add_buffer(stream->header_recvbuf, "HTTP/2.0 ", 9);
Curl_add_buffer(stream->header_recvbuf, value, valuelen);
- Curl_add_buffer(stream->header_recvbuf, "\r\n", 2);
+ /* the space character after the status code is mandatory */
+ Curl_add_buffer(stream->header_recvbuf, " \r\n", 3);
data_s->state.drain++;
/* if we receive data for another handle, wake that up */
if(conn->data != data_s)