diff options
author | Matthew Wild <mwild1@gmail.com> | 2014-09-03 18:50:20 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2014-09-03 18:50:20 +0100 |
commit | 514241bc26d3020da96dc77c815ef901eeb0705a (patch) | |
tree | b2a636d33d28c077107980aa139233b63accdee4 /net | |
parent | 11af743ec1ac3de3264c6f6aa5e71a6544b3f91c (diff) | |
parent | 43bc05285d4bf3a88ed24f5310672881dbd752a3 (diff) | |
download | prosody-514241bc26d3020da96dc77c815ef901eeb0705a.tar.gz prosody-514241bc26d3020da96dc77c815ef901eeb0705a.zip |
Merge 0.9->0.10
Diffstat (limited to 'net')
-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; |