summaryrefslogtreecommitdiff
path: root/deps
diff options
context:
space:
mode:
authorChris Bargren <cbargren@gmail.com>2015-12-28 07:40:15 -0700
committerChris Bargren <cbargren@gmail.com>2015-12-28 07:40:15 -0700
commit0b1e6e42e3cc94e746a3a9453dd9b0702062b757 (patch)
tree6bf0d01720bb4e5300dedb13df3c4f9dcd39c72b /deps
parent0c1f56722bbcba16b90d82411ed02f66622fc03a (diff)
downloadlibgit2-0b1e6e42e3cc94e746a3a9453dd9b0702062b757.tar.gz
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
Diffstat (limited to 'deps')
-rw-r--r--deps/http-parser/http_parser.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/deps/http-parser/http_parser.c b/deps/http-parser/http_parser.c
index b793d7011..27bdd2081 100644
--- a/deps/http-parser/http_parser.c
+++ b/deps/http-parser/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)
@@ -444,6 +444,9 @@ parse_url_char(enum state s, const char ch)
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)) {
return s_req_schema;
}
@@ -451,7 +454,7 @@ parse_url_char(enum state s, const char ch)
break;
case s_req_schema:
- if (IS_ALPHA(ch) || ch == '+') {
+ if (IS_ALPHANUM(ch) || ch == '+' || ch == '-' || ch == '.') {
return s;
}