-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix incorrect response object being emitted on redirect #1761
Conversation
dbec926
to
8935ad9
Compare
8935ad9
to
e2538f3
Compare
@@ -551,12 +551,13 @@ Request.prototype._redirect = function (res) { | |||
_initHeaders(this); | |||
|
|||
// redirect | |||
this.res = res; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@titanism This is the main change I'm not super certain about. Without doing this, a couple of the tests around .pipe()
fail because there's no this.res
on the response. I don't know if this assignment has the potential to screw anything else up.
v8.0.9 released to npm and GitHub releases https://github.com/ladjs/superagent/releases/tag/v8.0.9 |
Changes the argument emitted with the redirect event to a Supertest
Response
object instead of an unwrappedIncomingMessage
.Closes #1760
Checklist