The code that does the header removal is here:
https://github.com/restlet/restlet-framework-java/blob/2.2/modules/org.restlet/src/org/restlet/routing/Redirector.java#L405-L413
If you're confident that that's what you want, you can extend Redirector
and override serverRedirect to do everything it normally *except* remove
those headers.
--tim
On Wed, Apr 16, 2014 at 9:52 AM, Primož Kokol primoz.ko...@gmail.comwrote:
I am trying to create a transparent reverse proxy using
org.restlet.routing.Redirector.
For the sake of simplicity let's say all I want to do is to redirect all
requests pointing at
http://localhost:80
to be dispatched to another unrelated server:
http://localhost:8080
I've wrote a simple reverse proxy using Redirector (MODE_SERVER_OUTBOUND
mode) and it actually works as expected in the sense that it dispatches
requests properly and also handles redirects.
But now let's say that resources at http://localhost:8080 are protected
with Digest authentication mechanism.
Now the problem is that headers in requests and responses when handled by
Redirector are removed which makes Digest authentication mechanism unusable.
From docs WRT MODE_SERVER_OUTBOUND:
Note that in this mode, the headers of HTTP requests, stored in the
request's attributes, are removed before dispatching. Also, when a HTTP
response comes back the headers are also removed.
Is there any way to leave headers intact so that end server (
http://localhost:8080) and clients could communicate as there is no proxy
in between?
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3076621
--
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447dsMessageId=3076672