You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ramazan Yildirim <ra...@turkcellgroup.com> on 2002/09/06 10:25:50 UTC

Proxy Servlet

Is it possible to develop a proxy servlet on Tomcat that you could access HTTP request as a raw stream (both header and the body)  (not wrapped with HttpServletRequest object) and generating the HTTP response as it is in Non- Parsed CGI scripts. 
What I want to do is a dummy HTTP proxy:

1) You receive the request within the servlet
2) Setup a TCP connection with the remote server
3) Just pass the raw HTTP request stream through this connection
4) Get the response back from the remote server
5) Pump the reponse back to the client untouched (Web Server musn't decorate the response)

Normally what happens with the 5th step is Tomcat/Web Server thinks that what Servlet pumps is the body of the final HTTP response, and decorates it with a HTTP header.

I normally don't want to parse the response from the remote host and use HttpServletResponse to genarete the client response.

It would really be appreciated if you could help.

Ramazan YILDIRIM

***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed.
If you are not the intended recipient you are hereby notified that any
dissemination, forwarding, copying or use of any of the information is
prohibited.
The opinions expressed in this message belong to sender alone. There is no
implied endorsement by MAPCO.
This e-mail has been scanned for all known computer viruses.

***************************************************************************


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>