1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00

Reuse one HttpParser object across persistent requests

This commit is contained in:
Evan Phoenix 2011-12-01 13:32:21 -08:00
parent e8372fc431
commit 816daf7977

View file

@ -149,9 +149,12 @@ module Puma
end
def process_client(client)
parser = HttpParser.new
begin
while true
parser = HttpParser.new
parser.reset
env = @proto_env.dup
data = client.readpartial(CHUNK_SIZE)
nparsed = 0