From 9cb7c149b749775e73f49f95fa0daf842dcbfe46 Mon Sep 17 00:00:00 2001 From: Samuel Giddins Date: Mon, 29 Aug 2016 14:31:03 -0500 Subject: [CompactIndexClient::Updater] Support weak etags (cherry picked from commit ece6829c46e4768aae13f970a54017c272bf974d) --- .../vendor/compact_index_client/lib/compact_index_client/updater.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb b/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb index 5c5ba41434..a410dd423c 100644 --- a/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb +++ b/lib/bundler/vendor/compact_index_client/lib/compact_index_client/updater.rb @@ -50,7 +50,7 @@ class Bundler::CompactIndexClient mode = response.is_a?(Net::HTTPPartialContent) ? "a" : "w" local_temp_path.open(mode) {|f| f << content } - response_etag = response["ETag"] + response_etag = response["ETag"].gsub(%r{\AW/}, "") if etag_for(local_temp_path) == response_etag FileUtils.mv(local_temp_path, local_path) return -- cgit v1.2.1