# HG changeset patch # User Waqas Hussain # Date 1360265279 -18000 # Node ID 4c30f638ff55c569d4f144266267392d07686ad3 # Parent 8d525f58f916f112c0edaf1ff8008b4c76d1fa71 net.http.parser: Ensure full URL in status line contains a path. diff -r 8d525f58f916 -r 4c30f638ff55 net/http/parser.lua --- a/net/http/parser.lua Fri Feb 08 00:18:40 2013 +0500 +++ b/net/http/parser.lua Fri Feb 08 00:27:59 2013 +0500 @@ -99,7 +99,7 @@ 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 + 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;