aboutsummaryrefslogtreecommitdiffstats
path: root/net/http/parser.lua
diff options
context:
space:
mode:
Diffstat (limited to 'net/http/parser.lua')
-rw-r--r--net/http/parser.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/http/parser.lua b/net/http/parser.lua
index 056d4b60..6d7187da 100644
--- a/net/http/parser.lua
+++ b/net/http/parser.lua
@@ -140,11 +140,11 @@ function httpstream.new(success_cb, error_cb, parser_type, options_cb)
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;