summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-08-11 12:57:11 -0700
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2019-11-30 17:50:13 +0900
commita98632d5c20e41e05074384b8f760af407e6d52a (patch)
treee4c77657b6db0e30735ff18c77059d2b8ddb9e07 /lib
parentedfbffb241a894eece57155a22a89637b33cfe58 (diff)
[ruby/webrick] Enabled chunked encoding if Transfer-Encoding: chunked header is set
Patch from Leonard Garvey. Fixes Ruby Bug 9986. https://github.com/ruby/webrick/commit/8cff7f3995
Diffstat (limited to 'lib')
-rw-r--r--lib/webrick/httpresponse.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/webrick/httpresponse.rb b/lib/webrick/httpresponse.rb
index 9942a59714..ba4494ab74 100644
--- a/lib/webrick/httpresponse.rb
+++ b/lib/webrick/httpresponse.rb
@@ -155,6 +155,7 @@ module WEBrick
# Sets the response header +field+ to +value+
def []=(field, value)
+ @chunked = value.to_s.downcase == 'chunked' if field.downcase == 'transfer-encoding'
@header[field.downcase] = value.to_s
end