Copy request headers from the original request to the redirected request

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@651072 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2008-04-23 21:32:33 +00:00
parent e487e799c2
commit 769484f71e
1 changed files with 4 additions and 0 deletions

View File

@ -813,6 +813,10 @@ public class DefaultClientRequestDirector
uri.getScheme()); uri.getScheme());
HttpGet redirect = new HttpGet(uri); HttpGet redirect = new HttpGet(uri);
HttpRequest orig = request.getOriginal();
redirect.setHeaders(orig.getAllHeaders());
RequestWrapper wrapper = new RequestWrapper(redirect); RequestWrapper wrapper = new RequestWrapper(redirect);
wrapper.setParams(params); wrapper.setParams(params);