# HG changeset patch # User Matthew Wild # Date 1409766689 -3600 # Node ID 264c7c45c38144559a001d28105bd8eedaa17b2d # Parent d87195d53d8426f1c19b8924a37d4a8302b79cfa# Parent 6d769afd0bc55ac76240e294aae138032055f6e2 Merge 0.10->trunk diff -r d87195d53d84 -r 264c7c45c381 net/http/parser.lua --- a/net/http/parser.lua Wed Sep 03 03:35:48 2014 +0200 +++ b/net/http/parser.lua Wed Sep 03 18:51:29 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;