hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HTTPCLIENT-1645) fluent api not kept CookieSpecs from RequestConfig for HttpClients.custom for fluent.Executor
Date Fri, 01 May 2015 09:12:06 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-1645?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oleg Kalnichevski resolved HTTPCLIENT-1645.
-------------------------------------------
       Resolution: Fixed
    Fix Version/s: 4.5

Fixed in SVN trunk
http://svn.apache.org/r1677103

Oleg

> fluent api not kept CookieSpecs from RequestConfig for HttpClients.custom for fluent.Executor

> ----------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-1645
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1645
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: Fluent HC
>    Affects Versions: 4.4.1
>         Environment: windows 7, jdk7 x64
>            Reporter: msangel
>             Fix For: 4.5
>
>
> Default parser are unable to parse this cookie with comma in value. So I should use CookieSpecs.NETSCAPE.
> And I set it, as recommended, to RequestConfig.
> But this value is overridden in InternalHttpClient.doExecute, because my request object
already have own RequestConfig(request instanceof Configurable == true).
> Small case:
> {code:java}
> 			RequestConfig config = RequestConfig.custom().setCookieSpec(CookieSpecs.NETSCAPE).build();
> 			Executor executor = Executor.newInstance(HttpClients.custom().setDefaultRequestConfig(config).build());
> 			Request get = Request.Get("http://path.to.server.with.netskape.cookies/with/comma");
> 			Void resp = executor.execute(get).handleResponse(new ResponseHandler<Void>()
{
> 				public Void handleResponse(HttpResponse response) {
> 					return null;
> 				}
> 			});
> {code}
> So. CookieSpec not work in the end. But I bealieve the problem is in implementation of
InternalHttpClient.doExecute. Instead of getting configs fully from request, this function
shuld mix all existing properties and override, if same name, according to priorities.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message