Software /
code /
prosody
Diff
net/http/parser.lua @ 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 |
parent | 5259:c85c348253bd |
child | 5322:8d525f58f916 |
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)