Skip to content

Commit

Permalink
Add test case for iter_lines method
Browse files Browse the repository at this point in the history
  • Loading branch information
MasterKey-Pro committed Jan 10, 2025
1 parent 563dab3 commit 21dd327
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 @@ -303,7 +303,7 @@ def iter_lines(self, url: str, **kwargs) -> Generator[str, None, None]:
response = self.request("GET", url, stream=True, **kwargs)
response.raise_for_status()
buffer = ""
for chunk in response.iter_content(chunk_size=1024):
for chunk in response.iter_content(chunk_size=1024, decode_content=True):
buffer += chunk.decode("utf-8")
while "\n" in buffer:
line, buffer = buffer.split("\n", 1)
Expand Down

0 comments on commit 21dd327

Please sign in to comment.