-
Notifications
You must be signed in to change notification settings - Fork 237
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
Listen for decompressor error events #172
Conversation
Good catch! Thanks. |
|
||
it('should rethrow errors from decompressors', function(done){ | ||
needle.get('localhost:' + port, {headers: {'Accept-Encoding': 'deflate', 'With-Bad': 'true'}}, function(err, response, body){ | ||
should.exist(err); |
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.
Can you also test for the type of error we're expecting?
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.
Updated the test to check the error code and message.
Which version of node did you test against? I'm using v4.4.6 and the last spec within compression_spec is not passing:
|
Was using 5.x. I see that you merged anyway was it a transient issue? |
I tested before but I think I might have been using a different version. Would you be able to take a look at this under 4.x? |
Noticed a malformed server response was causing uncaught errors in the client response pipeline. Small fix to register
error
handler on the decompressor stream and accompanying test.