projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bf3ecf9
)
net.http.parser: Fix traceback on invalid URL in status line.
author
Waqas Hussain
<waqas20@gmail.com>
Thu, 7 Feb 2013 19:18:40 +0000
(
00:18
+0500)
committer
Waqas Hussain
<waqas20@gmail.com>
Thu, 7 Feb 2013 19:18:40 +0000
(
00:18
+0500)
net/http/parser.lua
patch
|
blob
|
history
diff --git
a/net/http/parser.lua
b/net/http/parser.lua
index 64cf38c0fc1bef6a3351ed2dff21aa096fac3470..9fd707d13c65aa7963a52bba74e2cb6d11a11ea0 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);
+ 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;