Skip to content

Commit

Permalink
Added proxy auth.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeal committed Dec 2, 2010
1 parent 38eb1d2 commit 45d41df
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ function request (options, callback) {
if (options.uri.auth && !options.headers.authorization) {
options.headers.authorization = "Basic " + toBase64(options.uri.auth);
}
if (options.proxy.auth && !options.headers['proxy-authorization']) {
options.headers['proxy-authorization'] = "Basic " + toBase64(options.proxy.auth);
}

options.fullpath = options.uri.href.replace(options.uri.protocol + '//' + options.uri.host, '');
if (options.fullpath.length === 0) options.fullpath = '/'

Expand Down

0 comments on commit 45d41df

Please sign in to comment.