Bumping to 0.7.3 oauth 2 now sending a Content-Length header of 0 to

play well with github/nginx.
This commit is contained in:
ciaranj 2010-06-01 21:03:23 +01:00
parent 76cddbdf2b
commit 09d613cd46
3 changed files with 9 additions and 5 deletions

View File

@ -4,11 +4,12 @@ A simple oauth API for node.js . This API allows users to authenticate against
Tested against both Twitter (http://twitter.com), term.ie (http://term.ie/oauth/example/) and Yahoo!
Also provides rudimentary OAuth2 support, tested against facebook connect.
Also provides rudimentary OAuth2 support, tested against facebook connect and github. For more complete usage examples please take a look
at express-auth (http://github.com/ciaranj/express-auth)
Change History
==============
0.7.3 - OAuth 2 now sends a Content-Length Http header to keep nginx happy :)
0.7.2 - Fixes some broken unit tests!
0.7.0 - Introduces support for HTTPS end points and callback URLS for OAuth 1.0A and Oauth 2 (Please be aware that this was a breaking change to the constructor arguments order)

View File

@ -38,6 +38,9 @@ exports.OAuth2.prototype._request= function(method, url, headers, access_token,
}
}
realHeaders['Host']= parsedUrl.host;
//TODO: Content length should be dynamic when dealing with POST methods....
realHeaders['Content-Length']= 0;
if( access_token ) {
if( ! parsedUrl.query ) parsedUrl.query= {};
parsedUrl.query["access_token"]= access_token;

View File

@ -1,4 +1,4 @@
---
name: oauth
description: An implementation of an OAuth client.
version: 0.7.2
version: 0.7.3