Re: How to read a stream of multipart responses

2014-05-14 Thread Oleg Kalnichevski
On Tue, 2014-05-13 at 12:12 -0400, David R Robison wrote: I have a camera I'm trying to connect to and read alarms from. It is setup to allow the client to make one GET request and then it periodically sends alarm events as a stream of multipart/x-mixed-replace chunks. How would I use

Re: SPNEGO/Kerberos Auth when POST is first request

2014-05-14 Thread Oleg Kalnichevski
On Tue, 2014-05-13 at 17:05 -0700, Gregory Chanan wrote: I'm using httpclient (4.3.3) in my application with SPNEGO/Kerberos Auth and everything works well when a GET is the first request to a remote host. This is consistent with

Re: Thread Contention (due to use of proxys) in HttpClient 4.3

2014-05-14 Thread Oleg Kalnichevski
On Wed, 2014-05-14 at 11:46 +0100, Daniel Feist wrote: Hi, I spent a good part of yesterday testing and comparing HttpClient performance and the results are interesting: HttpClient 3.1 is 20% faster than HttpClient 4.3 when both configured in the same way and when using 50 client threads!

Re: Thread Contention (due to use of proxys) in HttpClient 4.3

2014-05-14 Thread Oleg Kalnichevski
On Wed, 2014-05-14 at 11:46 +0100, Daniel Feist wrote: Hi, I spent a good part of yesterday testing and comparing HttpClient performance and the results are interesting: HttpClient 3.1 is 20% faster than HttpClient 4.3 when both configured in the same way and when using 50 client threads!

Re: Thread Contention (due to use of proxys) in HttpClient 4.3

2014-05-13 Thread Oleg Kalnichevski
with replacing them with hand crafted classes in order to reduce lock contention. Feel free to raise an enhancement request and contribute patches. Oleg On Monday, May 12, 2014 11:17 AM, Oleg Kalnichevski ol...@apache.org wrote: On Mon, 2014-05-12 at 13:21 +0100, Daniel Feist wrote: 2) Can

Re: httpacyncclient - calculate upload speed

2014-05-12 Thread Oleg Kalnichevski
On Thu, 2014-05-08 at 18:59 +, Boxer, Aaron wrote: I am sending files and receiving callbacks when the upload is completed. Send requests happen at random times. How do I calculate the upload speed at a given time? Use a custom HttpAsyncRequestProducer. Oleg

Re: Thread Contention (due to use of proxys) in HttpClient 4.3

2014-05-12 Thread Oleg Kalnichevski
On Mon, 2014-05-12 at 13:21 +0100, Daniel Feist wrote: 2) Can I expect 4.2 to scale better? I do not think so. In my tests HC 4.3 performs better than 4.2. There have also been reports Even with high concurrency of say 200 and high TPS, for example in a http proxy scenario? Yes,

Re: Thread Contention (due to use of proxys) in HttpClient 4.3

2014-05-12 Thread Oleg Kalnichevski
On Mon, 2014-05-12 at 00:13 +0100, Daniel Feist wrote: Hi, I'm using HttpClient in a situation where high concurrency is expected and am doing some testing/benchmarking using gatling-tool. While performance isn't bad, things aren't scaling as well as I'd have hoped. (I'm running on a

Re: How to set single-cookie-header with the 4.3 API?

2014-05-11 Thread Oleg Kalnichevski
On Sat, 2014-05-10 at 10:49 +0300, d_k wrote: Thank you very much for the help! So to my understanding after reading the code for BrowserCompatSpec [0] is that when using the CookieSpecs.BROWSER_COMPATIBILITY when building the cookie spec the single cookie header policy is already in place?

RE: Cancelling an httpclient-asynch put

2014-05-05 Thread Oleg Kalnichevski
On May 5, 2014 3:54:59 PM CEST, Boxer, Aaron aaron.bo...@uhn.ca wrote: On Fri, 2014-05-02 at 16:23 +, Boxer, Aaron wrote: Hello List, What is the best way of cancelling an httpclient-asynch put ? Currently, I am issuing a cancel(true) on the Future I receive back from the put

Re: Cancelling an httpclient-asynch put

2014-05-03 Thread Oleg Kalnichevski
On Fri, 2014-05-02 at 16:23 +, Boxer, Aaron wrote: Hello List, What is the best way of cancelling an httpclient-asynch put ? Currently, I am issuing a cancel(true) on the Future I receive back from the put call. But, if I am sending large files, then requests that are in the middle

Re: Cancelling an httpclient-asynch put

2014-05-03 Thread Oleg Kalnichevski
On Sat, 2014-05-03 at 12:57 +, Boxer, Aaron wrote: From: Oleg Kalnichevski [ol...@apache.org] Sent: Saturday, May 03, 2014 7:52 AM To: HttpClient User Discussion Subject: Re: Cancelling an httpclient-asynch put On Fri, 2014-05-02 at 16:23 +

Re: Timeout when sending on slow link

2014-04-28 Thread Oleg Kalnichevski
On Sat, 2014-04-26 at 19:52 +, Boxer, Aaron wrote: Hello List, I am using the latest version of httpasynchclient to send six 13 MB files over a 10 MBPS link. My timeout is set to 30 seconds, and I am getting timeout errors, in the following timeout handler: protected void

Re: Proxy Chaining in httpclient 4.3

2014-04-25 Thread Oleg Kalnichevski
On Thu, 2014-04-24 at 13:10 -0400, Matt Bialek wrote: Hello, I am attempting to implement proxy chaining, I know it is not supported out of the box but my project uses httpclient and they are stubborn about using it. I sent up a custom MainClientExec and created a method for tunnel to Proxy.

Re: Regarding Cookies validation with BrowserCompatSpec

2014-04-22 Thread Oleg Kalnichevski
On Tue, 2014-04-08 at 23:12 +0200, Philippe Mouawad wrote: Hello Oleg, all, We have a bug report at JMeter Project: - https://issues.apache.org/bugzilla/show_bug.cgi?id=56358 Analyzing bug, it seems issue is related to path validation. Few questions: 1) User reports that

Re: HTTP Upgrade support

2014-04-14 Thread Oleg Kalnichevski
On April 14, 2014 5:05:19 PM CEST, Pavel Bucek pavel.bu...@oracle.com wrote: Hi all, is Http(Async)Client capable of handling upgraded request? I mean - can I somehow plug in my HttpUpgradeHandler [1][2], something similar to what was introduced in Servlet 3.1 - non blocking read/write access

Re: HTTP Client timeout

2014-04-11 Thread Oleg Kalnichevski
On Fri, 2014-04-11 at 18:04 +0530, srihari na wrote: Hi All, We are using Apache HTTP client 4.2.5 and we have both connection and sockettimeout set. All the requests are passed via proxy (Apache HTTPD). During peak loads in our production environments one of the proxy became unresponsive.

Re: Sharing the connection manager amongst client instances

2014-04-07 Thread Oleg Kalnichevski
On April 7, 2014 3:06:35 PM CEST, Jose Dillet jose.dil...@gmail.com wrote: Hi, In our application we have been sharing the connection manager amongst HttpClient instances successfully. Due to our desing we want to have more than one HttpClient instance, but sharing the same underlying resources.

Re: HttpConnection.getMetrics() per request?

2014-03-31 Thread Oleg Kalnichevski
On Sat, 2014-03-29 at 07:01 -0700, marceau wrote: I would like to get bytes sent received for each get request in a service. I am aware of the issue in https://issues.apache.org/jira/browse/HTTPCLIENT-1081 with HEAD requests, and any request where getMetrics() is called after the connection

Re: 407 error with NTLM proxy

2014-03-30 Thread Oleg Kalnichevski
On Fri, 2014-03-28 at 15:12 +, Matt Russell wrote: Hi, I'm hoping someone can help me diagnose an intermittent 407 Proxy Authentication Required error when using HttpClient through an NTLM proxy. I've found that I always get a 407 responses, unless I first go and fetch any web page in

Re: outputReady method in IOEventDispatcher

2014-03-27 Thread Oleg Kalnichevski
On Wed, 2014-03-26 at 23:00 +0530, Sajith Dilshan wrote: Hi everyone, When I set the OP_WRITE event on a particular instance of org.apache.http.nio.reactor.IOSession, a worker thread will pick up that IOSession and will execute the outputReady(IOSession session) method of the respective

Re: outputReady method in IOEventDispatcher

2014-03-27 Thread Oleg Kalnichevski
should be performed by the I/O dispatch thread. There is a section on asynchronous I/O control for HTTP connections you may find useful: http://hc.apache.org/httpcomponents-core-4.3.x/tutorial/html/nio.html#d5e614 Oleg On Thu, Mar 27, 2014 at 1:52 PM, Oleg Kalnichevski ol...@apache.org wrote

Re: Authentication with multiple realms.

2014-03-25 Thread Oleg Kalnichevski
PM, Oleg Kalnichevski ol...@apache.orgwrote: On Mon, 2014-03-24 at 18:38 +0200, d_k wrote: I'm upgrading a Nutch plugin that used httpclient 3.x and because Nutch was already dependent on httpclient 4.1.1 I decided to avoid adding a new dependency on httpclient 4.3 and use the existing

Re: Correct encoding and decoding of HTTP path segments

2014-03-25 Thread Oleg Kalnichevski
On Tue, 2014-03-25 at 00:03 +, sebb wrote: On 24 March 2014 23:01, Christopher BROWN br...@reflexe.fr wrote: Hello, This article: http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding ...refers to the pitfalls of using Java's standard URLEncoder

Re: Connection leakage from Migrating 4.2.3 - 4.3.3

2014-03-25 Thread Oleg Kalnichevski
On Mon, 2014-03-24 at 21:09 -0400, Nick Chang wrote: Hello, We are using httpclient to build a web proxy application in our product. We use 4.2.3 version and it has been working flawlessly. Now I am trying to migrate the product's httpclient library from 4.2.3 to 4.3.3 to achieve

Re: Authentication with multiple realms.

2014-03-24 Thread Oleg Kalnichevski
On Mon, 2014-03-24 at 17:54 +0200, d_k wrote: Hello. I'm using httpclient-4.1.1 and i'm trying to authenticate with different users on different realms but it seems to fail. Before I even start looking into this, is there a reason you are not using a newer version of HttpClient (preferably

Re: Authentication with multiple realms.

2014-03-24 Thread Oleg Kalnichevski
at the wire log tomorrow but I would strongly recommend upgrading regardless. HttpClient authentication code has undergone a fairly major rewrite in the 4.2 release. Upgrading at least to the latest release in the 4.2 series would probably be necessary anyway. Oleg On Mon, Mar 24, 2014 at 6:00 PM, Oleg

Re: NTLM proxy authentication...

2014-03-22 Thread Oleg Kalnichevski
:43:44:261 EDT [DEBUG] PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {tls}-http://proxy.hab.desoft.cu:3128- https://www.google.com.cu:443][total kept alive: 0; route allocated: 0 of 2; total allocated: 0 of 20] 2014-03-20 9:18 GMT-04:00 Oleg Kalnichevski ol

Re: NTLM proxy authentication...

2014-03-20 Thread Oleg Kalnichevski
On Wed, 2014-03-19 at 14:46 -0400, Ray Williams Robinson Valiente wrote: Hi: I'm a fairly new with HttpClient. I'm trying to test it against a NTLM proxy but I'm getting error 407 over and over again. What should be the correct way to do it? My current code looks like (with proper values

[ANNOUNCEMENT] HttpComponents Client for Android 4.3.3 Released

2014-03-20 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce a port of HttpComponents HttpClient 4.3.3 GA to Google Android. Apache HttpClient for Android can be deployed on Google Android in parallel to the outdated version shipped with platform while remaining partially API compatible with Apache

Re: Final questions about HC4.3.3

2014-03-14 Thread Oleg Kalnichevski
On Fri, 2014-03-14 at 01:29 +0100, Joan Balagueró wrote: Hello, Migration from 4.1 to 4.3 is finished. Just some questions about certain parameters: 1. For performance, is it recommended to set true to ‘setTcpNoDelay’ and false to ‘setStaleConnectionCheckEnabled’? I tried

Re: Performance and default parameters of 4.2 vs 4.3

2014-03-13 Thread Oleg Kalnichevski
On Wed, 2014-03-12 at 14:13 -0400, Tad Whitenight wrote: When upgrading from HttpClient 4.2 to the new APIs (no deprecated use) in 4.3 I'm observing a 25-30ms increase in average response latency. Anyone else observe this or have configuration suggestions while upgrading? I see that

Re: Migrating from 4.1 to 4.3

2014-03-12 Thread Oleg Kalnichevski
On Wed, 2014-03-12 at 15:46 +0100, Joan Balagueró wrote: Hello Oleg, Thanks. But taking this example: RequestConfig.Builder builder = RequestConfig.custom(); if (proxyPort != 0) { builder.setProxy(new HttpHost(proxyHost, proxyPort)) } RequestConfig config = builder.build(); The

Re: Migrating from 4.1 to 4.3

2014-03-12 Thread Oleg Kalnichevski
(ConnRoutePNames.DEFAULT_PROXY); Or I could change tcp_nodelay by using: HttpConnectionParams.setTcpNoDelay(this.objHttpParams, Boolean.TRUE); With 4.3, it seems that the only way is to recreate the Httpclient with a builder/s with all the new values. Thanks, Joan. -Mensaje original- De: Oleg

Re: maintaining authentication state between multiple threads/hosts

2014-03-11 Thread Oleg Kalnichevski
On Mon, 2014-03-10 at 19:04 +0200, d_k wrote: I'm using HttpClient 4.1.1 and i'm performing multiple requests to several web servers (using nutch 2.x) that requires authentication. I've read that I can save the authentication state between calls by passing the same HttpContext but that I

Re: Pending requests not cancelled when async client is closed (http async client 4.0.1)

2014-03-06 Thread Oleg Kalnichevski
On Wed, 2014-03-05 at 14:57 +0200, Jose Dillet wrote: I have observed some differences between httpasyncclient 4.0-beta3 and 4.0.1 when the client is closed / shutdown and there are still pending requests. This can be observed by running AsyncClientHttpExchange and closing the client while

Re: Connection Pool and DNS Resolution timeout

2014-03-06 Thread Oleg Kalnichevski
://hc.apache.org/httpcomponents-client-4.3.x/tutorial/html/connmgmt.html#d5e380 Oleg -Joseph -Original Message- From: Oleg Kalnichevski [mailto:ol...@apache.org] Sent: Tuesday, March 04, 2014 8:14 AM To: HttpClient User Discussion Subject: Re: Connection Pool and DNS Resolution timeout

Re: Connection Pool and DNS Resolution timeout

2014-03-04 Thread Oleg Kalnichevski
On Mon, 2014-03-03 at 12:59 +, Alex, Joseph (Contractor) wrote: Hi, We use HttpClient 3.1 and Httpcomponents 4.2.x in some of our apps with MultiThreadedHttpConnectionManager and PoolingClientConnectionManager respectively. Some of our server endpoints use a Global Name which can be

Re: NIO HttpCore + POST Queries

2014-03-04 Thread Oleg Kalnichevski
On Tue, 2014-03-04 at 15:36 +, PASSANITI Frédéric wrote: Hello, Is it possible to do some POST queries with nio httpcore library ? Of course, it is. I’m using the BasicHttpRequestobject to create GET queries, but if I want to write/add binary content into a POST query I don’t

[ANNOUNCEMENT] HttpComponents HttpAsyncClient 4.0.1 GA Released

2014-02-24 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 4.0.1 GA release of HttpComponents HttpAsyncClient. This maintenance release fixes a number of bugs including incorrect OSGi bundle metadata found since release 4.0. This release also upgrades HttpCore and HttpClient dependencies to the

Re: connections left in CLOSE_WAIT state

2014-02-20 Thread Oleg Kalnichevski
they should have disappeared. What I saw is the number of CLOSE_WAIT sockets raising all the time and when a socket reached that state it was never released. What am I missing? Make sure your code is not leaking connections. Oleg Regards, Nir -Original Message- From: Oleg Kalnichevski

Re: connections left in CLOSE_WAIT state

2014-02-19 Thread Oleg Kalnichevski
On Wed, 2014-02-19 at 10:33 +, Nir Dweck wrote: Hi, I am using httpclient version 4.2.3. I did a split proxy, which receives an HTTP requests, opens its body in order to log its content and then sends the content in two requests, one for the local host server and the other to a

Re: How to know which port is newly created for the connection ?

2014-02-17 Thread Oleg Kalnichevski
On Fri, 2014-02-14 at 21:15 +, Kiran Chitturi wrote: Hi, I am using http client 4.3.2 and I have a few questions. 1) I am making lot of concurrent requests to a server. When creating requests, I want to debug and check which ports are newly created by the client. Currently, I can

Re: How can I abort an aynsc request using HttpAsyncClient

2014-02-17 Thread Oleg Kalnichevski
On Mon, 2014-02-17 at 11:23 +0200, Yoram Dayagi (Gmail) wrote: I want to start an async GET request for a big file. Then, at some point, while the content is still being received, I would like to cancel the request from another thread and close all relevant resources. I tried to achieve

Re: How can I abort an aynsc request using HttpAsyncClient

2014-02-17 Thread Oleg Kalnichevski
On Mon, 2014-02-17 at 12:40 +0200, Yoram Dayagi (Gmail) wrote: Hi Below is the log of the following scenario: 1. Create an async client with MaxConnPerRoute=1 2. Start a request 3. Wait for 100ms and shutdown the channel (using ioctrl.shutdown) 4. Wait for 2000ms and start another request

[ANNOUNCEMENT] HttpComponents Core 4.3.2 GA released

2014-02-17 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 4.3.2 GA release of HttpComponents Core. This is a maintenance release that fixes a number of bugs and regressions found since 4.3.1, mostly in the NIO transport components. All users of HttpCore 4.3 are advised to upgrade. Download -

Re: HttpClient 4.2.6 : ManagedClientConnectionImpl way of checking stale connection and Performances

2014-02-16 Thread Oleg Kalnichevski
On Sun, 2014-02-16 at 14:15 +0100, Philippe Mouawad wrote: Hello Oleg, We have one enabled using: new DefaultHttpRequestRetryHandler(RETRY_COUNT, false) RETRY_COUNT is set to 0 by default but can be changed. Do you mean we should not set it to 0 ? This obviously needs to be a positive

Re: HttpClient 4.2.6 : ManagedClientConnectionImpl way of checking stale connection and Performances

2014-02-15 Thread Oleg Kalnichevski
://twitter.com/cfwhisperer/status/428278488349417472 Regards Philippe Philippe I am not sure I remember the context. Is it about turning off stale connection checking? Oleg On Wed, Dec 11, 2013 at 9:50 AM, Oleg Kalnichevski ol...@apache.org wrote: On Tue, 2013-12-10 at 21:38 +0100, Philippe

Re: Incredibly slow gzip downloads

2014-02-15 Thread Oleg Kalnichevski
On Sat, 2014-02-15 at 11:22 +0100, Sebastiano Vigna wrote: Something happened from HttpClient 4.3.1 to 4.3.2. All of a sudden, we are seeing an immense amount of CPU spent into inflating compressed HTTP responses. We were experimenting 5000 pages/s two months ago, but less than 1200

Re: HttpClient 4.2.6 : ManagedClientConnectionImpl way of checking stale connection and Performances

2014-02-15 Thread Oleg Kalnichevski
seems to be faced by another person: https://twitter.com/cfwhisperer/status/428278488349417472 Regards Philippe Philippe I am not sure I remember the context. Is it about turning off stale connection checking? Oleg On Wed, Dec 11, 2013 at 9:50 AM, Oleg Kalnichevski

Re: HttpClient 4.2.6 : ManagedClientConnectionImpl way of checking stale connection and Performances

2014-02-15 Thread Oleg Kalnichevski
On Sat, Feb 15, 2014 at 12:49 PM, Oleg Kalnichevski ol...@apache.orgwrote: On Sat, 2014-02-15 at 11:23 +0100, Philippe Mouawad wrote: Hello , yes that's it. regards Then, I am not sure I understand the problem. The stale connection check is about trading off some

Re: HttpClient 4.2.6 : ManagedClientConnectionImpl way of checking stale connection and Performances

2014-02-15 Thread Oleg Kalnichevski
specific type of exceptions (like 'server failed to respond'). Oleg Thanks for the info on ConnectionReuseStrategy, it will be a way to handle these kind of issues. Regards On Sat, Feb 15, 2014 at 3:12 PM, Oleg Kalnichevski ol...@apache.orgjavascript:_e(%7B%7D,'cvml','ol...@apache.org

Re: Incredibly slow gzip downloads

2014-02-15 Thread Oleg Kalnichevski
On Sat, 2014-02-15 at 17:06 +0100, Sebastiano Vigna wrote: On 15 Feb 2014, at 12:47 PM, Oleg Kalnichevski ol...@apache.org wrote: The problem mostly likely has been introduced by HTTPCLIENT-1432 [1]. I reviewed the patch once more and could not find anything obviously wrong with it. Try

Re: Using basic auth produces warnings about NTLM and NEGOTIATE errors.

2014-02-11 Thread Oleg Kalnichevski
On Tue, 2014-02-11 at 14:20 +1100, Brett Ryan wrote: If a server supports NTLM and Kerberos authentication, but when setting up the client I only provide basic credentials I get a log for each of the NTLM and NEGOTIATE authentication schemes. Taking the example from :

Re: Using basic auth produces warnings about NTLM and NEGOTIATE errors.

2014-02-11 Thread Oleg Kalnichevski
On Tue, 2014-02-11 at 09:18 -0500, Gary Gregory wrote: On Tue, Feb 11, 2014 at 8:58 AM, Oleg Kalnichevski ol...@apache.org wrote: ... --- RequestConfig config = RequestConfig.custom() .setTargetPreferredAuthSchemes(Arrays.asList(BASIC)) Wouldn't an enum be more helpful here

Re: Using basic auth produces warnings about NTLM and NEGOTIATE errors.

2014-02-11 Thread Oleg Kalnichevski
happen if the proxy auth strategy tries to pick up an auth scheme from the list of preferred schemes still containing NTLM and SPNEGO. Oleg On 12 February 2014 00:58, Oleg Kalnichevski ol...@apache.org wrote: On Tue, 2014-02-11 at 14:20 +1100, Brett Ryan wrote: If a server supports NTLM

HttpClient 4.3 for Android - request for comments

2014-02-03 Thread Oleg Kalnichevski
Folks I am working on a port of HttpClient 4.3 to Android. This library is expected to provide full compatibility with HttpClient APIs shipped with Android while delivering all features of HttpClient 4.3 More details can be found here:

Re: Cancel and socket state

2014-01-30 Thread Oleg Kalnichevski
Thanks 2014-01-30 Oleg Kalnichevski ol...@apache.org: On Thu, 2014-01-30 at 09:49 +0100, Thomas Boniface wrote: In case I don't do the cancel the connection is released and only disconnected once the keep alive timeout is reached. This is a very important bit of information. I'll see

Re: Weird leasing/releasing sequence leading to close

2014-01-30 Thread Oleg Kalnichevski
On Thu, 2014-01-30 at 13:07 +0100, Antoine Bonavita wrote: Hello, I'm investigating an issue with our application (it intermittently stops responding and we have to restart it). To give you a bit of background, it's a Tomcat7 application using AsyncServlet and connecting to a number of

Re: Weird leasing/releasing sequence leading to close

2014-01-30 Thread Oleg Kalnichevski
On Thu, 2014-01-30 at 15:59 +0100, Antoine Bonavita wrote: Hello, On 01/30/2014 01:43 PM, Oleg Kalnichevski wrote: On Thu, 2014-01-30 at 13:07 +0100, Antoine Bonavita wrote: Hello, I'm investigating an issue with our application (it intermittently stops responding and we have

Re: Cancel and socket state

2014-01-29 Thread Oleg Kalnichevski
On Tue, 2014-01-28 at 18:00 +0100, Thomas Boniface wrote: Hi, I am using an http async client to contact several endpoints in a row with the same process. In the context of my application I want to keep the global process under a certain time. Sometimes it happens some of the executes I

Re: Cancel and socket state

2014-01-29 Thread Oleg Kalnichevski
that the socket may end up in the TIME_WAIT state after the response has been fully processed. Wire / context log should help find out why the connection needs to be closed. http://hc.apache.org/httpcomponents-client-4.3.x/logging.html Oleg 2014-01-29 Oleg Kalnichevski ol...@apache.org On Tue

Re: Cancel and socket state

2014-01-29 Thread Oleg Kalnichevski
the request? Oleg 2014-01-29 Oleg Kalnichevski ol...@apache.org On Wed, 2014-01-29 at 10:42 +0100, Thomas Boniface wrote: Hi, I am using the httpasyncclient 4.0. Thomas Then, things do not quite add up. If one cancels the result future, this should have no impact

Re: Cancel and socket state

2014-01-29 Thread Oleg Kalnichevski
/httpcomponents/httpasyncclient/4.0.1-SNAPSHOT/ 2014-01-29 Oleg Kalnichevski ol...@apache.org On Wed, 2014-01-29 at 14:21 +0100, Thomas Boniface wrote: Hi Oleg, Here is a log with the wire and context log for the behavior I described before. I obfuscated business related

Re: Cancel and socket state

2014-01-29 Thread Oleg Kalnichevski
On January 29, 2014 5:38:13 PM CET, Thomas Boniface tho...@stickyads.tv wrote: Thanks for your help regarding the snapshot. Here is an updated log using the 4.0.1-SNAPSHOT. Regarding request cancel, it is done as follow: if (futureHttpResponse != null !futureHttpResponse.isCancelled()) {

HC 4.2 vs 4.3 performance wise; Re: [ANNOUNCEMENT] HttpComponents HttpClient 4.3.2 Released

2014-01-22 Thread Oleg Kalnichevski
On Tue, 2014-01-21 at 09:39 -0800, Tony Anecito wrote: Thanks Gary there was nothing about performance improvements at least what I noticed. Just wanted to be sure. -Tony HttpClient 4.3 can be expected to be ~5% faster than 4.2 due to reduced synchronization in several hot spots, but any

Re: test-jar isn't deployed for 4.3.2

2014-01-21 Thread Oleg Kalnichevski
On Tue, 2014-01-21 at 00:02 -0800, Ahmed Ashour wrote: Hi all, Please note tests.jar isn't deployed to Maven central repository for 4.3.2 [1], but it was there in 4.3.1 [2]. Any specific reason? It could be used by something like: dependency

Re: Clearing the credentials cache in httpclient 4

2014-01-17 Thread Oleg Kalnichevski
Dennis Heimbigner d...@unidata.ucar.edu wrote: You might create an object, though, that is both credentials provider and auth cache. This is probably the only solution. But my example still stands, I think. A credentials providers serves up and caches a set of credentials. During the lifetime

Re: ZeroCopyPut mystery

2014-01-17 Thread Oleg Kalnichevski
On Fri, 2014-01-17 at 16:28 +, Boxer, Aaron wrote: I made a simple test: I wrote a few lines of Java using File channel and transferTo(...) method to read files from my DVD and write to the hard drive. With this simple test, the transferTo(...) method gets about 4 MB /S transfer

Re: ZeroCopyPut mystery

2014-01-16 Thread Oleg Kalnichevski
On Thu, 2014-01-16 at 04:33 +, Boxer, Aaron wrote: Hello, When I use ZeroCopyPut with hard drive (spinning disk ) disk files, I get a network transfer rate of about 250 MBPS for first time read of files; 850 MBPS if the files are already in the Windows OS file cache. Synchronous put

RE: ZeroCopyPut mystery

2014-01-16 Thread Oleg Kalnichevski
Boxer, Aaron aaron.bo...@uhn.ca wrote: Thanks, Oleg. I am not trying to criticize the project in any way; just wondering if anyone has insight into why, on Windows, Java NIO is so much slower than stream IO. Perhaps it has to do with buffer size, thread count, . ? You are welcome to

Re: Clearing the credentials cache in httpclient 4

2014-01-16 Thread Oleg Kalnichevski
On Thu, 2014-01-16 at 13:21 -0700, Dennis Heimbigner wrote: As I understand it, in httpclient 4, each credentials provider is solely responsible for caching of credentials. Actually it is AuthCache [1]. The question I have is: when authentication fails using a set of credentials provided

Re: Clearing the credentials cache in httpclient 4

2014-01-16 Thread Oleg Kalnichevski
On Thu, 2014-01-16 at 15:16 -0700, Dennis Heimbigner wrote: Oleg Kalnichevski wrote: On Thu, 2014-01-16 at 13:21 -0700, Dennis Heimbigner wrote: As I understand it, in httpclient 4, each credentials provider is solely responsible for caching of credentials. Actually

Re: apache async httpclient I/O reactor status: STOPPED

2014-01-15 Thread Oleg Kalnichevski
On Tue, 2014-01-14 at 22:07 -0800, Jaikit Savla wrote: Hi Oleg, I got the error again. Please find the stack trace below. If I get to reproduce it consistently - I will upload a test case. This time I see there are couple of SocketTimeoutExceptions before I/O reactor termites abnormally

Re: PoolingHttpClientConnectionManager is not reusing connection

2014-01-14 Thread Oleg Kalnichevski
On Mon, 2014-01-13 at 10:17 -0800, Vikram wrote: I am using HttpClient 4.3.1. Using HttpClient with PoolingHttpClientConnectionManager as the connection manager. I have also set MaxTotal as 5000 and MaxPerRoute as 4000. When I am load testing it, I notice that when a connection is created,

Re: porting to 4.3

2014-01-14 Thread Oleg Kalnichevski
On Mon, 2014-01-13 at 20:26 +, Boxer, Aaron wrote: Well, I've got everything ported over, except for one line: HttpProtocolParams.setExpectContinue(false); How do I set this parameter in the new architecture? RequestConfig config = RequestConfig.custom()

Re: addInterceptorFirst

2014-01-14 Thread Oleg Kalnichevski
On Mon, 2014-01-13 at 20:31 +, Boxer, Aaron wrote: Is there a way of removing an interceptor added with addInterceptorFirst ? Remove from where? Oleg - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org

Re: apache async httpclient I/O reactor status: STOPPED

2014-01-14 Thread Oleg Kalnichevski
On Mon, 2014-01-13 at 18:55 -0800, Jaikit Savla wrote: Hello Folks, I have a service running which depends on apache async httpclient. Versions are as mentioned below commons-httpclient-3.1.jar httpasyncclient-4.0.jar httpcore-4.3.jar httpcore-nio-4.3.jar Intermittently (after 3 days)

Re: addInterceptorFirst

2014-01-14 Thread Oleg Kalnichevski
On Tue, 2014-01-14 at 14:27 +, Boxer, Aaron wrote: On Mon, 2014-01-13 at 20:31 +, Boxer, Aaron wrote: Is there a way of removing an interceptor added with addInterceptorFirst ? Remove from where? From the client after it is built by the builder ? I am porting old code where

Re: Most efficient way of putting file from CD Drive

2014-01-10 Thread Oleg Kalnichevski
On Thu, 2014-01-09 at 19:47 +, Boxer, Aaron wrote: Hello! I have a CD with about 1000 files on it. I need to upload them (via WebDAV client). Currently, I go one by one through the files, and put to the server using InputStreamEntity . IS there a better way? Can I use an NIO

Re: adding interceptors on per request basis (was Re: Unable to see response encoding even through Content-Encoding header is present)

2014-01-10 Thread Oleg Kalnichevski
On Thu, 2014-01-09 at 13:34 -0800, Gaurav Kumar wrote: In my use case, I need to know on per request basis what was the encoding used by remote server. I was hoping there there was out of the box way to know content-encoding but I am okay with disabling decompression. Thanks for the

Re: Most efficient way of putting file from CD Drive

2014-01-10 Thread Oleg Kalnichevski
On Fri, 2014-01-10 at 13:51 +, Boxer, Aaron wrote: I have a CD with about 1000 files on it. I need to upload them (via WebDAV client). Currently, I go one by one through the files, and put to the server using InputStreamEntity . IS there a better way? Can I use an NIO buffer,

Re: NHttpClient example visit https://www.verisign.com:443 error

2014-01-09 Thread Oleg Kalnichevski
On Thu, 2014-01-09 at 13:29 +0800, Li Li wrote: I am trying the async client http://hc.apache.org/httpcomponents-core-ga/httpcore-nio/examples/org/apache/http/examples/nio/NHttpClient.java but it throws Exception. I am using windows with oracle jdk 1.7 Please note that this example

Re: adding interceptors on per request basis (was Re: Unable to see response encoding even through Content-Encoding header is present)

2014-01-09 Thread Oleg Kalnichevski
On Thu, 2014-01-09 at 12:10 +, sebb wrote: On 9 January 2014 09:06, Oleg Kalnichevski ol...@apache.org wrote: On Wed, 2014-01-08 at 18:29 -0800, Gaurav Kumar wrote: Thanks! I am now able to see content-encoding. However, the example I followed showed how to add interceptors on global

Re: Proxy authentication Error - NTLM authentication error: Unexpected state: MSG_TYPE3_GENERATED in Http Client 4.3.1

2014-01-09 Thread Oleg Kalnichevski
- From: Oleg Kalnichevski [mailto:ol...@apache.org] Sent: Wednesday, January 08, 2014 2:20 AM To: HttpClient User Discussion Subject: Re: Proxy authentication Error - NTLM authentication error: Unexpected state: MSG_TYPE3_GENERATED in Http Client 4.3.1 On Tue, 2014-01-07 at 21:28 +

Re: Migrating to HttpClient 4.3.1 from 4.2.6 - Solr

2014-01-09 Thread Oleg Kalnichevski
On Thu, 2014-01-09 at 11:07 -0700, Shawn Heisey wrote: On 1/5/2014 9:03 AM, Oleg Kalnichevski wrote: That is intended. HttpClient instances are expected to be immutable (not their dependencies though). This helps make them thread safe without incurring an overhead of synchronization. One

Re: Http async client doesn't handle large requests

2014-01-04 Thread Oleg Kalnichevski
On Fri, 2014-01-03 at 15:04 -0800, Alex Oscherov wrote: I have a problem making http async client working with Exchange server through IIS 7.5. It looks very similar to HTTPASYNC-51 but now it has nothing to do with authentication. When I send relatively small request everything works fine but

Re: Providing feedback when an SSL certificate is not recognized (due to missing entry in keystore)

2013-12-30 Thread Oleg Kalnichevski
On Sun, 2013-12-29 at 14:48 +0100, Christopher BROWN wrote: Hello, I've dealt with an issue where an application being migrated to HTTP client has (with the original HttpURLConnection class) thrown this exception: javax.net.ssl.SSLHandshakeException:

Re: Transparent Ntlm authentication

2013-12-30 Thread Oleg Kalnichevski
On Mon, 2013-12-30 at 05:51 -0500, Rob Goodberry wrote: Hey there, I am trying to send http requests to the sharepoint site at our work. Using Javascript everything automatically worked. When I first tried to use Java I learned our Sharepoint uses NTLM authentication as I got a 401 response.

Re: Size of HTTPClient jar

2013-12-30 Thread Oleg Kalnichevski
On Mon, 2013-12-30 at 15:08 +0100, Philippe Mouawad wrote: Hello, You could use proguard: - http://proguard.sourceforge.net/#manual/usage.html Regards Philippe M. @philmdot There a lot of deprecated code in HttpClient, especially version 4.3. You can possibly cut the size of

Re: Transparent Ntlm authentication

2013-12-30 Thread Oleg Kalnichevski
of the reasons why 4.4 will no longer be 1.5 compatible. Make sure you are not trying to execute your code with JRE 1.5. Hope this helps Oleg Thanks again, Rob On 2013-12-30 6:06 AM, Oleg Kalnichevski ol...@apache.org wrote: On Mon, 2013-12-30 at 05:51 -0500, Rob Goodberry wrote: Hey

Re: Size of HTTPClient jar

2013-12-30 Thread Oleg Kalnichevski
Gary Gregory garydgreg...@gmail.com wrote: We could cut a 5.0 that drops the deprecated code but I think Oleg haw other changes in mind as well for the next major release.  Oleg? Gary I personally see little sense in making a major release only to be able to lose deprecated stuff. Generally,

[ANNOUNCEMENT] HttpComponents Core 4.3.1 GA released

2013-12-27 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 4.3.1 GA release of HttpComponents Core. This is a maintenance release that fixes a number of bugs and regressions found since 4.3, mostly in the NIO transport components. All users of HttpCore 4.3 are advised to upgrade. Download -

Re: Proxy authentication + Basic authentication on the Client instance

2013-12-23 Thread Oleg Kalnichevski
On Sun, 2013-12-22 at 20:55 -1000, Arul Dhesiaseelan wrote: Hi, I am using a proxy to connect to a web service. Both proxy and web service are secured with different set of credentials. I am trying to perform a GET request using Apache HttpClient 4.3.1. URI proxyUri =

Re: HttpClient and virtual hosts

2013-12-23 Thread Oleg Kalnichevski
On Mon, 2013-12-23 at 10:21 +0100, Francois-Xavier Bonnet wrote: Hi, I am trying to migrate to HttpClient 4.3 and I cannot find a way to do what I used to do before with virtual hosts without using any deprecated api. My goal is to be able to send a request to a server but using a Host

Re: The reverse DNS lookup in httpcomponents core

2013-12-20 Thread Oleg Kalnichevski
On Thu, 2013-12-19 at 23:20 +, Huibing Yin wrote: Hi, We use httpcomponents core for sending high volume of data through SSL connection. Right now we have encountered an issue: if the first nameserver is out of rotation, the performance is vastly degraded. The initial investigation

Re: connection closed on first attempt to send to IIS WebDav server

2013-12-17 Thread Oleg Kalnichevski
WebDav server Hi Oleg, . -Original Message- From: Oleg Kalnichevski [mailto:ol...@apache.org] Sent: Monday, December 16, 2013 5:01 PM To: HttpClient User Discussion Subject: Re: connection closed on first attempt to send to IIS WebDav server On Mon, 2013-12-16 at 20:20

Re: HttpClient 4.3.1 error

2013-12-17 Thread Oleg Kalnichevski
On Tue, 2013-12-17 at 02:22 -0500, S.L wrote: Hello All, I am using the HttpClient 4.3.1 in my project via solrj , it seems that a call to solr is resulting in a no filed found error as can be seen in the exception stack trace below. Please advise. failed with:

Re: connection closed on first attempt to send to IIS WebDav server

2013-12-16 Thread Oleg Kalnichevski
On Mon, 2013-12-16 at 20:20 +, Boxer, Aaron wrote: Hello, I am using the sardine java WebDav client (which uses HTTPClient) to send files using WebDav protocol to an IIS 7.5 server. Authentication is Basic. I always get the connection closed with a socket connection on my *first* put

Re: HttpAsyncClient resource consumption

2013-12-13 Thread Oleg Kalnichevski
On Fri, 2013-12-13 at 11:50 +0100, Simon Kulessa wrote: Hi, when a HttpAsyncClient is created I observe that for each client Java creates 3 Threads (see sample code below) and opens 6 TCP connection endpoints (this I observed by using TCPView from sysinternals) . Simon, By default

<    5   6   7   8   9   10   11   12   13   14   >