Skip to content

Instantly share code, notes, and snippets.

@beaugunderson
Created November 10, 2012 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beaugunderson/4052252 to your computer and use it in GitHub Desktop.
Save beaugunderson/4052252 to your computer and use it in GitHub Desktop.
oauth 0.9.6 vs. zeo/oauth
diff -r -u node_modules/oauth/lib/oauth.js oauth/lib/oauth.js
--- node_modules/oauth/lib/oauth.js 2012-03-02 13:38:30.000000000 -0800
+++ oauth/lib/oauth.js 2012-11-10 11:42:55.000000000 -0800
@@ -309,7 +309,8 @@
headers["Authorization"]= authorization;
}
- headers["Host"] = parsedUrl.host
+ headers["Host"] = parsedUrl.host;
+ headers["Referer"] = 'http://localhost:8042';
for( var key in this._headers ) {
if (this._headers.hasOwnProperty(key)) {
@@ -450,8 +451,8 @@
return this._performSecureRequest( oauth_token, oauth_token_secret, "DELETE", url, null, "", null, callback );
}
-exports.OAuth.prototype.get= function(url, oauth_token, oauth_token_secret, callback) {
- return this._performSecureRequest( oauth_token, oauth_token_secret, "GET", url, null, "", null, callback );
+exports.OAuth.prototype.get= function(url, oauth_token, oauth_token_secret, extra_params, content_type, callback) {
+ return this._performSecureRequest( oauth_token, oauth_token_secret, "GET", url, extra_params, "", content_type, callback );
}
exports.OAuth.prototype._putOrPost= function(method, url, oauth_token, oauth_token_secret, post_body, post_content_type, callback) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment