On Sat, 2014-07-12 at 08:18 -0700, srikalyan swayampakula wrote:
> Hi,
>
> I am getting a ClientProtocolException for a delete request. The response
> is "204 No Content" and seems to be a bug in httpclient.
>
> I am creating the transport like this
>
> transport = new ApacheHttpTransport();
>
> final RequestConfig defaultRequestConfig = RequestConfig.DEFAULT;
>
> final RegistryBuilder<ConnectionSocketFactory> builder =
> RegistryBuilder.<ConnectionSocketFactory>create()
> .register("http",
> PlainConnectionSocketFactory.getSocketFactory());
>
> // allow a customized SSLConnectionSocketFactory to be used
> if (this.sslConnectionSocketFactory != null) {
> builder.register("https", this.sslConnectionSocketFactory);
> } else {
> builder.register("https",
> SSLConnectionSocketFactory.getSocketFactory());
> }
>
> final Registry<ConnectionSocketFactory> registry = builder.build();
>
> final PoolingHttpClientConnectionManager cm =
> new PoolingHttpClientConnectionManager(registry);
>
> // Increase max total connection
> cm.setMaxTotal(this.maxConnections);
> // Increase default max connection per route
> cm.setDefaultMaxPerRoute(this.maxConnections);
> //close expired connections
> cm.closeExpiredConnections();
>
>
>
> final HttpClient client = HttpClientBuilder.create()
> .setConnectionManager(cm)
>
> .setDefaultRequestConfig(defaultRequestConfig)
>
> .setMaxConnPerRoute(this.maxConnections)
>
> .setConnectionReuseStrategy(
>
> DefaultConnectionReuseStrategy.INSTANCE)
> .build();
>
> transport.setClient(client);
> transport.setServerUrl(serverUrl);
> transport.setUsername(username);
> transport.setPassword(password);
> transport.setBasicAuth(hasText(username) || hasText(password));
>
> return transport;
>
> and calling transport.delete(httpparams) and the server it is trying to
> call seem to be fine no stack trace and access log seems behave as expected.
>
> I enabled some debug logging which is indicating that there might be a bug
> with the library
>
Please reproduce the problem outside the servlet container and post the
_complete_ wire / context of the session to this list
http://hc.apache.org/httpcomponents-client-4.3.x/logging.html
Oleg
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]