Skip to content

Commit

Permalink
Merge pull request Medium#265 from Medium/nick-nodejs
Browse files Browse the repository at this point in the history
Turn off strictssl on node v0.10.34. Fixes Medium#262
  • Loading branch information
nicks committed Dec 19, 2014
2 parents bf1ec7a + a54f760 commit e4bb0d6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion install.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,12 +205,19 @@ function findSuitableTempDirectory(npmConf) {


function getRequestOptions(conf) {
var strictSSL = conf.get('strict-ssl')
if (process.version == 'v0.10.34') {
console.log('Node v0.10.34 detected, turning off strict ssl due to https://github.com/joyent/node/issues/8894')
strictSSL = false
}


var options = {
uri: downloadUrl,
encoding: null, // Get response as a buffer
followRedirect: true, // The default download path redirects to a CDN URL.
headers: {},
strictSSL: conf.get('strict-ssl')
strictSSL: strictSSL
}

var proxyUrl = conf.get('https-proxy') || conf.get('http-proxy') || conf.get('proxy')
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "phantomjs",
"version": "1.9.12",
"version": "1.9.13",
"keywords": [
"phantomjs",
"headless",
Expand Down

0 comments on commit e4bb0d6

Please sign in to comment.