diff options
Diffstat (limited to 'lib/yahns/req_res.rb')
-rw-r--r-- | lib/yahns/req_res.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/yahns/req_res.rb b/lib/yahns/req_res.rb index 4ad8e5c..283fea8 100644 --- a/lib/yahns/req_res.rb +++ b/lib/yahns/req_res.rb @@ -29,7 +29,7 @@ class Yahns::ReqRes < Kgio::Socket # :nodoc: case resbuf = @resbuf # where are we at the response? when nil # common case, catch the response header in a single read - case rv = kgio_tryread(0x2000, buf) + case rv = kgio_tryread(16384, buf) when String if res = req.headers(@hdr = [], rv) return c.proxy_response_start(res, rv, req, self) @@ -48,7 +48,7 @@ class Yahns::ReqRes < Kgio::Socket # :nodoc: when String # continue reading trickled response headers from upstream - case rv = kgio_tryread(0x2000, buf) + case rv = kgio_tryread(16384, buf) when String then res = req.headers(@hdr, resbuf << rv) and break when :wait_readable then return rv when nil @@ -114,7 +114,7 @@ class Yahns::ReqRes < Kgio::Socket # :nodoc: # we should not be waiting on a slow network resource when reading # input. However, some weird configs may disable this on LANs # and we may wait indefinitely on input.read here... - while input.read(0x2000, rbuf) + while input.read(16384, rbuf) if chunked buf[0] = "#{rbuf.size.to_s(16)}\r\n".freeze buf[1] = rbuf |