Changeset

5291:01f7522049fb

net.http.parser: Abort if no status line is received.
author Kim Alvefur <zash@zash.se>
date Tue, 08 Jan 2013 13:33:01 +0100
parents 5290:befb1923527d
children 5292:46fbb5f1ef0a
files net/http/parser.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/net/http/parser.lua	Mon Jan 07 04:07:25 2013 +0100
+++ b/net/http/parser.lua	Tue Jan 08 13:33:01 2013 +0100
@@ -77,6 +77,7 @@
 							end
 						end
 					end
+					if not first_line then error = true; return error_cb("invalid-status-line"); end
 					len = tonumber(headers["content-length"]); -- TODO check for invalid len
 					if client then
 						-- FIXME handle '100 Continue' response (by skipping it)