Changeset

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
parents 5320:518d864b2ab8
children 5323:4c30f638ff55
files net/http/parser.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
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;