aboutsummaryrefslogtreecommitdiffstats
path: root/net/http/parser.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2013-01-08 13:33:01 +0100
committerKim Alvefur <zash@zash.se>2013-01-08 13:33:01 +0100
commit77651c4a6ce9de55e7d341d40f5f30e7988efee7 (patch)
treebfdf734268aaff1fc57006e0c9981bed6e1ab113 /net/http/parser.lua
parent77949dcd80e1f8b6110b9d287d8df2585a0b9f58 (diff)
downloadprosody-77651c4a6ce9de55e7d341d40f5f30e7988efee7.tar.gz
prosody-77651c4a6ce9de55e7d341d40f5f30e7988efee7.zip
net.http.parser: Abort if no status line is received.
Diffstat (limited to 'net/http/parser.lua')
-rw-r--r--net/http/parser.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/http/parser.lua b/net/http/parser.lua
index b53dfa4e..64cf38c0 100644
--- a/net/http/parser.lua
+++ b/net/http/parser.lua
@@ -77,6 +77,7 @@ function httpstream.new(success_cb, error_cb, parser_type, options_cb)
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)