projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net.dns: Make sure argument to math.randomseed does not overflow a 32 bit unsigned...
[prosody.git]
/
net
/
http
/
parser.lua
diff --git
a/net/http/parser.lua
b/net/http/parser.lua
index 64cf38c0fc1bef6a3351ed2dff21aa096fac3470..2545b5ac41457b88e345f5a6743650052e43ff40 100644
(file)
--- 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);
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;
end
path = preprocess_path(parsed_url.path);
headers.host = parsed_url.host or headers.host;