lib/rack/contrib/csshttprequest.rb in rack-contrib-2.1.0 vs lib/rack/contrib/csshttprequest.rb in rack-contrib-2.2.0
- old
+ new
@@ -29,10 +29,10 @@
response.each { |s| assembled_body << s.to_s } # call down the stack
return ::CSSHTTPRequest.encode(assembled_body)
end
def modify_headers!(headers, encoded_response)
- headers['Content-Length'] = encoded_response.length.to_s
+ headers['Content-Length'] = encoded_response.bytesize.to_s
headers['Content-Type'] = 'text/css'
nil
end
end
end