Added tests for 302 redirect functionality
This commit is contained in:
@ -310,7 +310,7 @@ exports.OAuth.prototype._performSecureRequest= function( oauth_token, oauth_toke
|
||||
response.on('end', function () {
|
||||
if( response.statusCode != 200 ) {
|
||||
// Follow 302 redirects with Location HTTP header
|
||||
if(response.statusCode == 302 && response.headers.location) {
|
||||
if(response.statusCode == 302 && response.headers && response.headers.location) {
|
||||
self._performSecureRequest( oauth_token, oauth_token_secret, method, response.headers.location, extra_params, post_body, post_content_type, callback);
|
||||
}
|
||||
else {
|
||||
|
Reference in New Issue
Block a user