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…@yahoo.com)
Date: Mon, 1 Sep 2003

"Clovis" <clovis_wichos…@uol.com.br> wrote in message
news:6B3D1B7A337DE240clovis_wichos…@uol.com.br...
> 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.

Gambit

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

Replies

In response to

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