From: Matthew Wild Date: Wed, 3 Sep 2014 17:50:20 +0000 (+0100) Subject: Merge 0.9->0.10 X-Git-Url: https://git.enpas.org/?a=commitdiff_plain;h=eef946a630913dcf09a23233b8a7a253c2cf3b64;hp=4bf943054d265c4af6cc2879544f25ecae3d9855;p=prosody.git Merge 0.9->0.10 --- 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;