Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Http.sys questions
#22
(01-27-2022, 09:18 PM)Alexandre Machado Wrote:
(01-27-2022, 07:45 AM)magosk Wrote: Thanks for the explanation Alexandre!

(Yes, this was a sync call). Rather than removing it, I have modified my code so that it works with both older and newer versions of IntraWeb.

/Magnus

Can you please let me know how you changed it? It may be important for me to understand what your issue was

I just did this modification, so that the code would still work with IW 15.1 and prior, but do no change to the response in IW 15.2 when it is already a redirect (I guess the issue was that a duplicate Location header was created before):

Code:
procedure ChangeResponseCodeFromOKToRedirect(const URL: string);
begin
  if (WebApplication.Response.Code < 301) or (WebApplication.Response.Code > 303) then
    WebApplication.Response.Code := 302;
  if WebApplication.Response.Headers.IndexOfName('Location') < 0 then
    WebApplication.Response.AddHeader('Location', URL);
end{procedure};
Reply


Messages In This Thread
Http.sys questions - by magosk - 11-30-2021, 03:52 PM
RE: Http.sys questions - by Jose Nilton Pace - 11-30-2021, 04:51 PM
RE: Http.sys questions - by Alexandre Machado - 12-02-2021, 08:43 AM
RE: Http.sys questions - by magosk - 12-02-2021, 09:04 AM
RE: Http.sys questions - by magosk - 12-07-2021, 12:52 PM
RE: Http.sys questions - by kudzu - 12-17-2021, 07:22 PM
RE: Http.sys questions - by magosk - 12-20-2021, 10:17 AM
RE: Http.sys questions - by kudzu - 12-20-2021, 08:47 PM
RE: Http.sys questions - by magosk - 12-21-2021, 06:51 AM
RE: Http.sys questions - by Alexandre Machado - 01-12-2022, 08:34 PM
RE: Http.sys questions - by Alexandre Machado - 01-12-2022, 08:43 PM
RE: Http.sys questions - by magosk - 01-13-2022, 07:20 AM
RE: Http.sys questions - by Alexandre Machado - 01-19-2022, 06:20 AM
RE: Http.sys questions - by DanBarclay - 01-22-2022, 11:00 PM
RE: Http.sys questions - by magosk - 01-24-2022, 02:10 PM
RE: Http.sys questions - by magosk - 01-26-2022, 04:08 PM
RE: Http.sys questions - by Alexandre Machado - 01-27-2022, 04:16 AM
RE: Http.sys questions - by magosk - 01-27-2022, 07:45 AM
RE: Http.sys questions - by Alexandre Machado - 01-27-2022, 09:18 PM
RE: Http.sys questions - by magosk - 01-28-2022, 06:32 AM
RE: Http.sys questions - by magosk - 01-27-2022, 12:21 PM
RE: Http.sys questions - by Alexandre Machado - 01-27-2022, 09:19 PM
RE: Http.sys questions - by magosk - 01-31-2022, 12:42 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)