sprockets 2.1.1 → 2.1.2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sprockets might be problematic. Click here for more details.

data/README.md CHANGED
@@ -354,6 +354,10 @@ submit a pull request.
354
354
 
355
355
  ## Version History ##
356
356
 
357
+ **2.1.2** (November 20, 2011)
358
+
359
+ * Disabled If-Modified-Since server checks. Fixes some browser caching issues when serving the asset body only. If-None-Match caching is sufficent.
360
+
357
361
  **2.1.1** (November 18, 2011)
358
362
 
359
363
  * Fix windows absolute path check bug.
@@ -53,9 +53,8 @@ module Sprockets
53
53
  # Return a 404 Not Found
54
54
  not_found_response
55
55
 
56
- # Check request headers `HTTP_IF_MODIFIED_SINCE` and
57
- # `HTTP_IF_NONE_MATCH` against the assets mtime and digest
58
- elsif not_modified?(asset, env) || etag_match?(asset, env)
56
+ # Check request headers `HTTP_IF_NONE_MATCH` against the asset digest
57
+ elsif etag_match?(asset, env)
59
58
  logger.info "#{msg} 304 Not Modified (#{time_elapsed.call}ms)"
60
59
 
61
60
  # Return a 304 Not Modified
@@ -174,12 +173,6 @@ module Sprockets
174
173
  gsub('/', '\\\\002f ')
175
174
  end
176
175
 
177
- # Compare the requests `HTTP_IF_MODIFIED_SINCE` against the
178
- # assets mtime
179
- def not_modified?(asset, env)
180
- env["HTTP_IF_MODIFIED_SINCE"] == asset.mtime.httpdate
181
- end
182
-
183
176
  # Compare the requests `HTTP_IF_NONE_MATCH` against the assets digest
184
177
  def etag_match?(asset, env)
185
178
  env["HTTP_IF_NONE_MATCH"] == etag(asset)
@@ -1,3 +1,3 @@
1
1
  module Sprockets
2
- VERSION = "2.1.1"
2
+ VERSION = "2.1.2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sprockets
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 15
5
5
  prerelease:
6
6
  segments:
7
7
  - 2
8
8
  - 1
9
- - 1
10
- version: 2.1.1
9
+ - 2
10
+ version: 2.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sam Stephenson
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-11-18 00:00:00 -06:00
19
+ date: 2011-11-20 00:00:00 -06:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency