aboutsummaryrefslogtreecommitdiffstats
path: root/net/http
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-05-25 02:32:33 +0100
committerMatthew Wild <mwild1@gmail.com>2012-05-25 02:32:33 +0100
commit1d005781544a98e84893cf3defed1ff61c86e277 (patch)
treec8408d688a374731daebeeca9511cd6ea4abbcc3 /net/http
parent6f6c868b10b6b35df27e1bac701dff81481a8bfe (diff)
downloadprosody-1d005781544a98e84893cf3defed1ff61c86e277.tar.gz
prosody-1d005781544a98e84893cf3defed1ff61c86e277.zip
net.http.parser: Break loop when no more usable data in buffer
Diffstat (limited to 'net/http')
-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 2d822598..964c350d 100644
--- a/net/http/parser.lua
+++ b/net/http/parser.lua
@@ -131,6 +131,8 @@ function httpstream.new(success_cb, error_cb, parser_type, options_cb)
elseif #buf >= len then
packet.body, buf = buf:sub(1, len), buf:sub(len + 1);
state = nil; success_cb(packet);
+ else
+ break;
end
end
end