diff options
author | Fedor Indutny <fedor@indutny.com> | 2015-01-25 21:23:45 +0300 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2015-01-25 21:34:54 +0300 |
commit | 88aaff9aa6dd2aa2baadaf9b8d5f08e89fb77402 (patch) | |
tree | c5799a5ed61aa17e2bd1297b7d7f70954e501140 /deps | |
parent | 804ab7ebaaf5d87499e3cbce03184f064264dd2a (diff) | |
download | node-new-88aaff9aa6dd2aa2baadaf9b8d5f08e89fb77402.tar.gz |
deps: update http_parser to 2.4.2
Fix: https://github.com/iojs/io.js/issues/588
PR-URL: https://github.com/iojs/io.js/pull/604
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'deps')
-rw-r--r-- | deps/http_parser/Makefile | 2 | ||||
-rw-r--r-- | deps/http_parser/http_parser.c | 2 | ||||
-rw-r--r-- | deps/http_parser/http_parser.h | 2 | ||||
-rw-r--r-- | deps/http_parser/test.c | 49 |
4 files changed, 53 insertions, 2 deletions
diff --git a/deps/http_parser/Makefile b/deps/http_parser/Makefile index 3600503bd0..a032dcf6b9 100644 --- a/deps/http_parser/Makefile +++ b/deps/http_parser/Makefile @@ -19,7 +19,7 @@ # IN THE SOFTWARE. PLATFORM ?= $(shell sh -c 'uname -s | tr "[A-Z]" "[a-z]"') -SONAME ?= libhttp_parser.so.2.4.1 +SONAME ?= libhttp_parser.so.2.4.2 CC?=gcc AR?=ar diff --git a/deps/http_parser/http_parser.c b/deps/http_parser/http_parser.c index 3e114c02ca..c0e7ca15fb 100644 --- a/deps/http_parser/http_parser.c +++ b/deps/http_parser/http_parser.c @@ -1618,6 +1618,8 @@ size_t http_parser_execute (http_parser *parser, h_state = h_matching_connection_upgrade; } else if (STRICT_TOKEN(c)) { h_state = h_matching_connection_token; + } else if (c == ' ' || c == '\t') { + /* Skip lws */ } else { h_state = h_general; } diff --git a/deps/http_parser/http_parser.h b/deps/http_parser/http_parser.h index 640ffa0ac3..cb592952f5 100644 --- a/deps/http_parser/http_parser.h +++ b/deps/http_parser/http_parser.h @@ -27,7 +27,7 @@ extern "C" { /* Also update SONAME in the Makefile whenever you change these. */ #define HTTP_PARSER_VERSION_MAJOR 2 #define HTTP_PARSER_VERSION_MINOR 4 -#define HTTP_PARSER_VERSION_PATCH 1 +#define HTTP_PARSER_VERSION_PATCH 2 #include <sys/types.h> #if defined(_WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600) diff --git a/deps/http_parser/test.c b/deps/http_parser/test.c index 6c45d59d0c..aae0f73983 100644 --- a/deps/http_parser/test.c +++ b/deps/http_parser/test.c @@ -986,6 +986,55 @@ const struct message requests[] = ,.body= "" } +#define CONNECTION_MULTI_LWS 36 +, {.name = "multiple connection header values with folding and lws" + ,.type= HTTP_REQUEST + ,.raw= "GET /demo HTTP/1.1\r\n" + "Connection: keep-alive, upgrade\r\n" + "Upgrade: WebSocket\r\n" + "\r\n" + "Hot diggity dogg" + ,.should_keep_alive= TRUE + ,.message_complete_on_eof= FALSE + ,.http_major= 1 + ,.http_minor= 1 + ,.method= HTTP_GET + ,.query_string= "" + ,.fragment= "" + ,.request_path= "/demo" + ,.request_url= "/demo" + ,.num_headers= 2 + ,.upgrade="Hot diggity dogg" + ,.headers= { { "Connection", "keep-alive, upgrade" } + , { "Upgrade", "WebSocket" } + } + ,.body= "" + } + +#define CONNECTION_MULTI_LWS_CRLF 37 +, {.name = "multiple connection header values with folding and lws" + ,.type= HTTP_REQUEST + ,.raw= "GET /demo HTTP/1.1\r\n" + "Connection: keep-alive, \r\n upgrade\r\n" + "Upgrade: WebSocket\r\n" + "\r\n" + "Hot diggity dogg" + ,.should_keep_alive= TRUE + ,.message_complete_on_eof= FALSE + ,.http_major= 1 + ,.http_minor= 1 + ,.method= HTTP_GET + ,.query_string= "" + ,.fragment= "" + ,.request_path= "/demo" + ,.request_url= "/demo" + ,.num_headers= 2 + ,.upgrade="Hot diggity dogg" + ,.headers= { { "Connection", "keep-alive, upgrade" } + , { "Upgrade", "WebSocket" } + } + ,.body= "" + } , {.name= NULL } /* sentinel */ }; |