diff options
author | Steve Kemp <steve@steve.org.uk> | 2013-10-08 14:13:35 +0100 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2013-10-08 14:13:35 +0100 |
commit | c388b943c897a130072ec050caf7a893b4c1c17a (patch) | |
tree | 6565d1cdad932fbbe6e747729a2b380a82ab0596 /lib/custodian | |
parent | b7b90c27874cfe3844be45e6c0430d6cbbd69267 (diff) |
Attempt to avoid caching artifacts on all URL-testing by
appending ?ctime=XX to HTTP/HTTPS-requests.
Diffstat (limited to 'lib/custodian')
-rw-r--r-- | lib/custodian/protocoltest/http.rb | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/custodian/protocoltest/http.rb b/lib/custodian/protocoltest/http.rb index c52e36c..c9aedaf 100644 --- a/lib/custodian/protocoltest/http.rb +++ b/lib/custodian/protocoltest/http.rb @@ -191,10 +191,28 @@ module Custodian settings = Custodian::Settings.instance() period = settings.timeout() + # + # The URL we'll fetch, which has a cache-busting + # query-string + # + test_url = @url + + # + # Parse and append a query-string if not present. + # + u = URI.parse( test_url ) + if ( ! u.query ) + u.query = "ctime=#{Time.now.to_i}" + test_url = u.to_s + end + + begin timeout( period ) do begin - c = Curl::Easy.new(@url) + + + c = Curl::Easy.new(test_url) # # Should we follow redirections? |