Fix empty bytearray(b'') returned when using catch_response=True #1105
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a potential fix for a bug that causes the content to be "dropped" when passing
catch_response=True
in combination withFastHttpLocust
.To recreate, run following locust-file with locust v0.12.0:
Inside
ResponseContextManager.__init__
the responses__dict__
is copied over, but for some reason the content doesn't tag along...To be honest, I'm still not entirely sure why it gets dropped, might even be something in
geventhttpclient
but this fixes the issue and seems unobtrusive enough.Please have a look, if anyone has a better solution, I'm all ears :)