ruby/drop_content_size_check_in_xmlrpc.patch

17 lines
767 B
Diff
Raw Normal View History

xmlrpc is doing a wrong content size check in case the server is compressing the answer. drop the check for now.
http://bugs.ruby-lang.org/issues/8182
Index: lib/xmlrpc/client.rb
===================================================================
--- lib/xmlrpc/client.rb.orig
+++ lib/xmlrpc/client.rb
@@ -509,8 +509,6 @@ module XMLRPC # :nodoc:
expected = resp["Content-Length"] || "<unknown>"
if data.nil? or data.bytesize == 0
raise "Wrong size. Was #{data.bytesize}, should be #{expected}"
- elsif expected != "<unknown>" and expected.to_i != data.bytesize and resp["Transfer-Encoding"].nil?
- raise "Wrong size. Was #{data.bytesize}, should be #{expected}"
end
parse_set_cookies(resp.get_fields("Set-Cookie"))