Commit 8fc874b6 authored by Philipp Hörist's avatar Philipp Hörist
Browse files

cfix: Don’t sniff content on unsuccessful responses

parent feffa352
......@@ -407,6 +407,10 @@ class HTTPRequest(GObject.GObject):
_params: GLib.HashTable,
) -> None:
if self._message.get_status() not in (Soup.Status.OK,
headers = message.get_response_headers()
encoding = headers.get_encoding()
if Soup.Encoding.CONTENT_LENGTH not in convert_soup_encoding(encoding):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment