aboutsummaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2013-02-08 00:18:40 +0500
committerWaqas Hussain <waqas20@gmail.com>2013-02-08 00:18:40 +0500
commit8e10516c29598fac76181c338e878cc5de7258aa (patch)
treef480bf3e6a0025af2cc6f11b943138cd8099bf6e /net/http
parent517296667e0fa74dd441892cf9750101ae31e814 (diff)
downloadprosody-8e10516c29598fac76181c338e878cc5de7258aa.tar.gz
prosody-8e10516c29598fac76181c338e878cc5de7258aa.zip
net.http.parser: Fix traceback on invalid URL in status line.
Diffstat (limited to 'net/http')
-rw-r--r--net/http/parser.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/http/parser.lua b/net/http/parser.lua
index 64cf38c0..9fd707d1 100644
--- a/net/http/parser.lua
+++ b/net/http/parser.lua
@@ -99,6 +99,7 @@ function httpstream.new(success_cb, error_cb, parser_type, options_cb)
parsed_url = { path = _path, query = _query };
else
parsed_url = url_parse(path);
+ if not parsed_url then error = true; return error_cb("invalid-url"); end
end
path = preprocess_path(parsed_url.path);
headers.host = parsed_url.host or headers.host;