Save cookies on redirect response (#6094)

Co-authored-by: Jeroen Vinke <jeroen.vinke@iddinkgroup.com>
This commit is contained in:
Jeroen Vinke
2025-12-15 09:38:20 +01:00
committed by GitHub
parent 8cbda5f5cc
commit 1b9ea478da
2 changed files with 8 additions and 0 deletions

View File

@@ -546,6 +546,10 @@ const runSingleRequest = async function (
err.response.dataBuffer = dataBuffer;
response = err.response;
if (!options.disableCookies) {
saveCookies(request.url, err.response.headers);
}
// Prevents the duration on leaking to the actual result
responseTime = response.headers.get('request-duration');
response.headers.delete('request-duration');

View File

@@ -1417,6 +1417,10 @@ const registerNetworkIpc = (mainWindow) => {
error.response.data = data;
error.response.dataBuffer = dataBuffer;
if (preferencesUtil.shouldStoreCookies()) {
saveCookies(request.url, error.response.headers);
}
timeEnd = Date.now();
response = {
status: error.response.status,