Diff

net/http/parser.lua @ 5322:8d525f58f916

net.http.parser: Fix traceback on invalid URL in status line.
author Waqas Hussain <waqas20@gmail.com>
date Fri, 08 Feb 2013 00:18:40 +0500
parent 5291:01f7522049fb
child 5323:4c30f638ff55
line wrap: on
line diff
--- a/net/http/parser.lua	Thu Jan 31 18:41:01 2013 +0100
+++ b/net/http/parser.lua	Fri Feb 08 00:18:40 2013 +0500
@@ -99,6 +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
 						end
 						path = preprocess_path(parsed_url.path);
 						headers.host = parsed_url.host or headers.host;