hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Rewriting the path of a URI in org.apache.http.examples.nio.NHttpReverseProxy
Date Thu, 11 May 2017 12:56:03 GMT
On Thu, 2017-05-11 at 00:33 -0700, Gary Gregory wrote:
> On May 11, 2017 12:29 AM, "Oleg Kalnichevski" <olegk@apache.org>
> wrote:
> 
> On Thu, 2017-05-11 at 00:02 -0700, Gary Gregory wrote:
> > Hi All,
> > 
> > (I am not proposing to change NHttpReverseProxy but my code in a
> > descendant
> > of NHttpReverseProxy).
> > 
> > How would I change the path of a request's URI before it is
> > forwarded
> > to
> > the origin server?
> > 
> 
> This entirely depends on what kind requests the origin server
> expects.
> If your proxy expects absolute request URIs but the origin does
> relative ones then rewrite the request URI as relative and generate
> Host header with the authority components of the original URI.
> 
> 
> Let's the proxy receives /foo/bar and the origin server wants
> /beep/bop/foo/bar
> 
> Does your suggestion apply?
> 

It does, if the reverse proxy is meant to re-route requests.

Oleg 


> Gary
> 
> 
> Oleg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
> For additional commands, e-mail: dev-help@hc.apache.org

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


Mime
View raw message