forked from lix-project/lix
Log the decompressed body in case of http errors
Don't show the users the raw (possibly compressed) error message as everyone isn't able to decompress brotli in their brain.
This commit is contained in:
parent
85dbf9de8e
commit
1a825b6919
|
@ -88,6 +88,10 @@ struct curlFileTransfer : public FileTransfer
|
|||
{request.uri}, request.parentAct)
|
||||
, callback(std::move(callback))
|
||||
, finalSink([this](std::string_view data) {
|
||||
if (errorSink) {
|
||||
(*errorSink)(data);
|
||||
}
|
||||
|
||||
if (this->request.dataCallback) {
|
||||
auto httpStatus = getHTTPStatus();
|
||||
|
||||
|
@ -163,8 +167,6 @@ struct curlFileTransfer : public FileTransfer
|
|||
}
|
||||
}
|
||||
|
||||
if (errorSink)
|
||||
(*errorSink)({(char *) contents, realSize});
|
||||
(*decompressionSink)({(char *) contents, realSize});
|
||||
|
||||
return realSize;
|
||||
|
|
Loading…
Reference in a new issue