projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eff33ab
)
net.http.parser: Abort if no status line is received.
author
Kim Alvefur
<zash@zash.se>
Tue, 8 Jan 2013 12:33:01 +0000
(13:33 +0100)
committer
Kim Alvefur
<zash@zash.se>
Tue, 8 Jan 2013 12:33:01 +0000
(13:33 +0100)
net/http/parser.lua
patch
|
blob
|
history
diff --git
a/net/http/parser.lua
b/net/http/parser.lua
index b53dfa4ede3381b96068f95038b9969845b00418..64cf38c0fc1bef6a3351ed2dff21aa096fac3470 100644
(file)
--- 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)