New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

hammock

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hammock - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

14

lib/request.js

@@ -37,9 +37,11 @@ var Cookies = require('cookies');

var cookieBuffer = [];
if (options.cookies && !this.getHeader('cookie')) {
var cookieBuffer = [];
_.forEach(_.keys(options.cookies || {}), function(key) {
cookieBuffer.push(key + '=' + options.cookies[key]);
});
_.forEach(_.keys(options.cookies), function(key) {
cookieBuffer.push(key + '=' + options.cookies[key]);
});
this.setHeader('cookie', cookieBuffer.join(';'));
this.setHeader('cookie', cookieBuffer.join(';'));
}
};

@@ -86,2 +88,2 @@

module.exports = MockRequest;
module.exports = MockRequest;
{
"name": "hammock",
"version": "0.1.9",
"version": "0.1.10",
"description": "Node.js mock / polyfill http object library for http req / res",
"main": "index.js",
"scripts": {
"test": "node ./tests/*"
"test": "tape ./tests/*"
},

@@ -26,3 +26,3 @@ "repository": {

"devDependencies": {
"tape": "~1.0.4"
"tape": "^3.0.3"
},

@@ -29,0 +29,0 @@ "author": "Tommy Messbauer",

@@ -27,1 +27,14 @@ var test = require('tape');

});
test('can create with cookie header', function (t) {
var req = new MockRequest({
headers: {
cookie: 's=foo'
}
});
t.ok(req);
t.equal(req.headers.cookie, 's=foo');
t.end();
});
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