Closed scottARob closed 10 months ago
I think its due to this change https://github.com/locustio/locust/pull/2416/files
it is possible that get_encoding_from_headers function will return None which will throw the above error. Need to return as a empty string as per 2.17
Oh... yea sounds about right. Or maybe we should just not try to decode at all when there is no content? I dont have time to look at this right now...
Could just throw in a condition as a quick fix so are able to still utilise the requests lib
self.encoding = get_encoding_from_headers(self.headers)
if self.encoding is None:
self.encoding = ""
self.encoding = get_encoding_from_headers(self.headers) or ""
Prerequisites
Description
Sending a request that generates a no content response is throwing a error when using fasthttp rest. This isn't happening under 2.17
Command line
Locust UI
Locustfile contents
Python version
3.11
Locust version
2.18
Operating system
linux