mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 14:03:22 +08:00
DEV: Stop logging error response body in FileHelper (#17120)
This doesn't cope well with gzipped, binary, or large responses. Ideally we would teach FinalDestination to safely retrieve and decode some of the response body. But for now, let's remove the broken implementation.
This commit is contained in:
parent
6695d148d6
commit
e0ff367b49
|
@ -73,7 +73,7 @@ class FileHelper
|
|||
# attempt error API compatibility
|
||||
io = FakeIO.new
|
||||
io.status = [response.code, ""]
|
||||
raise OpenURI::HTTPError.new("#{response.code} Error: #{response.body}", io)
|
||||
raise OpenURI::HTTPError.new("#{response.code} Error", io)
|
||||
else
|
||||
log(:error, "FinalDestination did not work for: #{url}") if verbose
|
||||
throw :done
|
||||
|
|
|
@ -29,7 +29,7 @@ describe FileHelper do
|
|||
expect(e.io.status[0]).to eq("404")
|
||||
raise
|
||||
end
|
||||
end.to raise_error(OpenURI::HTTPError, "404 Error: 404")
|
||||
end.to raise_error(OpenURI::HTTPError, "404 Error")
|
||||
end
|
||||
|
||||
it "does not follow redirects if instructed not to" do
|
||||
|
|
Loading…
Reference in New Issue
Block a user