Make sure redirect response body is fully consumed, if present

git-svn-id: https://svn.apache.org/repos/asf/jakarta/httpcomponents/httpclient/trunk@537382 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2007-05-12 10:44:13 +00:00
parent c04bd63e47
commit e7f0a20c5e
1 changed files with 6 additions and 0 deletions

View File

@ -549,6 +549,12 @@ public class DefaultClientRequestDirector
(proxy != null), (proxy != null),
(proxy != null)); (proxy != null));
// Make sure redirect response body is fully consumed, if present
HttpEntity entity = response.getEntity();
if (entity != null) {
entity.consumeContent();
}
HttpGet redirect = new HttpGet(uri); HttpGet redirect = new HttpGet(uri);
if (LOG.isDebugEnabled()) { if (LOG.isDebugEnabled()) {