Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

http-cache-semantics

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

http-cache-semantics - npm Package Compare versions

Comparing version 3.3.2 to 3.3.3

4

index.js

@@ -31,2 +31,5 @@ 'use strict';

}
if (!parts.length) {
return undefined;
}
return parts.join(', ');

@@ -72,2 +75,3 @@ }

this._resHeaders = Object.assign({}, this._resHeaders, {'cache-control': formatCacheControl(this._rescc)});
delete this._resHeaders['expires'];
delete this._resHeaders['pragma'];

@@ -74,0 +78,0 @@ }

2

package.json
{
"name": "http-cache-semantics",
"version": "3.3.2",
"version": "3.3.3",
"description": "Parses Cache-Control headers and friends",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -68,2 +68,17 @@ 'use strict';

it('pre-check poison undefined header', function() {
const origCC = 'pre-check=0, post-check=0, no-cache, no-store';
const res = {headers:{'cache-control': origCC, expires: 'yesterday!'}};
const cache = new CachePolicy(req, res, {ignoreCargoCult:true});
assert(cache.stale());
assert(cache.storable());
assert.equal(cache.maxAge(), 0);
const cc = cache.responseHeaders()['cache-control'];
assert(!cc);
assert(res.headers['expires']);
assert(!cache.responseHeaders()['expires']);
});
it('cache with expires', function() {

@@ -70,0 +85,0 @@ const cache = new CachePolicy(req, {headers:{

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc