You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildr.apache.org by do...@apache.org on 2013/09/22 02:56:11 UTC

svn commit: r1525307 - in /buildr/trunk: CHANGELOG lib/buildr/core/transports.rb

Author: donaldp
Date: Sun Sep 22 00:56:10 2013
New Revision: 1525307

URL: http://svn.apache.org/r1525307
Log:
BUILDR-675 - Set Cache-Control to 'no-cache' when downloading artifacts. 

Submitted by: Félix Enrique Llorente Pastora.

Modified:
    buildr/trunk/CHANGELOG
    buildr/trunk/lib/buildr/core/transports.rb

Modified: buildr/trunk/CHANGELOG
URL: http://svn.apache.org/viewvc/buildr/trunk/CHANGELOG?rev=1525307&r1=1525306&r2=1525307&view=diff
==============================================================================
--- buildr/trunk/CHANGELOG (original)
+++ buildr/trunk/CHANGELOG Sun Sep 22 00:56:10 2013
@@ -1,4 +1,6 @@
 1.4.13 (Pending)
+* Change: BUILDR-675 - Set Cache-Control to 'no-cache' when downloading
+          artifacts. Submitted by Félix Enrique Llorente Pastora.
 * Added:  Initial support for simple integration of an asset pipeline.
           See "Compiling Assets" section in the manual.
 * Fixed:  BUILDR-673 - Fix the option handling of the MultiTest test

Modified: buildr/trunk/lib/buildr/core/transports.rb
URL: http://svn.apache.org/viewvc/buildr/trunk/lib/buildr/core/transports.rb?rev=1525307&r1=1525306&r2=1525307&view=diff
==============================================================================
--- buildr/trunk/lib/buildr/core/transports.rb (original)
+++ buildr/trunk/lib/buildr/core/transports.rb Sun Sep 22 00:56:10 2013
@@ -271,7 +271,9 @@ module URI
       options ||= {}
       connect do |http|
         trace "Requesting #{self}"
-        headers = { 'If-Modified-Since' => CGI.rfc1123_date(options[:modified].utc) } if options[:modified]
+        headers = {}
+        headers['If-Modified-Since'] = CGI.rfc1123_date(options[:modified].utc) if options[:modified]
+        headers['Cache-Control'] = 'no-cache'
         request = Net::HTTP::Get.new(request_uri.empty? ? '/' : request_uri, headers)
         request.basic_auth self.user, self.password if self.user
         http.request request do |response|