Eric Wong <e...@80x24.org> 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: yahns-public+unsubscr...@yhbt.net archive: https://yhbt.net/yahns-public/