lib/rbkb/http/response.rb in emonti-rbkb-0.6.7 vs lib/rbkb/http/response.rb in emonti-rbkb-0.6.8
- old
+ new
@@ -65,10 +65,10 @@
# Indicates whether to use chunked encoding based on presence of
# the "Transfer-Encoding: chunked" header or the :ignore_chunked_encoding
# opts parameter.
def do_chunked_encoding?(hdrs=@headers)
( (not @opts[:ignore_chunked_encoding]) and
- (hdrs.get_header_value("Transfer-Encoding").first =~ /(?:^|\W)chunked(?:\W|$)/) )
+ (hdrs.get_header_value("Transfer-Encoding").to_s =~ /(?:^|\W)chunked(?:\W|$)/) )
end
# Returns a new Headers object extended as ResponseHeaders. This is the
# default object which will be used when composing fresh Response header
# entities.