aboutsummaryrefslogtreecommitdiffstats
path: root/net/http/parser.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2013-04-11 17:39:10 +0100
committerMatthew Wild <mwild1@gmail.com>2013-04-11 17:39:10 +0100
commit68339a4c86588ea52693d38a737e50501ea489c8 (patch)
treedb54f9cec97652e98c73498c3dd757f1824e44ca /net/http/parser.lua
parentbd8884707ad0417875b28ab02beeb75ac14c7ed8 (diff)
downloadprosody-68339a4c86588ea52693d38a737e50501ea489c8.tar.gz
prosody-68339a4c86588ea52693d38a737e50501ea489c8.zip
net.http.parser: Break when no more usable data in buffer (client part of e5ec60dfb202)
Diffstat (limited to 'net/http/parser.lua')
-rw-r--r--net/http/parser.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/http/parser.lua b/net/http/parser.lua
index 45a8b168..73a8fb6a 100644
--- a/net/http/parser.lua
+++ b/net/http/parser.lua
@@ -136,6 +136,8 @@ function httpstream.new(success_cb, error_cb, parser_type, options_cb)
elseif len and #buf >= len then
packet.body, buf = buf:sub(1, len), buf:sub(len + 1);
state = nil; success_cb(packet);
+ else
+ break;
end
elseif #buf >= len then
packet.body, buf = buf:sub(1, len), buf:sub(len + 1);