Software /
code /
prosody
Changeset
6387:6d769afd0bc5
Merge 0.9->0.10
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 03 Sep 2014 18:50:20 +0100 |
parents | 6384:3f4809d01783 (current diff) 6386:f942cf2a9a03 (diff) |
children | 6388:264c7c45c381 6389:8eccd07b619c 6395:e0164b0fcafd |
files | |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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;