From 16a70cdcad03dc8877e054ba9bb86474a8946ef5 Mon Sep 17 00:00:00 2001 From: Ryan Tharp Date: Mon, 10 Mar 2014 10:50:51 -0700 Subject: [PATCH] SPDY Header support allow : prefix for SPDY headers --- http_parser.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/http_parser.c b/http_parser.c index a131a386..2e0e098a 100644 --- a/http_parser.c +++ b/http_parser.c @@ -99,7 +99,7 @@ do { \ FOR##_mark = NULL; \ } \ } while (0) - + /* Run the data callback FOR and consume the current byte */ #define CALLBACK_DATA(FOR) \ CALLBACK_DATA_(FOR, p - FOR##_mark, p - data + 1) @@ -1237,7 +1237,8 @@ size_t http_parser_execute (http_parser *parser, c = TOKEN(ch); - if (!c) { + // allow : prefix for SPDY headers + if (!c && ch!=':') { SET_ERRNO(HPE_INVALID_HEADER_TOKEN); goto error; }