hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "msangel (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPCLIENT-1645) fluent api not kept CookieSpecs from RequestConfig for HttpClients.custom for fluent.Executor
Date Thu, 30 Apr 2015 01:46:07 GMT
msangel created HTTPCLIENT-1645:
-----------------------------------

             Summary: 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


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