Skip to content

Commit

Permalink
Merge pull request #1468 from simov/fix-msecs
Browse files Browse the repository at this point in the history
Re-enable io.js/node 0.12 build
  • Loading branch information
simov committed Mar 10, 2015
2 parents 8109dc0 + 27b9815 commit 2377115
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 18 deletions.
8 changes: 2 additions & 6 deletions .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
Expand Down
8 changes: 0 additions & 8 deletions README.md
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -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."
},
Expand Down
5 changes: 3 additions & 2 deletions request.js
Expand Up @@ -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')
Expand Down
2 changes: 1 addition & 1 deletion tests/server.js
Expand Up @@ -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])
}
}
Expand Down
1 change: 1 addition & 0 deletions tests/test-https.js
Expand Up @@ -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')
}
Expand Down

0 comments on commit 2377115

Please sign in to comment.