Skip to content
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(http): handle response decompression properly #1563

Merged
merged 1 commit into from
Aug 5, 2022

Conversation

luneo7
Copy link
Contributor

@luneo7 luneo7 commented Aug 4, 2022

Almost the same thing as #999

Since we are using decompressResponse and on('data') is added to it, on('end') should also be executed on the decompressResponse... but it is being executed on raw response causing a race condition, so when response end happens, response data didn't happen yet, and we end up with empty body string.

This PR makes the handle response use decompressResponse for everything instead of mixing raw response object and the decompress response object.

Fixes #1562

@CLAassistant
Copy link

CLAassistant commented Aug 4, 2022

CLA assistant check
All committers have signed the CLA.

@luneo7 luneo7 changed the title Fix response decompression fix(http): handle response decompression properly Aug 4, 2022
@luneo7
Copy link
Contributor Author

luneo7 commented Aug 4, 2022

/cc @hassy

Copy link

@murillomarques murillomarques left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work.

@hassy
Copy link
Member

hassy commented Aug 5, 2022

nice one @luneo7, thanks for your PR!

@hassy hassy merged commit c7a91ea into artilleryio:master Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Artillery 2.0.0-22 Gzip Decoding + capture doesn't work
6 participants