diff options
author | Matthew Wild <mwild1@gmail.com> | 2014-09-03 18:51:29 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2014-09-03 18:51:29 +0100 |
commit | 8a22cd1d397c24a68c7dc7727299bfd8475e9395 (patch) | |
tree | 83ba64b3c7757588d112c1844d3d79b6816209ea /net/http/parser.lua | |
parent | fabf45ed3085ca142f0ca786967e0f3d86b8b2df (diff) | |
parent | 74191c88a70bbb04baab491c1252e6d3fa090f4f (diff) | |
download | prosody-8a22cd1d397c24a68c7dc7727299bfd8475e9395.tar.gz prosody-8a22cd1d397c24a68c7dc7727299bfd8475e9395.zip |
Merge 0.10->trunk
Diffstat (limited to 'net/http/parser.lua')
-rw-r--r-- | net/http/parser.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/http/parser.lua b/net/http/parser.lua index f9e6cea0..d896dff4 100644 --- a/net/http/parser.lua +++ b/net/http/parser.lua @@ -140,7 +140,11 @@ function httpstream.new(success_cb, error_cb, parser_type, options_cb) break; end elseif len and #buf >= len then - packet.body, buf = buf:sub(1, len), buf:sub(len + 1); + if packet.code == 101 then + packet.body, buf = buf, "" + else + packet.body, buf = buf:sub(1, len), buf:sub(len + 1); + end state = nil; success_cb(packet); else break; |