# HG changeset patch # User Matthew Wild # Date 1365698350 -3600 # Node ID 67b674f6a2994e8827301fb0b50d66f8ffef0358 # Parent 274c10668fe80be754f19ba858fdb4a3c35beb62 net.http.parser: Break when no more usable data in buffer (client part of e5ec60dfb202) diff -r 274c10668fe8 -r 67b674f6a299 net/http/parser.lua --- a/net/http/parser.lua Thu Apr 11 17:37:37 2013 +0100 +++ b/net/http/parser.lua Thu Apr 11 17:39:10 2013 +0100 @@ -136,6 +136,8 @@ elseif len and #buf >= len then packet.body, buf = buf:sub(1, len), buf:sub(len + 1); state = nil; success_cb(packet); + else + break; end elseif #buf >= len then packet.body, buf = buf:sub(1, len), buf:sub(len + 1);