aboutsummaryrefslogtreecommitdiffstats
path: root/net/http/parser.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-03-10 11:29:47 +0000
committerMatthew Wild <mwild1@gmail.com>2013-03-10 11:29:47 +0000
commitb33222a96c6ac68c70f457958c71d756625c24bc (patch)
tree479c845b81a7d47465c3223177a7119dbe3dd7ba /net/http/parser.lua
parent1929113b7830954ae60ad49934b3c16bf746a9ba (diff)
parentf936068a625d3e34d3e72c79e13b81fba34b28ab (diff)
downloadprosody-b33222a96c6ac68c70f457958c71d756625c24bc.tar.gz
prosody-b33222a96c6ac68c70f457958c71d756625c24bc.zip
Merge 0.9->trunk
Diffstat (limited to 'net/http/parser.lua')
-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..2545b5ac 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 and parsed_url.path) then error = true; return error_cb("invalid-url"); end
end
path = preprocess_path(parsed_url.path);
headers.host = parsed_url.host or headers.host;