Skip to content

Commit

Permalink
Merge pull request #2451 from scottARob/iss_2450-return-str-when-none…
Browse files Browse the repository at this point in the history
…-on-encoding

FastHttpUser: encoding return str when response is empty
  • Loading branch information
cyberw authored Nov 8, 2023
2 parents e4e3d64 + 1892328 commit b3587cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion locust/contrib/fasthttp.py
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ def text(self) -> Optional[str]:
if self.headers is None:
self.encoding = "utf-8"
else:
self.encoding = get_encoding_from_headers(self.headers)
self.encoding = get_encoding_from_headers(self.headers) or ""
return str(self.content, self.encoding, errors="replace")

@property
Expand Down

0 comments on commit b3587cc

Please sign in to comment.