Socket
Socket
Sign inDemoInstall

http-cache-semantics

Package Overview
Dependencies
0
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 3.3.1 to 3.3.2

1

index.js

@@ -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 @@

2

package.json
{
"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 @@

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc