mirror of
https://github.com/rest-client/rest-client.git
synced 2022-11-09 13:49:40 -05:00
Merge pull request #214 from frohoff/master
fix for logging error with urls containing "%"
This commit is contained in:
commit
94b35789e3
1 changed files with 3 additions and 3 deletions
|
@ -265,11 +265,11 @@ module RestClient
|
|||
size += chunk.size
|
||||
if RestClient.log
|
||||
if size == 0
|
||||
RestClient.log << "#{@method} #{@url} done (0 length file\n)"
|
||||
RestClient.log << "%s %s done (0 length file\n)" % [@method, @url]
|
||||
elsif total == 0
|
||||
RestClient.log << "#{@method} #{@url} (zero content length)\n"
|
||||
RestClient.log << "%s %s (zero content length)\n" % [@method, @url]
|
||||
else
|
||||
RestClient.log << "#{@method} #{@url} %d%% done (%d of %d)\n" % [(size * 100) / total, size, total]
|
||||
RestClient.log << "%s %s %d%% done (%d of %d)\n" % [@method, @url, (size * 100) / total, size, total]
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue