From 6bb3cd08c635fe23ffebd11721c8ddd1399438ab Mon Sep 17 00:00:00 2001 From: Chris Frohoff Date: Fri, 9 Aug 2013 15:53:06 -0700 Subject: [PATCH] fix for logging error with urls containing "%" --- lib/restclient/request.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/restclient/request.rb b/lib/restclient/request.rb index 1dd5267..15eb5a8 100644 --- a/lib/restclient/request.rb +++ b/lib/restclient/request.rb @@ -215,11 +215,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