01-26-2022, 04:08 PM
Hi again. I have made some more test of our web applications with the latest IW version. Found some small issues that I was able to fix on our side. But there is one thing that worked in 15.1.5 that now no longer works. For security reasons, we sometimes change the response code to a redirect when the previous post may have contained sensitive information (such as login details). We have code like this (suggested by you Alexandre if I recall correctly):
If I now call TerminateWithRedirectResponseCode(URL) rather than just WebApplication.TerminateAndRedirect(URL), I now get a ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION error. Do you know how I can fix this issue?
Best regards
Magnus Oskarsson
Code:
procedure ChangeResponseCodeFromOKToRedirect(const URL: string);
begin
WebApplication.Response.Code := 302;
WebApplication.Response.AddHeader('Location', URL);
end{procedure};
procedure TerminateWithRedirectResponseCode(const URL: string);
begin
WebApplication.TerminateAndRedirect(URL);
ChangeResponseCodeFromOKToRedirect(URL);
end{procedure};If I now call TerminateWithRedirectResponseCode(URL) rather than just WebApplication.TerminateAndRedirect(URL), I now get a ERR_RESPONSE_HEADERS_MULTIPLE_LOCATION error. Do you know how I can fix this issue?
Best regards
Magnus Oskarsson

