HTTPCLIENT-1435: Fluent Executor ignores custom request properties

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk@1544200 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Oleg Kalnichevski 2013-11-21 14:50:55 +00:00
parent ebc83e74d2
commit 1cdbd4383a
3 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,9 @@
Changes since 4.3.1
-------------------
* [HTTPCLIENT-1435] Fluent Executor ignores custom request properties.
Contributed by Oleg Kalnichevski <olegk at apache.org>
* [HTTPCLIENT-1432] Lazy decompressing of HttpEntity#getContent() to avoid EOFException
in case of an empty response with 'Content-Encoding: gzip' header.
Contributed by Yihua Huang <code4crafter at gmail.com>

View File

@ -210,7 +210,7 @@ public Response execute(
this.localContext.setAttribute(HttpClientContext.CREDS_PROVIDER, this.credentialsProvider);
this.localContext.setAttribute(HttpClientContext.AUTH_CACHE, this.authCache);
this.localContext.setAttribute(HttpClientContext.COOKIE_STORE, this.cookieStore);
final HttpRequestBase httprequest = request.getHttpRequest();
final HttpRequestBase httprequest = request.prepareRequest();
httprequest.reset();
return new Response(this.httpclient.execute(httprequest, this.localContext));
}

View File

@ -134,7 +134,8 @@ public static Request Options(final String uri) {
this.configBuilder = RequestConfig.custom();
}
HttpRequestBase getHttpRequest() {
HttpRequestBase prepareRequest() {
this.request.setConfig(this.configBuilder.build());
return this.request;
}