Skip to content
Browse files

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

play well with github/nginx.
  • Loading branch information...
1 parent 76cddbd commit 09d613cd46ca0e4dbfe88674c28f0b765f3e6152 @ciaranj ciaranj committed
Showing with 9 additions and 5 deletions.
  1. +5 −4 Readme.md
  2. +3 −0 lib/oauth2.js
  3. +1 −1 seed.yml
View
9 Readme.md
@@ -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)
View
3 lib/oauth2.js
@@ -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
2 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.
Something went wrong with that request. Please try again.