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

restify

Package Overview
Dependencies
Maintainers
1
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 2.8.1 to 2.8.2

10

CHANGES.md

@@ -5,2 +5,12 @@ # restify Changelog

## 2.8.2
- #619 Default to url, if string provided to createClient
- #614 do not compute the MD5 Hash of a partial content
- #516 Allow an `options` object to be passed into the authorization plugin
- Updating dependencies
- #626 Add more built-in errors to doc
- #460 Provide direct access to https server options if needed
- #656 update qs
## 2.8.1

@@ -7,0 +17,0 @@

2

lib/clients/string_client.js

@@ -158,3 +158,3 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved.

var md5 = res.headers['content-md5'];
if (md5 && req.method !== 'HEAD')
if (md5 && req.method !== 'HEAD' && res.statusCode !== 206)
hash = crypto.createHash('md5');

@@ -161,0 +161,0 @@

@@ -14,2 +14,4 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved.

function createClient(options) {
if (typeof options === 'string') options = {url: options};
var assert = require('assert-plus');

@@ -48,2 +50,3 @@ var bunyan = require('./bunyan_helper');

function createJsonClient(options) {
if (typeof options === 'string') options = {url: options};
options = options ? shallowCopy(options) : {};

@@ -56,2 +59,3 @@ options.type = 'json';

function createStringClient(options) {
if (typeof options === 'string') options = {url: options};
options = options ? shallowCopy(options) : {};

@@ -64,2 +68,3 @@ options.type = 'string';

function createHttpClient(options) {
if (typeof options === 'string') options = {url: options};
options = options ? shallowCopy(options) : {};

@@ -66,0 +71,0 @@ options.type = 'http';

@@ -61,7 +61,7 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved.

function parseSignature(request) {
function parseSignature(request, options) {
options = options || {};
options.algorithms = OPTIONS.algorithms;
try {
return (httpSignature.parseRequest(request, {
algorithms: OPTIONS.algorithms
}));
return (httpSignature.parseRequest(request, options));
} catch (e) {

@@ -93,3 +93,3 @@ throw new InvalidHeaderError('Authorization header invalid: ' +

*/
function authorizationParser() {
function authorizationParser(options) {

@@ -122,3 +122,3 @@ function parseAuthorization(req, res, next) {

req.authorization.signature =
parseSignature(req);
parseSignature(req, options);
req.username =

@@ -125,0 +125,0 @@ req.authorization.signature.keyId;

@@ -124,4 +124,5 @@ // Copyright 2013 Mark Cavage, Inc. All rights reserved.

cors.ALLOW_HEADERS = ALLOW_HEADERS;
cors.EXPOSE_HEADERS = EXPOSE_HEADERS;
cors.credentials = false;
cors.origins = [];
cors.matchOrigin = matchOrigin;

@@ -212,2 +212,4 @@ // Copyright 2012 Mark Cavage, Inc. All rights reserved.

});
} else if (options.httpsServerOptions) {
this.server = https.createServer(options.httpsServerOptions);
} else {

@@ -250,5 +252,2 @@ this.server = http.createServer();

self.emit('request', req, res);
/* JSSTYLED */
if (/^\/socket.io.*/.test(req.url))
return;

@@ -255,0 +254,0 @@ self._setupRequest(req, res);

@@ -31,3 +31,4 @@ {

"Mike Williams",
"Brian Pin"
"Brian Pin",
"Ben Doerr"
],

@@ -37,3 +38,3 @@ "name": "restify",

"description": "REST framework",
"version": "2.8.1",
"version": "2.8.2",
"repository": {

@@ -54,30 +55,30 @@ "type": "git",

"dependencies": {
"assert-plus": "0.1.5",
"backoff": "2.3.0",
"bunyan": "0.22.1",
"csv": "0.3.7",
"deep-equal": "0.0.0",
"escape-regexp-component": "1.0.2",
"formidable": "1.0.14",
"http-signature": "0.10.0",
"keep-alive-agent": "0.0.1",
"lru-cache": "2.3.1",
"mime": "1.2.11",
"negotiator": "0.3.0",
"node-uuid": "1.4.1",
"once": "1.3.0",
"qs": "0.6.6",
"semver": "2.2.1",
"spdy": "1.19.3",
"tunnel-agent": "0.4.0",
"verror": "1.3.7"
"assert-plus": "^0.1.5",
"backoff": "^2.3.0",
"bunyan": "^0.23.1",
"csv": "^0.4.0",
"deep-equal": "^0.2.1",
"escape-regexp-component": "^1.0.2",
"formidable": "^1.0.14",
"http-signature": "^0.10.0",
"keep-alive-agent": "^0.0.1",
"lru-cache": "^2.5.0",
"mime": "^1.2.11",
"negotiator": "^0.4.5",
"node-uuid": "^1.4.1",
"once": "^1.3.0",
"qs": "^1.0.0",
"semver": "^2.3.0",
"spdy": "^1.26.5",
"tunnel-agent": "^0.4.0",
"verror": "^1.4.0"
},
"optionalDependencies": {
"dtrace-provider": "0.2.8"
"dtrace-provider": "^0.2.8"
},
"devDependencies": {
"cover": "0.2.9",
"filed": "0.1.0",
"nodeunit": "0.8.6",
"watershed": "0.3.0"
"cover": "^0.2.9",
"filed": "^0.1.0",
"nodeunit": "^0.9.0",
"watershed": "^0.3.0"
},

@@ -84,0 +85,0 @@ "scripts": {

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