Hello Johannes, > when after a redirect response a retry is done by the > DefaultClientRequestDirector,
DCRD retries if there is an IO error. In that case, the original request is used. If a redirect response is received, there is no retry. Redirects are handled by creating a new request for the redirect target. > the RoutedRequest returned by the > handleResponse method does not contain the request headers from the > original request. Is this behaviour intended? Yes it is. There is no way to decide which headers of the original request could be meaningful for the redirect location. > How can I get the headers from the first request into the second? Not at all, but you can add headers to the second request as you require. > Do I have to add a request interceptor? That is one way. The same request interceptors will be applied to the request from your application and to the redirected request. You can implement an interceptor that adds all headers you want to add to both requests. There is also a parameter DEFAULT_HEADERS among the client parameter names. It can be set per request if necessary. That's probably the easiest way. Finally, you could disable automatic redirect handling and take care of the redirect in your application. Or you could implement a custom ClientRequestDirector. Those are the most complex options. hope that helps, Roland --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
