From 52316f7d4e0aff3da49235084108002b74b41b24 Mon Sep 17 00:00:00 2001 From: Ollie Relph Date: Fri, 20 Feb 2015 12:57:01 +0000 Subject: [PATCH 1/4] Set cipher to one that matches the certificates used for testing strictSSL --- tests/server.js | 2 +- tests/test-https.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/server.js b/tests/server.js index e6f398dee..c8556f5e8 100644 --- a/tests/server.js +++ b/tests/server.js @@ -34,7 +34,7 @@ exports.createSSLServer = function(port, opts) { } for (i in options) { - if (i !== 'requestCert' && i !== 'rejectUnauthorized') { + if (i !== 'requestCert' && i !== 'rejectUnauthorized' && i !== 'ciphers') { options[i] = fs.readFileSync(options[i]) } } diff --git a/tests/test-https.js b/tests/test-https.js index 04b1aa423..396a73d83 100644 --- a/tests/test-https.js +++ b/tests/test-https.js @@ -13,6 +13,7 @@ var s = server.createSSLServer() , caFile = path.resolve(__dirname, 'ssl/ca/ca.crt') , ca = fs.readFileSync(caFile) , opts = { + ciphers: 'AES256-SHA', key: path.resolve(__dirname, 'ssl/ca/server.key'), cert: path.resolve(__dirname, 'ssl/ca/server.crt') } From 3cbfd21038f8dccdcb01b0b7a9f94e45af73a840 Mon Sep 17 00:00:00 2001 From: simov Date: Mon, 9 Mar 2015 12:33:50 +0200 Subject: [PATCH 2/4] Fix http.setTimeout now allowing negative msecs value --- request.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/request.js b/request.js index c6507620c..d18a559e0 100644 --- a/request.js +++ b/request.js @@ -896,17 +896,18 @@ Request.prototype.start = function () { self.req = self.httpModule.request(reqOptions) if (self.timeout && !self.timeoutTimer) { + var timeout = self.timeout < 0 ? 0 : self.timeout self.timeoutTimer = setTimeout(function () { self.abort() var e = new Error('ETIMEDOUT') e.code = 'ETIMEDOUT' self.emit('error', e) - }, self.timeout) + }, timeout) // Set additional timeout on socket - in case if remote // server freeze after sending headers if (self.req.setTimeout) { // only works on node 0.6+ - self.req.setTimeout(self.timeout, function () { + self.req.setTimeout(timeout, function () { if (self.req) { self.req.abort() var e = new Error('ESOCKETTIMEDOUT') From bca9d92b5d08c5d67913da02ba9820f8e7aea43e Mon Sep 17 00:00:00 2001 From: simov Date: Mon, 9 Mar 2015 12:34:49 +0200 Subject: [PATCH 3/4] Remove npm script left over --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index accaafdd9..d14517142 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "isstream": "~0.1.1" }, "scripts": { - "test": "npm run lint && node node_modules/.bin/taper tests/test-*.js && npm run test-browser && npm run clean", + "test": "npm run lint && node node_modules/.bin/taper tests/test-*.js && npm run test-browser", "test-browser": "node tests/browser/start.js", "lint": "node node_modules/.bin/eslint lib/ *.js tests/ && echo Lint passed." }, From 27b98154592d59528dae2614fb03fea5c6d9c688 Mon Sep 17 00:00:00 2001 From: simov Date: Mon, 9 Mar 2015 12:37:14 +0200 Subject: [PATCH 4/4] Re-enable iojs/node 0.12 in build script, remove message from readme --- .travis.yml | 8 ++------ README.md | 8 -------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 98472f761..bd0f638eb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,8 @@ language: node_js node_js: - - "0.10" - - "0.12" - "io.js" -matrix: - allow_failures: - - node_js: "0.12" - - node_js: "io.js" + - "0.12" + - "0.10" after_script: ./node_modules/.bin/istanbul cover ./node_modules/tape/bin/tape tests/test-*.js --report lcovonly && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js --verbose webhooks: urls: https://webhooks.gitter.im/e/237280ed4796c19cc626 diff --git a/README.md b/README.md index 00f4b17d6..a966df478 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,6 @@ [![Coverage](https://img.shields.io/coveralls/request/request.svg?style=flat)](https://coveralls.io/r/request/request) [![Gitter](https://img.shields.io/badge/gitter-join_chat-blue.svg?style=flat)](https://gitter.im/request/request?utm_source=badge) -## !!! Does not work with Node v0.12.x !!! - -We're working on this. Want to help? See the -[contribution guidelines](https://github.com/request/request/blob/master/CONTRIBUTING.md), -help us fix the -[failing tests](https://travis-ci.org/request/request/jobs/49916823), -and [submit a PR](https://github.com/request/request/pulls)! - ## Super simple to use Request is designed to be the simplest way possible to make http calls. It supports HTTPS and follows redirects by default.