Re: IdHTTPProxyServer redirecting Page ?

Giganews Newsgroups
Subject:Re: IdHTTPProxyServer redirecting Page ?
Posted by: Remy Lebeau (no.spam@no.spam.com)
Date:Sun, 3 May 2009

<Kasumovic Mario> wrote in message news:1120…@forums.codegear.com...

> can you show me small example how i should do this ?

{code:delphi}
procedure TForm1.IdHTTPProxyServer1HTTPBeforeCommand(AContext:
TIdHTTPProxyServerContext);
begin
  with AContext.Connection.IOHandler do
  begin
    WriteLn('HTTP/1.0 302 Moved Temporarily');
    WriteLn('Location: the_url_to_redirect_to);
    WriteLn('Connection: close');
    WriteLn;
  end;
  raise Exception.Create('');
end;
{code}

--
Remy Lebeau (TeamB)

Replies

None

In response to

Re: IdHTTPProxyServer redirecting Page ? posted by Kasumovic Mario on Sat, 2 May 2009