From ded5763b4ef26dbae59ca7990ada3e37c57d660a Mon Sep 17 00:00:00 2001 From: Stephan Bosch Date: Wed, 18 Sep 2013 23:24:22 +0300 Subject: [PATCH] uri-util: Improved authority 'host' parse error. --- src/lib/uri-util.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/uri-util.c b/src/lib/uri-util.c index 04e45c8177..4e280cf6fe 100644 --- a/src/lib/uri-util.c +++ b/src/lib/uri-util.c @@ -543,7 +543,10 @@ int uri_parse_authority(struct uri_parser *parser, /* host */ if ((ret = uri_parse_host(parser, auth)) <= 0) { if (ret == 0) { - parser->error = "Missing 'host' component"; + if (p == parser->end || *p == ':' || *p == '/') + parser->error = "Missing 'host' component"; + else + parser->error = "Invalid 'host' component"; return -1; } return ret; -- 2.47.3