author | Matthew Wild <mwild1@gmail.com> |
Tue, 18 Nov 2014 17:40:37 +0000 | |
changeset 6526 | 63d3126b75f1 |
parent 6525 | 46cf369d3eb5 |
child 6527 | 185817ef4a4d |
child 6561 | 461217c45a18 |
--- a/net/http/parser.lua Mon Nov 10 14:47:33 2014 -0500 +++ b/net/http/parser.lua Tue Nov 18 17:40:37 2014 +0000 @@ -140,11 +140,11 @@ break; end elseif len and #buf >= len then - if packet.code == 101 then - packet.body, buf = buf, "" - else - packet.body, buf = buf:sub(1, len), buf:sub(len + 1); - end + 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;