Comparing version 2.8.1 to 2.8.2
@@ -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 @@ |
@@ -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": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179745
4630
+ Addedassert-plus@1.0.0(transitive)
+ Addedbackoff@2.5.0(transitive)
+ Addedbalanced-match@1.0.2(transitive)
+ Addedbrace-expansion@1.1.11(transitive)
+ Addedbunyan@0.23.1(transitive)
+ Addedconcat-map@0.0.1(transitive)
+ Addedcore-util-is@1.0.2(transitive)
+ Addedcsv@0.4.6(transitive)
+ Addedcsv-generate@0.0.6(transitive)
+ Addedcsv-parse@1.3.3(transitive)
+ Addedcsv-stringify@0.0.8(transitive)
+ Addedctype@0.5.3(transitive)
+ Addeddeep-equal@0.2.2(transitive)
+ Addedextsprintf@1.4.1(transitive)
+ Addedformidable@1.2.6(transitive)
+ Addedglob@6.0.4(transitive)
+ Addedhttp-signature@0.10.1(transitive)
+ Addedinflight@1.0.6(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedlru-cache@2.7.3(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedminimatch@3.1.2(transitive)
+ Addedminimist@1.2.8(transitive)
+ Addedmkdirp@0.5.6(transitive)
+ Addedmv@2.1.1(transitive)
+ Addedncp@2.0.0(transitive)
+ Addednegotiator@0.4.9(transitive)
+ Addednode-uuid@1.4.8(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedpath-is-absolute@1.0.1(transitive)
+ Addedprecond@0.2.3(transitive)
+ Addedqs@1.2.2(transitive)
+ Addedrimraf@2.4.5(transitive)
+ Addedsemver@2.3.2(transitive)
+ Addedspdy@1.32.5(transitive)
+ Addedstream-transform@0.1.2(transitive)
+ Addedtunnel-agent@0.4.3(transitive)
+ Addedverror@1.10.1(transitive)
+ Addedwrappy@1.0.2(transitive)
- Removedassert-plus@0.1.2(transitive)
- Removedbackoff@2.3.0(transitive)
- Removedbunyan@0.22.1(transitive)
- Removedcsv@0.3.7(transitive)
- Removedctype@0.5.2(transitive)
- Removeddeep-equal@0.0.0(transitive)
- Removedextsprintf@1.0.2(transitive)
- Removedformidable@1.0.14(transitive)
- Removedhttp-signature@0.10.0(transitive)
- Removedlru-cache@2.3.1(transitive)
- Removedmime@1.2.11(transitive)
- Removedmv@0.0.5(transitive)
- Removednegotiator@0.3.0(transitive)
- Removednode-uuid@1.4.1(transitive)
- Removedonce@1.3.0(transitive)
- Removedqs@0.6.6(transitive)
- Removedsemver@2.2.1(transitive)
- Removedspdy@1.19.3(transitive)
- Removedtunnel-agent@0.4.0(transitive)
- Removedverror@1.3.7(transitive)
Updatedassert-plus@^0.1.5
Updatedbackoff@^2.3.0
Updatedbunyan@^0.23.1
Updatedcsv@^0.4.0
Updateddeep-equal@^0.2.1
Updatedformidable@^1.0.14
Updatedhttp-signature@^0.10.0
Updatedkeep-alive-agent@^0.0.1
Updatedlru-cache@^2.5.0
Updatedmime@^1.2.11
Updatednegotiator@^0.4.5
Updatednode-uuid@^1.4.1
Updatedonce@^1.3.0
Updatedqs@^1.0.0
Updatedsemver@^2.3.0
Updatedspdy@^1.26.5
Updatedtunnel-agent@^0.4.0
Updatedverror@^1.4.0