net.http.parser: Fix traceback on invalid URL in status line.

remotes/origin/0.11
Waqas Hussain 13 years ago
parent 5cfdac70c6
commit 4337cb5267
  1. 1
      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;

Loading…
Cancel
Save