From 66c4e463e9eb34613f9a7416f35779e8c96c4657 Mon Sep 17 00:00:00 2001 From: "C. Guy Yarvin" Date: Wed, 13 Nov 2013 21:25:24 -0800 Subject: [PATCH] Fix some http-parser bugs; clean up dill. --- outside/jhttp/http_parser.c | 5 +++-- v/http.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/outside/jhttp/http_parser.c b/outside/jhttp/http_parser.c index e46ca4fa5..947434088 100755 --- a/outside/jhttp/http_parser.c +++ b/outside/jhttp/http_parser.c @@ -410,8 +410,9 @@ int http_message_needs_eof(http_parser *parser); static enum state parse_url_char(enum state s, const char ch, int is_connect) { - assert(!isspace(ch)); - + if ( isspace(ch) ) { + return s_dead; + } switch (s) { case s_req_spaces_before_url: if (ch == '/' || ch == '*') { diff --git a/v/http.c b/v/http.c index 255e11335..4e32f4989 100644 --- a/v/http.c +++ b/v/http.c @@ -642,7 +642,7 @@ _http_heds_to_list(u2_hhed* hed_u) return u2_nul; } else { return u2nc(u2nc(u2_ci_string(hed_u->nam_c), - u2_ci_string(hed_u->val_c)), + hed_u->val_c ? u2_ci_string(hed_u->val_c) : u2_nul), _http_heds_to_list(hed_u->nex_u)); } }