Skip to content

Commit

Permalink
Add rest of the ssl related options supported by ws and https.request.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony Kovanen committed Oct 11, 2014
1 parent 918c00e commit a6b6f29
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions lib/XMLHttpRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -386,9 +386,13 @@ function XMLHttpRequest(opts) {
};

if (ssl) {
options.pfx = opts.pfx;
options.key = opts.key;
options.passphrase = opts.passphrase;
options.cert = opts.cert;
options.ca = opts.ca;
options.ciphers = opts.ciphers;
options.rejectUnauthorized = opts.rejectUnauthorized;
}

// Reset error flag
Expand Down Expand Up @@ -428,9 +432,13 @@ function XMLHttpRequest(opts) {
};

if (ssl) {
newOptions.key = opts.key;
newOptions.cert = opts.cert;
newOptions.ca = opts.ca;
options.pfx = opts.pfx;
options.key = opts.key;
options.passphrase = opts.passphrase;
options.cert = opts.cert;
options.ca = opts.ca;
options.ciphers = opts.ciphers;
options.rejectUnauthorized = opts.rejectUnauthorized;
}

// Issue the new request
Expand Down

3 comments on commit a6b6f29

@fengmk2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this commit merge into https://github.com/driverdan/node-XMLHttpRequest ?
engine.io-client dependency on this change.

But using github hash dependencies "xmlhttprequest": "rase-/node-XMLHttpRequest#a6b6f2" will be a problem for npm install engine.io-client in China.

Normal Chinese user visit github too slow if he/she don't have a VPN or Proxy.

@fengmk2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or we should publish a new module xmlhttprequest2 instead of xmlhttprequest

@alsotang
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

xmlhttprequestcn...

Please sign in to comment.