# HG changeset patch # User Matthew Wild # Date 1337909553 -3600 # Node ID e5ec60dfb2021d63afffb2f8a0a35afea6aa5ce7 # Parent 01bfb9a7666041fb5d8e30cb4131587eb90da970 net.http.parser: Break loop when no more usable data in buffer diff -r 01bfb9a76660 -r e5ec60dfb202 net/http/parser.lua --- a/net/http/parser.lua Thu May 24 18:52:47 2012 +0100 +++ b/net/http/parser.lua Fri May 25 02:32:33 2012 +0100 @@ -131,6 +131,8 @@ elseif #buf >= len then packet.body, buf = buf:sub(1, len), buf:sub(len + 1); state = nil; success_cb(packet); + else + break; end end end