Navigation Menu

Skip to content

Commit

Permalink
Bumping to 0.7.3 oauth 2 now sending a Content-Length header of 0 to
Browse files Browse the repository at this point in the history
play well with github/nginx.
  • Loading branch information
ciaranj committed Jun 1, 2010
1 parent 76cddbd commit 09d613c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Readme.md
Expand Up @@ -4,12 +4,13 @@ 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.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)
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)


3 changes: 3 additions & 0 deletions lib/oauth2.js
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion seed.yml
@@ -1,4 +1,4 @@
---
name: oauth
description: An implementation of an OAuth client.
version: 0.7.2
version: 0.7.3

0 comments on commit 09d613c

Please sign in to comment.