hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ortwin Gl├╝ck <ortwin.glu...@nose.ch>
Subject Re: Change domains after faking a POST?
Date Wed, 21 Jan 2004 16:13:52 GMT
D Alvarado wrote:
> Ok, sorry in advance, I'm sort of a novice at all
> of this, but why not?  Also, let's just
> theoretically say that someone else (not me, of
> course), just blindly spit back the response.  Is
> it possible to tell the client to treat the
> response in the context of www.otherdomain.com
> instead of www.mydomain.com?
> 
> Thanks for your prompt reply - 

If you try and think this through carefully, you will see that the term 
"in the context of" will inadvertly lead to ambiguities. What about 
images referenced by the document, how must they be resolved? What about 
links to other domains, do we still have to use the "proxy" or can we 
just reach them directly?

Please for the sake of the architecture of your application, do not 
blindly relay content to the client.  The Http Proxy standard was 
specifically made for that purpose. So do not believe you can do better 
- you will fail terribly.

There is also an interface argumentation. You know your server and 
therefore can interprete it's response. The client does not know your 
server (it only knows you, if it knew the other server it would not have 
to speak to you) and therefore can not know how to interprete that 
servers response. So keep the knowledge about the remote server where it 
belongs to: in your code.

Odi



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message