http-cache-semantics
Advanced tools
Comparing version 3.3.1 to 3.3.2
@@ -71,2 +71,3 @@ 'use strict'; | ||
this._resHeaders = Object.assign({}, this._resHeaders, {'cache-control': formatCacheControl(this._rescc)}); | ||
delete this._resHeaders['pragma']; | ||
} | ||
@@ -73,0 +74,0 @@ |
{ | ||
"name": "http-cache-semantics", | ||
"version": "3.3.1", | ||
"version": "3.3.2", | ||
"description": "Parses Cache-Control headers and friends", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -48,3 +48,3 @@ 'use strict'; | ||
const origCC = 'pre-check=0, post-check=0, no-cache, no-store, max-age=100, custom, foo=bar'; | ||
const res = {headers:{'cache-control': origCC}}; | ||
const res = {headers:{'cache-control': origCC, pragma: 'no-cache'}}; | ||
const cache = new CachePolicy(req, res, {ignoreCargoCult:true}); | ||
@@ -65,2 +65,4 @@ assert(!cache.stale()); | ||
assert.equal(res.headers['cache-control'], origCC); | ||
assert(res.headers['pragma']); | ||
assert(!cache.responseHeaders()['pragma']); | ||
}); | ||
@@ -67,0 +69,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77332
709