Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

SPDY Header support #172

Closed
wants to merge 1 commit into from

2 participants

@neuroscr

allow : prefix for SPDY headers

@neuroscr neuroscr SPDY Header support
allow : prefix for SPDY headers
16a70cd
@indutny
Collaborator

Is it valid in terms of HTTP RFC? Seems like no, also why do you want them to be parsed by http-parser and not a spdy server?

@neuroscr

My web server uses this library for header parsing, this change was required to add SPDY support to the web server.

@neuroscr

And as far as RFC HTTP/2.0 is still in draft:
http://http2.github.io/http2-spec/#HttpRequest

@indutny
Collaborator

I'm afraid that we can't accept this patch, since this isn't a valid HTTP/1.1 header and http-parser isn't aiming to parse HTTP/2.0. It is also very unlikely that it ever will.

Thanks for contribution, anyway!

@indutny indutny closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 10, 2014
  1. @neuroscr

    SPDY Header support

    neuroscr authored
    allow : prefix for SPDY headers
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 2 deletions.
  1. +3 −2 http_parser.c
View
5 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;
}
Something went wrong with that request. Please try again.