diff options
Diffstat (limited to 'net/http/parser.lua')
-rw-r--r-- | net/http/parser.lua | 1 |
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; |