Eric Wong <[email protected]> wrote:
> diff --git a/lib/yahns/http_response.rb b/lib/yahns/http_response.rb
Oops, missed this :x
--- a/lib/yahns/http_response.rb
+++ b/lib/yahns/http_response.rb
@@ -125,7 +125,7 @@ def kv_str(buf, key, value)
def http_response_write(res, opt)
status, headers, body = res
offset = 0
- count = hijack = nil
+ count = hijack = clen = nil
alive = @hs.next? && self.class.persistent_connections
flags = MSG_DONTWAIT
term = false
> @@ -152,7 +152,8 @@ def http_response_write(res, opt)
> alive = false if value =~ /\bclose\b/i
> when %r{\AContent-Length\z}i
> term = true
> - flags |= MSG_MORE if value.to_i > 0 && !hdr_only
> + clen = value.to_i
> + flags |= MSG_MORE if clen > 0 && !hdr_only
> kv_str(buf, key, value)
> when %r{\ATransfer-Encoding\z}i
> term = true if value =~ /\bchunked\b/i
--
unsubscribe: [email protected]
archive: https://yhbt.net/yahns-public/