Commit 0b1e6e42 by Chris Bargren

Updating change to http_parser to reflect PR for nodejs/http-parser

The parser now also supports digits, '-' and '.'. https://github.com/nodejs/http-parser/pull/276
parent 0c1f5672
...@@ -444,6 +444,9 @@ parse_url_char(enum state s, const char ch) ...@@ -444,6 +444,9 @@ parse_url_char(enum state s, const char ch)
return s_req_path; return s_req_path;
} }
/* The schema must start with an alpha character. After that, it may
* consist of digits, '+', '-' or '.', followed by a ':'.
*/
if (IS_ALPHA(ch)) { if (IS_ALPHA(ch)) {
return s_req_schema; return s_req_schema;
} }
...@@ -451,7 +454,7 @@ parse_url_char(enum state s, const char ch) ...@@ -451,7 +454,7 @@ parse_url_char(enum state s, const char ch)
break; break;
case s_req_schema: case s_req_schema:
if (IS_ALPHA(ch) || ch == '+') { if (IS_ALPHANUM(ch) || ch == '+' || ch == '-' || ch == '.') {
return s; return s;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment