Re: How to foward POSTS to another server

Giganews Newsgroups
Subject: Re: How to foward POSTS to another server
Posted by:  Remy Lebeau (TeamB) (gambit…
Date: Mon, 1 Sep 2003

"Clovis" <clovis_wichos…> wrote in message
> How if I have a TIdHTTPServer installed in one machine when
> it receive a POST with document that contains /servlet substring
> I foward this request to another Web Server and return the
> results using the same request, note this isn´t a redirect.

You need to use a separate TIdHTTP client in your OnCommandGet event
handler, and essentially send a new request to the second server containing
the data of the first request.  Since Indy is blocking, you will still be
inside the event handler for the first request during the processing of the
second request, so you can fill in response info of the first request using
the response data of the second request.


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/03


In response to

How to foward POSTS to another server posted by Clovis on Mon, 1 Sep 2003