Skip to content

Commit

Permalink
httpcompression middleware: empty body in bytes, not str
Browse files Browse the repository at this point in the history
  • Loading branch information
heorhiikorzh committed Nov 13, 2023
1 parent 137ba34 commit 123c8ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scrapy/downloadermiddlewares/httpcompression.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def _decode(self, body: bytes, encoding: bytes) -> bytes:
if b"br" in ACCEPTED_ENCODINGS:
body = brotli.decompress(body)
else:
body = ""
body = bytes()
logger.warning(
"Brotli encoding received. "
"Cannot decompress the body as Brotli is not installed."
Expand Down

0 comments on commit 123c8ab

Please sign in to comment.