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

restify

Package Overview
Dependencies
Maintainers
0
Versions
184
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

restify - npm Package Compare versions

Comparing version 0.3.6 to 0.3.7

18

lib/client.js

@@ -360,6 +360,4 @@ // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.

message: 'Maximum number of retries exceeded: ' + attempt,
details: {
headers: res.headers,
body: res.body
}
headers: res.headers,
details: res.body
}));

@@ -382,3 +380,5 @@ }

message: 'Content-Length ' + len + ' didn\'t match: ' +
res.body.length
res.body.length,
headers: res.headers,
details: res.body
}));

@@ -399,3 +399,5 @@ }

message: 'Content-MD5 ' + res.headers['content-md5'] +
' didn\'t match: ' + digest
' didn\'t match: ' + digest,
headers: res.headers,
details: res.body
});

@@ -418,3 +420,5 @@ if (operation.retry(err)) return;

message: 'Content-Type was JSON, but it\'s not parsable',
error: e
error: e,
headers: res.headers,
details: res.body
}));

@@ -421,0 +425,0 @@ }

@@ -14,2 +14,3 @@ // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.

* - message {String} Human Message.
* - headers {Object} extra HTTP headers.
* - error {Error} Exception.

@@ -44,2 +45,3 @@ * - details {Object} Whatever you want.

if (options.details) e.details = options.details;
if (options.headers) e.headers = options.headers;

@@ -46,0 +48,0 @@ return e;

@@ -10,2 +10,3 @@ // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.

BadRequest: 400,
NotAuthorized: 401,
Forbidden: 403,

@@ -12,0 +13,0 @@ NotFound: 404,

@@ -159,3 +159,3 @@ // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.

this.send(error.httpCode, _e);
this.send(error.httpCode, _e, error.headers);
this.errorSent = true;

@@ -162,0 +162,0 @@ this.emit('errorSent');

@@ -92,3 +92,13 @@ // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.

_stdout.write(req.connection.remoteAddress + ' - ' +
// HTTP and HTTPS are different -> joyent/node GH #1005
var addr = req.connection.remoteAddress;
if (!addr) {
if (req.connection.socket) {
addr = req.connection.socket.remoteAddress;
} else {
addr = 'unknown';
}
}
_stdout.write(addr + ' - ' +
(req.username ? req.username : ' -') + ' [' +

@@ -95,0 +105,0 @@ _pad(d.getUTCDate()) + '/' +

@@ -80,7 +80,14 @@ // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.

for (var i = 0; i < params.length; i++) {
var _url = url.parse(components[i]);
if (params[i] === _url.pathname) continue;
// Don't use URL.parse, as it doesn't handle strings
// with ':' in them for this case. Regardless of what the
// RFC says about this, people do it.
var frag = components[i];
if (frag.indexOf('?') !== -1)
frag = frag.split('?', 2)[0];
if (params[i] === frag)
continue;
if (params[i].charAt(0) === ':') {
parsed[params[i].substr(1)] = _url.pathname;
parsed[params[i].substr(1)] = frag;
continue;

@@ -87,0 +94,0 @@ }

{
"name": "restify",
"description": "REST framework specifically meant for web service APIs",
"version": "0.3.6",
"version": "0.3.7",
"repository": {

@@ -12,7 +12,7 @@ "type": "git",

"dependencies": {
"formidable": ">=1.0.2",
"httpu": ">=0.0.1",
"node-uuid": ">=1.1.0",
"retry": ">=0.4.0",
"semver": ">=1.0.6"
"formidable": "1.0.2",
"httpu": "0.0.1",
"node-uuid": "1.2.0",
"retry": "0.4.0",
"semver": "1.0.8"
},

@@ -34,9 +34,8 @@ "scripts": {

"devDependencies": {
"jshint": ">=0.2.1",
"node-uuid": ">=1.2.0",
"whiskey": ">=0.3.3"
"jshint": "0.2.3",
"whiskey": "0.4.0"
},
"engines": {
"node": ">=0.4.0"
"node": "~0.4"
}
}

@@ -253,3 +253,2 @@ // Copyright 2011 Mark Cavage <mcavage@gmail.com> All rights reserved.

assert.equal(err.message, 'Maximum number of retries exceeded: 2');
assert.ok(err.details);
test.finish();

@@ -256,0 +255,0 @@ });

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