# HG changeset patch # User Matthew Wild # Date 1409766620 -3600 # Node ID 6d769afd0bc55ac76240e294aae138032055f6e2 # Parent 3f4809d01783bb57121f05fcde2be4b35a40a9f2# Parent f942cf2a9a0377c76ce74830ba988dcf0f7265a8 Merge 0.9->0.10 diff -r 3f4809d01783 -r 6d769afd0bc5 net/http/parser.lua --- a/net/http/parser.lua Wed Sep 03 00:37:41 2014 +0200 +++ b/net/http/parser.lua Wed Sep 03 18:50:20 2014 +0100 @@ -140,7 +140,11 @@ 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;