Fix issue #159 #162

Merged
merged 2 commits into from Feb 8, 2012

Projects

None yet

2 participants

@dpetukhov
  1. Request freezes when remote server send headers and stops.
  2. Timeout not sets after redirecting request.
    https://github.com/mikeal/request/blob/master/main.js#L361 - on this line self.timeoutTimer stay assigned after redirect
    https://github.com/mikeal/request/blob/master/main.js#L487 - this line failed after redirect because self.timeoutTimer has value

Please tell me if you have additional requirements for accept this patch. Docs update, additional test, etc.

Regards,
Dmitry

@mikeal
Member
mikeal commented Jan 23, 2012

only set the additional socketTimeout if the timeout option is set, otherwise it should use the default socket timeout which should propagate (as of 0.6.0) to the request object and we'll already handle it.

also, test to make sure that aborting the request doesn't already cause an error. if it does then we'll end up emitting double-errors.

@dpetukhov

This block inside if (self.timeout) and socket timeout will be applied only with current setTimeout mechanism.

About double error: I will check it.

@mikeal
Member
mikeal commented Jan 23, 2012

Great, after you check on the double error comment and I'll merge.

@dpetukhov
Owner

I forgot these lines in previous commit

@mikeal mikeal merged commit 28057df into request:master Feb 8, 2012
@Ajido Ajido referenced this pull request in superbrothers/node-imageviewurlreplace Jan 1, 2013
Open

インターフェイス変更 #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment