projects
/
prosody.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a227205
)
net.http.parser: Break when no more usable data in buffer (client part of e5ec60dfb202)
author
Matthew Wild
<mwild1@gmail.com>
Thu, 11 Apr 2013 16:39:10 +0000
(17:39 +0100)
committer
Matthew Wild
<mwild1@gmail.com>
Thu, 11 Apr 2013 16:39:10 +0000
(17:39 +0100)
net/http/parser.lua
patch
|
blob
|
history
diff --git
a/net/http/parser.lua
b/net/http/parser.lua
index 45a8b1682991a644445cafbac52e052e621bfc2d..73a8fb6a4287d609c509b0589a10a6d83b799826 100644
(file)
--- 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);