Bug #8182 » xmlrpc_client.rb.bug8182.patch
| lib/xmlrpc/client.rb (working copy) | ||
|---|---|---|
|
@http_last_response = resp
|
||
|
content_encoding = resp['Content-Encoding']
|
||
|
data = resp.body
|
||
|
if resp.code == "401"
|
||
| ... | ... | |
|
end
|
||
|
end
|
||
|
expected = resp["Content-Length"] || "<unknown>"
|
||
|
expected =
|
||
|
if %w[deflate gzip x-gzip].include? content_encoding then
|
||
|
"<unknown>"
|
||
|
else
|
||
|
resp["Content-Length"] || "<unknown>"
|
||
|
end
|
||
|
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?
|
||
- « Previous
- 1
- 2
- 3
- Next »