Re: Re: Why AuthSSLProtocolSocketFactory no longer in HttpClient 4.1 ? What shold do to perform SSL auth?

2011-04-23 Thread Oleg Kalnichevski
On Fri, 2011-04-22 at 20:27 +0800, 陈朝 wrote: Thanks for reply。 Now I can use SSLSocketFactory to establish SSL connection with JBoss。 But when I add CLIENT-CERT auth-method in server's web.xml like this: login-config auth-methodCLIENT-CERT/auth-method /login-config The fllowing

Re: SSL Mutual Authentication Code worked in 4.0.1 but fails in 4.1

2011-04-26 Thread Oleg Kalnichevski
On Tue, 2011-04-26 at 00:43 -0700, harikris wrote: Is this fixed yet. I believe we are seeing similar issue with 4.1.1 as well Yes, this issue has been resolved in 4.1.1. Oleg - To unsubscribe, e-mail:

Re: Connection pool timeout

2011-04-27 Thread Oleg Kalnichevski
On Wed, 2011-04-27 at 17:51 +0200, Jordi Domingo Borràs wrote: Hi :) Is there a way to specify a TIMEOUT value for connections to other hosts and another TIMEOUT for waiting a free connection from the pool? Not any more. What are the reasons you would like to use different timeout values

Re: Connection pool timeout

2011-04-28 Thread Oleg Kalnichevski
On Thu, 2011-04-28 at 12:32 +0200, Jordi Domingo Borràs wrote: Hi Oleg, I need an infinite timeout waiting for a connection from the pool ( i need the resource to load, whenever possible, doesnt matter if its now or in 5 min). I need a low value timeout when connecting to a host. But

Re: Connection pool timeout

2011-04-28 Thread Oleg Kalnichevski
On Thu, 2011-04-28 at 16:10 +0200, Jordi Domingo Borràs wrote: Im using a ThreadSafeClientConnManager with a max total of 50. If all of them are busy, waiting resources will timeout and I dont want this. On the other side, if a timeout waiting for a connection to be established occurs, I

Async HTTP methods / zero copy data transfer

2011-04-29 Thread Oleg Kalnichevski
Folks I have just added a number of async request producers for all standard HTTP methods as well as convenience base classes for byte or char data stream consumers and zero copy file uploads / downloads. Here are samples to get a feel of the new API

Re: Connection pool timeout

2011-04-30 Thread Oleg Kalnichevski
On Thu, 2011-04-28 at 17:25 +0200, Jordi Domingo Borràs wrote: Hi Oleg, It would be great to have another parameter. This is really useful for me, I'm sorry if my english is not as good as it should be in order to explain it better. I need to load a lot of url's. I need to load them

Re: throttlling download traffic

2011-04-30 Thread Oleg Kalnichevski
On Sat, 2011-04-30 at 01:13 +0200, khiem nguyen wrote: Hi, i want to throttle the download-traffic/bandwidth with httpclient. Googling around doesn't takes me further. 1 of the found options is using Thread.sleep(time) while reading from inputstream. looking into the source-code, i think

Re: Custom Cookie help

2011-05-04 Thread Oleg Kalnichevski
On Tue, 2011-05-03 at 23:21 +0530, Kalpa 1977 wrote: HI all, Is this possible to write a customised cookie validator for httpclient 3.x. Kalpa, You can change the way HttpClient 3.x validates cookies by implementing a custom CookieSpec interface or overriding validate method of an

Re: Apple's IPP, and Expect: 100-continue

2011-05-09 Thread Oleg Kalnichevski
On Mon, 2011-05-09 at 16:26 -0400, John Kiffmeyer wrote: Hi httpclient-users, I'm currently using HttpClient 4.1 to send IPP messages. I've encountered IPP implementations (most notably, implementations by Apple) that use the Expect: 100-continue header mean, here's an HTTP request with an

Re: 4k buffer limit?

2011-05-11 Thread Oleg Kalnichevski
On Wed, 2011-05-11 at 16:42 -0400, Edward Sumerfield wrote: Bytes read from an input stream go into buffer and you control how long that is. However, you don't need to increase the size but should always read the stream dry before finishing. The jdk methods usually return the # bytes read or

Re: Proxy authentication error: Unexpected state: MSG_TYPE3_GENERATED

2011-05-13 Thread Oleg Kalnichevski
On Fri, 2011-05-13 at 08:35 -0500, David Gibbs wrote: Folks: I'm struggling with a problem with HttpClient 4.1.1 ... I'm trying to connect to a web site that requires basic authentication ... through a proxy (Squid) that requires NTLM authentication. The error that's getting logged is

Re: Looking at how I would implement a particular custom ssl socket factory with httpclient 4.1.1

2011-05-17 Thread Oleg Kalnichevski
On Mon, 2011-05-16 at 18:10 +, KARR, DAVID (ATTSI) wrote: A week or so ago I had to implement a custom ssl socket factory to do some specialized hostname verification. For background, we had been connecting to a front-end server that was presenting a SSL cert with a context name

Re: How do I reset the scheme registry to the default?

2011-05-20 Thread Oleg Kalnichevski
On Thu, 2011-05-19 at 23:20 +, KARR, DAVID (ATTSI) wrote: I have a method that configures the scheme registry in a couple of different ways, depending on configuration parameters. These parameters can be set live at run time, after the system starts up. I'm allowing for the

Re: Do I need to add POST params to a UrlEncodedFormEntity, or can I add them to the params in the HttpPost?

2011-05-20 Thread Oleg Kalnichevski
On Thu, 2011-05-19 at 23:42 +, KARR, DAVID (ATTSI) wrote: I have some code using HttpClient 4.1.1 that is doing a POST, and it appears to be working. It's adding a couple POST parameters to the params property on the HttpPost. After I had this working for a while, I noticed that

[ANNOUNCEMENT] HttpComponents HttpCore 4.1.1 (GA) Released

2011-05-20 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce the release of HttpComponents HttpCore 4.1.1 (GA). This is a patch release that fixes a number of non-critical issues found since release 4.1. This release also marks the end of support for Java 1.3. As of release 4.2 HttpCore will require

Re: Re:Re: HttpClient Performance issue

2011-05-23 Thread Oleg Kalnichevski
On Mon, 2011-05-23 at 20:26 +0800, Stephen wrote: Olegk, thanks for you quick reply. Maybe my question is not clear, and I can't say that httpclient's performance is slow. HttpClient is very good, I think there maybe some configurations I didn't set properly, So I want to ask for some

Re: AW: AW: Problems with stale connection check and expect 100-continue

2011-05-24 Thread Oleg Kalnichevski
On Tue, 2011-05-24 at 18:44 +0200, daniel.stu...@attensity.com wrote: Hi Oleg, I used Wireshark to get some additional information. This is the 100-continue request and the response from the socket/OS. 160 1.629973127.0.1.1 127.0.1.1 TCP 47837 8030 [PSH, ACK]

Re: HTTP streaming using ProducingNHttpEntity

2011-05-28 Thread Oleg Kalnichevski
On Fri, 2011-05-27 at 17:22 +0200, dvrslype wrote: Hello, I'm writing a proxy server for large media files (that are shared with Windows Media Player through DLNA). In my first ignorant attempt, i just copy pasted the http client and server example together. On a request on my http

Re: looking for reliable failover pattern

2011-05-28 Thread Oleg Kalnichevski
On Sat, 2011-05-28 at 12:37 -0400, Dan Checkoway wrote: Oleg, Thanks for the reply. Ideally the spray approach is what I'm looking for. Dan Dan, This is not supported out of the box but should not be that difficult to implement. You just need to maintain a list of IP addresses or

Re: Need help in finding implementation for SpnegoTokenGenerator

2011-05-28 Thread Oleg Kalnichevski
On Sat, 2011-05-28 at 22:24 +0530, Sridhar Vedhanabatla wrote: Hi Oleg, Thanks for update. Can you suggest any TokenGenerator that implements SpnegoTokenGenerator so that we can use in NegopatiateScheme? My actual problem is that, I am trying to use httpclient-4.1 for connecting and

Re: HttpAsyncClient OSGi

2011-05-30 Thread Oleg Kalnichevski
On Mon, 2011-05-30 at 08:58 +0800, LongkerDandy wrote: Hi Is there place I can download HttpAsyncClient OSGi package? Or how can I package it myself? Thanks LongkerDandy This can be done with the maven-bundle-plugin. You can use the OSGi module for HttpClient as a starting point.

Re: connection leak

2011-05-30 Thread Oleg Kalnichevski
On Mon, 2011-05-30 at 01:00 -0400, feedly team wrote: My application is leaking connections somehow, it runs fine for days continually doing requests but then at some point timeout connections start to occur continuously. I am using the ThreadSafeClientConnManager to do requests. I execute

Re: Retrying a HTTP call..

2011-05-30 Thread Oleg Kalnichevski
On Mon, 2011-05-30 at 10:40 +0530, Manikandan R wrote: Hi Everyone, I've started using apache commons httpclient library (version no. 3.1) to make the http calls recently. In production environment, seeing the following exceptions in logs: 1. Broken Pipe 2. Connection Reset 3.

Re: Retrying a HTTP call..

2011-05-30 Thread Oleg Kalnichevski
On Mon, 2011-05-30 at 14:25 +0530, Manikandan R wrote: Oleg, Ok, Thanks. Any other recommendation/work around to achieve this? Please suggest. Thanks, Mani Making each message include a unique ID of some sort would be my choice. Oleg On Mon, May 30, 2011 at 1:55 PM, Oleg

Re: Need help in using Kerberos and SPENGO api with HTTPClient4.1

2011-05-30 Thread Oleg Kalnichevski
On Mon, 2011-05-30 at 16:41 +0530, Sridhar Vedhanabatla wrote: Hi Oleg, Thanks for quick reply. I did read that and to implement that, we need some implementation of SPENGOTokenGenerator. Though BouncySPENGOTokenGenerator is there, it is not available in jars that are available in BC

Re: HTTP streaming using ProducingNHttpEntity

2011-05-31 Thread Oleg Kalnichevski
On Tue, 2011-05-31 at 11:17 +0200, dvrslype wrote: I'll see if I can share with the project a sample reverse proxy based on HttpCore and HttpAsyncClient thanks for your reply. An example on how to flush the incoming content on the proxy towards the client-side (without having to wait for

Re: DefaultHttpClient (4.0.3) does not call my customised socket factory for the initial SSL handshake

2011-06-04 Thread Oleg Kalnichevski
On Fri, 2011-06-03 at 15:40 -0700, bnijjhar wrote: Hi I have a specific requirement to only enable the NULL cipher suite for SSL communications. I am using the DefaultHttpClient 4.0.3 version at the moment. I have set up my schemes and HTTPClient as follows. As I don’t require anything

Re: Problem in MIME: change Content-Transfer-Encoding binary to base64 !

2011-06-07 Thread Oleg Kalnichevski
On Tue, 2011-06-07 at 09:06 +0200, joh sar. wrote: Hi ! I'm writing because I didn't find how i can change the type of content Transfer Encoding in a multipart message that i send with a HTTP Post request . For this, i use the library httpmime-4.1.1.jar from:

Re: Overriding Caching Policies

2011-06-07 Thread Oleg Kalnichevski
On Tue, 2011-06-07 at 09:47 +0200, Bart Robeyns wrote: It is not possible to alter the behaviour of the CachingHttpClient because the policies defining the behaviour are private and tied directly to specific implementations in the CachingHttpClients constructor. Furthermore, these policies are

Re: web server auth

2011-06-10 Thread Oleg Kalnichevski
On Wed, 2011-06-08 at 14:00 +0400, Vladimir Loginov wrote: http://pastebin.com/8cyd3Rii I need to login to some servers with httpclient. There is a code which runs 2 versions. Without arguments will login at server with Java Api, and with any arguments will login the same server with

Re: Exception while consuming Content

2011-06-14 Thread Oleg Kalnichevski
On Mon, 2011-06-13 at 14:38 -0400, Srinivas wrote: I am getting an exception while trying to get the content from a HttpResponse. Code: String message = IOUtils.toString(response.getEntity().getContent()); ... // Do Something with InputStream EntityUtils.close(response.getEntity());

Re: Capturing traffic from HTTPClient

2011-06-14 Thread Oleg Kalnichevski
On Tue, 2011-06-14 at 00:16 -0400, Arya wrote: Hello I used to work with C#'s httpwebrequest but since it does not support SOCKS I decided to try HTTPClient. I like it very much so far, but I'm having a hard time logging traffic from it, I always used Fiddler to log httpwebrequest's traffic

Re: Exception while consuming Content

2011-06-14 Thread Oleg Kalnichevski
On Tue, 2011-06-14 at 08:51 -0400, Srinivas wrote: Thanks for the link to the defect. I changed my code to use EntityUtils.toString(response.getEntity()); and removed the call to EntityUtils.close(response.getEntity()); When I enable debug logs; I can see that the toString method also

Re: Exception while consuming Content

2011-06-14 Thread Oleg Kalnichevski
On Tue, 2011-06-14 at 08:59 -0400, Srinivas wrote: I am sorry I meant to say consume. I cant use a snapshot because we have to roll this piece of code into Production later this week. What do you recommend in this case? Use DefaultHttpClient instead of CotnentEncodingHttpClient and decode

Re: Exception while consuming Content

2011-06-14 Thread Oleg Kalnichevski
On Tue, 2011-06-14 at 10:57 -0400, Srinivas Nagesh wrote: Ok. Thanks. Are there any down sides to not using EntityUtils.consume? You do not have to use EntityUtils#consume but you must ensure the content input stream gets closed when you are done reading from it. Also what is the release

Re: How to set cutomized header for httpclient proxy?

2011-06-19 Thread Oleg Kalnichevski
On Sun, 2011-06-19 at 21:32 +0200, Bart Robeyns wrote: There's an example of how to tunnel with 4.1, somewhat hidden away at http://hc.apache.org/httpcomponents-client-ga/httpclient/examples/org/apache/http/examples/conn/ManagerConnectProxy.java. At lines 106-107 a CONNECT-request is build and

Re: connection leak

2011-06-19 Thread Oleg Kalnichevski
On Sun, 2011-06-19 at 15:10 -0400, feedly team wrote: any ideas where to go from here? I am not sure how to debug this further. Each HTTP connection should carry a unique ID (a simple integer count). You can see in the log when a particular connection gets leased from the pool and whether it

Re: Unit testing connection pool release

2011-06-22 Thread Oleg Kalnichevski
On Tue, 2011-06-21 at 13:51 -0500, John Karp wrote: Hi, I'm trying to ensure that my own code is handling HttpEntities and their streams properly, so that the underlying connections get returned to the pool. Is there a recommended way to write unit tests for this? It seems I'll have to

Re: HTTPS Persistent Connections

2011-06-22 Thread Oleg Kalnichevski
On Wed, 2011-06-22 at 13:16 +0530, Gurmeet Budhraja wrote: Hi I wanted to check if someone has ever implemented HTTPS Persistent Connections for HttpClient 3x? Do we have an api for same in HttpClient or works similar to HTTP Persistent Connections, handling connectionManager? thanks

Re: How to Send a HttpPost with a Mime which is a mime4j.Message type ?

2011-06-22 Thread Oleg Kalnichevski
On Wed, 2011-06-22 at 12:49 +0200, joh sar. wrote: Hi, I'am writing because i don't find how to send a Mime which i construct with the library mime4j. I would like send this mime by means of a http post request. For this i try to use httpmime. I know that i can construct mime with

Re: how to automatically retry after 503 Service Unavailable

2011-06-23 Thread Oleg Kalnichevski
On Thu, 2011-06-23 at 05:53 -0400, Dan Checkoway wrote: BTW, I looked at the HttpClient code, and I see that in AbstractHttpClient.execute, the call to director.execute has finished completely before my ResponseHandler gets called. In other words, the chance for the retryHandler to kick in is

Re: connection leak

2011-06-26 Thread Oleg Kalnichevski
On Sat, 2011-06-25 at 16:50 -0400, feedly team wrote: I think I found the issue. An exception is thrown by EntityUtils.toString(): java.io.UnsupportedEncodingException: at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:52) at

Re: Stale connection who is to blame ?

2011-06-29 Thread Oleg Kalnichevski
On Tue, 2011-06-28 at 23:34 -0700, PocketA wrote: Hi All, In this program that I am writing I use a http client for sending secured requests to a remote server. I have no idea what implementation is on this server but I know from its logs that it recieves my requests. Problem is that

Re: null/empty value in request string

2011-06-29 Thread Oleg Kalnichevski
On Wed, 2011-06-29 at 10:15 +0200, khiem nguyen wrote: hi i have a post request like this: param1=value1param2=param3=value3 if i put these into a ArrayListNameValuePair for a POST, should the value of param2 an empty-string or should it be null ? does defaultHttpClient handle these 2

Re: Streaming with Chunks

2011-06-29 Thread Oleg Kalnichevski
On Wed, 2011-06-29 at 14:33 -0400, dan evans wrote: In httpcore-4.1.1, I'd like to take advantage of the line by line facility of SocketInputBuffer to read a continuous stream of lines from a server as follows: conn = new DefaultHttpClientConnection(); Socket socket = new

Re: double-slash in url causes circular redirect

2011-06-30 Thread Oleg Kalnichevski
-url back to browser , which in turn always the same, httpclient fires /Sale instead of //Sale ..., server redirect with ...//Sale/... again //Sale is not a valid URI. where can override this behavior ? See my previous message. Oleg thanx alot On Wed, Jun 29, 2011 at 9:10 PM, Oleg

Re: double-slash in url causes circular redirect

2011-06-30 Thread Oleg Kalnichevski
On Thu, 2011-06-30 at 14:52 +0200, khiem nguyen wrote: well, before they correct this on the server-side-configuration,i still need to handle this as tolerant as possible, that means get the content of the site just like telnet/wget or browser does. i want to make httpclient, after eg. 2 times

Re: Threads sometimes wait for unnecessary ~1s to access connections in pool for HttpClient 4.1.1

2011-06-30 Thread Oleg Kalnichevski
On Thu, 2011-06-30 at 06:27 -0700, bnijjhar wrote: Hi Oleg The reason for having 1 connection per route and 2 threads created in my test is to perform detailed analysis of what happens, then see whether it scales up. Obviously harder to debug with more than a few threads/connections. I would

Re: Large Chunk Extension

2011-07-01 Thread Oleg Kalnichevski
On Fri, 2011-07-01 at 14:43 -0400, dan evans wrote: httpcore-4.1.1 - In ChunkedInputStream, the CharArrayBuffer allocated to read chunk metadata has a length of 16. In looking at AbstractSessionInputBuffer, it seems that if the chunk has an optional chunk extension that exceeds this length

Re: Where can I find were HttpClient handles the CONNECT tunneling through SSL

2011-07-03 Thread Oleg Kalnichevski
On Sat, 2011-07-02 at 17:35 +, Steve Labarbera wrote: I was using HTTPOClient for a while to handle all my HTTP request /responses. However, I have recently needed to build my own client due to my need to send requests that did not correctly URLEncode specified by RFC Standards. I'm

Re: Is it good practice to set the connection timeout for ThreadSafeClientConnManager implementation?

2011-07-04 Thread Oleg Kalnichevski
On Mon, 2011-07-04 at 02:17 -0700, bnijjhar wrote: Hi I've set the socket timeout for my DefaultHttpClient 4.1.1. However, I'm unsure whether to set the connection timeout. You should. It seems that for an HttpClient using the ThreadSafeClientConnManager, the threads are effectively

Re: How to set the parameters if i want to use HttpPost

2011-07-16 Thread Oleg Kalnichevski
On Sat, 2011-07-16 at 15:57 +0800, smith jack wrote: the httpclient i use is of version 4.0, the document seems to be obselete, as a example, i can no longer use the following code now, what change i should make in order to use httppost using httpclient 4.0 ListNameValuePair formparams =

[ANNOUNCEMENT] HttpComponents HttpCore 4.1.2 (GA) Released

2011-07-18 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce the release of HttpComponents HttpCore 4.1.2 (GA). This is a patch release that fixes a number of issues found since release 4.1.1. Download - http://hc.apache.org/downloads.cgi Release notes -

Re: One ThreadSafeClientConnManager, many DefaultHttpClients

2011-07-19 Thread Oleg Kalnichevski
On Tue, 2011-07-19 at 12:50 +0100, Russell Brown wrote: Hi, Is this OK ThreadSafeClientConnManager cm = new ThreadSafeClientConnManager(); DefaultHttpClient httpClient1 = new DefaultHttpClient(cm); httpClient1.setHttpRequestRetryHandler(handler1); DefaultHttpClient httpClient2 =

Re: Understanding cookie handling - registering cookies returned in a response

2011-07-20 Thread Oleg Kalnichevski
On Wed, 2011-07-20 at 11:25 +0200, Villemos, Gert wrote: Well, I dont understand cookie handling. I have read the very detailed guide at http://hc.apache.org/httpcomponents-client-ga/tutorial/pdf/httpclient-tu torial.pdf and a lot of posts, but I still don't get it. In understand that you

Re: How to stream a file via PUT to multiple HttpClients

2011-07-20 Thread Oleg Kalnichevski
On Wed, 2011-07-20 at 09:37 -0400, Jon Moore wrote: Hi Sachin, In this case, I would suggest running the .execute() calls in separate threads, or perhaps using the asynchronous HttpClient: http://hc.apache.org/httpcomponents-asyncclient-dev/index.html I think those are your only options

Re: NTLMv2 against sharepoint

2011-07-20 Thread Oleg Kalnichevski
On Wed, 2011-07-20 at 16:48 +0200, Stefan Huggenberger wrote: Am 20.07.2011 16:07, schrieb Oleg Kalnichevski: On Wed, 2011-07-20 at 15:32 +0200, Stefan Huggenberger wrote: Thanks Sam for the hints. It has to fail on the java side. A perl ntmlv2 login works fine?! Thanks, Stefan

RE: Understanding cookie handling - registering cookies returned in a response

2011-07-22 Thread Oleg Kalnichevski
such as this one http://svn.apache.org/repos/asf/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/client/LaxRedirectStrategy.java Oleg -Original Message- From: Oleg Kalnichevski [mailto:ol...@apache.org] Sent: Wed 7/20/2011 4:03 PM To: HttpClient User

Re: Issue with replacing default header value

2011-07-22 Thread Oleg Kalnichevski
On Thu, 2011-07-21 at 14:53 +0200, Daniel Holm wrote: Hello everyone! I'm trying to replace the value of some of my default headers on a per request basis, but I'm not sure how to do this. I'm setting the default headers on the client using :

Re: ConnectionPoolTimeoutException

2011-07-22 Thread Oleg Kalnichevski
On Thu, 2011-07-21 at 18:47 +, Fang Lin wrote: Often getting org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection at org.apache.http.impl.conn.tsccm.ConnPoolByRoute.getEntryBlocking(ConnPoolByRoute.java:417) at

Re: Only create 2 connection per route

2011-07-28 Thread Oleg Kalnichevski
On Wed, 2011-07-27 at 23:46 +, Fang Lin wrote: I am now puzzled by the following two cases with my ThreadSafeClientConnManager : 1. getConnectionsInPool (route) call shows that the value increased from 1 to 2 quickly, but never goes beyond 2. 2. getConnectionsInPool (route) always

Re: setting headers for a async request

2011-07-29 Thread Oleg Kalnichevski
On Fri, 2011-07-29 at 10:54 +0200, Julien Vermillard wrote: Hi ! I'm using the async http client for post get methods, it's working fine until now. here my code : code clientMethod = new HttpAsyncPost(targetUrl, content, request.getContentType()); httpclient.execute(clientMethod,

[ANNOUNCEMENT] HttpComponents HttpCore 4.1.3 (GA) Released

2011-07-31 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce the release of HttpComponents HttpCore 4.1.3 (GA). This release fixes a critical regression introduced in version 4.1.2. Under special circumstances non-blocking SSL sessions may fail to terminate correctly if the opposite end shuts down

[ANNOUNCEMENT] HttpComponents HttpClient 4.1.2 (GA) release

2011-08-07 Thread Oleg Kalnichevski
The HttpComponents project is pleased to announce 4.1.2 (GA) release of Apache HttpClient. This is a bug fix release that addresses a number of non-critical issues reported since release 4.1.1. For details please see the release notes. --- Download -

Re: how to terminate data consuming by asyncclient without declining of the result

2011-08-09 Thread Oleg Kalnichevski
On Tue, 2011-08-09 at 19:24 +0300, Xasima wrote: Hello. I 'm performing numerous requests to the search API, but interested only in certain field (JSON / HTML attribute) that is presented usually in the beginning of the document with search response. The parsing is performed with the help of

Re: how to terminate data consuming by asyncclient without declining of the result

2011-08-10 Thread Oleg Kalnichevski
On Wed, 2011-08-10 at 15:39 +0300, Xasima wrote: On Tue, Aug 9, 2011 at 10:24 PM, Oleg Kalnichevski ol...@apache.org wrote: On Tue, 2011-08-09 at 19:24 +0300, Xasima wrote: You can use IOControl#shutdown() to shut down the underlying connection. Sorry, I can't avoid an empty result

Re: HttpClient 4.x headers parameters - question

2011-08-13 Thread Oleg Kalnichevski
On Fri, 2011-08-12 at 16:24 +0200, Stijn Deknudt wrote: Hello, I'm reading the documentation for the HttpClient 4.x (http://hc.apache.org/httpcomponents-client-ga/tutorial/html/fundamentals.html). There's a notion about Headers and Parameters, and you can specify them on both HttpClient

Re: HttpClient / SSL STRICT_HOSTNAME_VERIFIER

2011-08-18 Thread Oleg Kalnichevski
On Wed, 2011-08-17 at 13:56 -0700, am am wrote: Thank you for the reply. Your point makes a lot of sense. But you are describing a security exploit. This begs the question: Does this mean that a certificate is not supposed to be issued (ever) to an IP i.e. CN=IP? No, it does not. CN can be

Re: [ANNOUNCEMENT] HttpComponents HttpCore 4.2-alpha1 Released

2011-08-20 Thread Oleg Kalnichevski
on the new connection pool components from HttpCore will replace the ThreadSafeClientConnManager in release 4.2. Oleg On Fri, Aug 19, 2011 at 11:25 AM, Oleg Kalnichevski ol...@apache.orgwrote: The Apache HttpComponents project is pleased to announce the release of HttpComponents HttpCore 4.2

Re: Preemptive authentication examples wrong

2011-08-24 Thread Oleg Kalnichevski
On Wed, 2011-08-24 at 12:32 +0200, Christian Migowski wrote: On Wed, Aug 24, 2011 at 11:25 AM, Oleg Kalnichevski ol...@apache.org wrote: Still: forcing the users to implement that code snippet every time they need to use preemptive auth is just this: forcing the user to do unnecessary

Re: Preemptive authentication examples wrong

2011-08-24 Thread Oleg Kalnichevski
On Wed, 2011-08-24 at 14:16 +0200, Christian Migowski wrote: I do not see a point making silly things easier, but you are welcome to disagree. :-D I already pointed you to a valid (even required) use, to bad you're too stubborn and call everything you cannot think of silly. If I shoot

Re: Preemptive authentication examples wrong

2011-08-24 Thread Oleg Kalnichevski
On Wed, 2011-08-24 at 16:46 +, Fredrik Jonson wrote: Oleg Kalnichevski wrote: I contend that preemptive authentication is conceptually flawed and poses major security risks in the overwhelming majority of cases. What is it that is conceptually flawed with using preemtive

Re: Commons HTTP Client 3.1 - NTLM Response Empty

2011-08-24 Thread Oleg Kalnichevski
On Wed, 2011-08-24 at 23:03 +0530, amit shah wrote: In the NTLM protocol implementation from httpclient 3.1 (org.apache.commons.httpclient.auth.NTLM) the NTLM Response Fields are always empty (the NtChallengeResponseLen and NtChallengeResponseMaxLen are set to 0 while

Re: HttpClient 3.1: idle connection time out

2011-08-26 Thread Oleg Kalnichevski
On Thu, 2011-08-25 at 13:55 +0200, Russell Brown wrote: Hi, We still have some code running on hc3.1. We are migrating to 4.1 in every case but have this outstanding legacy code that needs some tweaking. Is there a way to set the idle connection timeout without changing the

Re: Preemptive authentication examples wrong

2011-08-26 Thread Oleg Kalnichevski
On Fri, 2011-08-26 at 12:23 +0200, David Kocher wrote: On 24.08.2011, at 20:40, Oleg Kalnichevski wrote: On Wed, 2011-08-24 at 16:46 +, Fredrik Jonson wrote: Oleg Kalnichevski wrote: I contend that preemptive authentication is conceptually flawed and poses major security risks

Re: Commons HTTP Client 3.1 - NTLM Response Empty

2011-08-29 Thread Oleg Kalnichevski
On Mon, 2011-08-29 at 10:24 -0700, LogbackUser wrote: Thanks Oleg. On having a look at httpcommons client 4.1.2 code (org.apache.http.impl.auth.NTLMEngineImpl.Type3Message class line no 943) I realized that the last questions would apply here too. Since the code is computing only the LM

Re: HttpMethod - releasing connections by closing body stream

2011-09-01 Thread Oleg Kalnichevski
On Wed, 2011-08-31 at 17:42 -0500, Jacob Williams wrote: In HttpClient 3 HttpMethod provides a releaseConnection method. An OAuth library I'm working with (http://oauth.googlecode.com/svn/code/java/) uses HttpMethod but doesn't provide a way of invoking releaseConnection. As a workaround I'm

Re: HttpServer: How to get Client IP

2011-09-02 Thread Oleg Kalnichevski
On Fri, 2011-09-02 at 08:22 -0700, angelogeminiani wrote: Hi, I'm writing an HTTP server and I need client IP. I'm using httpcore 4.1.3. In Servlets it's easy: request.getRemoteAddr(). Is there similar method in HttpRequest, or a way to retrieve client IP from server? You can cast any

Re: HttpServer: How to get Client IP

2011-09-05 Thread Oleg Kalnichevski
On Sun, 2011-09-04 at 06:24 -0700, angelogeminiani wrote: olegk wrote: On Fri, 2011-09-02 at 08:22 -0700, angelogeminiani wrote: Hi, I'm writing an HTTP server and I need client IP. I'm using httpcore 4.1.3. In Servlets it's easy: request.getRemoteAddr(). Is there similar

Re: HttpClient as java.net.URLConnection

2011-09-06 Thread Oleg Kalnichevski
On Tue, 2011-09-06 at 04:36 -0700, Juergen Weber wrote: It's just my guess that HttpURLConnection is a commonly used class, so it would offer itself to be replaced by another, better implementation. Yes, it is used a lot, but the API is very limited. Replacing the implementation won't

Re: Some websites: SSLPeerUnverifiedException: peer not authenticated

2011-09-06 Thread Oleg Kalnichevski
On Tue, 2011-09-06 at 03:48 -0700, Ahmed Ashour wrote: Hi Vasile, Thanks, I saw the error main, RECV SSLv3 ALERT: fatal, bad_record_mac, and read http://old.nabble.com/Fwd%3A-Httpclient-sslv3---bad_record_mac-error-tt21999553.html#a22000148 Another question, is there is way to

RE: ThreadSafeClientConnectionManager and KeepAlive connnections [I]

2011-09-08 Thread Oleg Kalnichevski
On Thu, 2011-09-08 at 12:10 -0500, Thomas Kunnumpurath wrote: Classification: For internal use only Oleg/Sam, Thanks a lot for both your help! The issue is now resolved. Question though is why does the logs show that the connection is reusable, Because the connection is perfectly

Re: Confused about target host and proxy authentication

2011-09-08 Thread Oleg Kalnichevski
/html/authentication.html#d4e971 From: Oleg Kalnichevski ol...@apache.org To: Michael Remijan mjremi...@yahoo.com Cc: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Thursday, September 8, 2011 1:22 PM Subject: Re: Confused about target

Re: Confused about target host and proxy authentication

2011-09-10 Thread Oleg Kalnichevski
://www.server.com/path/;here/A.P /BODY/HTML From: Oleg Kalnichevski ol...@apache.org To: Michael Remijan mjremi...@yahoo.com Cc: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Friday, September 9, 2011 11:43 AM Subject: Re: Confused about target

Re: Multiple X509 client certificates (SSLSocketFactory) per HttpClient instance

2011-09-14 Thread Oleg Kalnichevski
On Mon, 2011-09-12 at 15:36 +0200, Barry Pitman wrote: Hi I have a web application which makes use of a third party SOAP web service which requires X509 client authentication. The details of the client cert used for the connection to the 3rd party are used for authentication and

Re: Handshakes

2011-09-20 Thread Oleg Kalnichevski
On Tue, 2011-09-20 at 22:06 +0200, Wojciech Klicki wrote: Hello, I use HttpClient to do few get requests to server that require two-way authentication. I see in HttpClient logs that each time a request is made a handshake is done. And this sends a lot of data along (for example

[ANNOUNCEMENT] HttpComponents HttpCore 4.2-alpha2 Released

2011-09-23 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce the release of HttpComponents HttpCore 4.2-alpha2. This release comes with completely redesigned and rewritten asynchronous HTTP protocol handlers. New protocol handling API used in conjunction with connection pooling components introduced

Re: Handling multipart/x-mixed-replace content

2011-09-28 Thread Oleg Kalnichevski
On Tue, 2011-09-27 at 18:43 +0300, Joonas Koivunen wrote: Hi there everyone! I've just pieced together a simple implementation for $topic in a somewhat httpcomponent fashion, splitting one HttpEntity into a stream of actual HttpEntities. I needed it to handle MJPEG stream from an IP

Re: how to execute CONNECT through an authenticated proxy to gain a plain socket

2011-10-03 Thread Oleg Kalnichevski
On Sun, 2011-10-02 at 05:36 -0700, simone pacilli wrote: I am writing a program (with a server side and a client side) to establish a transport layer for existing remote control programs like ssh, remote desktop, vnc etc. to connect between client and server also if they are behind a proxy

Re: Broken BasicResponseHandler

2011-10-06 Thread Oleg Kalnichevski
On Wed, 2011-10-05 at 13:44 -0700, David Hosier wrote: Perhaps I'm wrong, but the code for BasicResponseHandler in httpclient 4.1.2 does not satisfy the javadocs as written. The javadoc states the following: If the response code was = 300, the response body is consumed and an

Re: Broken BasicResponseHandler

2011-10-06 Thread Oleg Kalnichevski
: On Thursday, October 6, 2011 at 2:22 AM, Oleg Kalnichevski wrote: On Wed, 2011-10-05 at 13:44 -0700, David Hosier wrote: Perhaps I'm wrong, but the code for BasicResponseHandler in httpclient 4.1.2 does not satisfy the javadocs as written. The javadoc states the following

Re: Broken BasicResponseHandler

2011-10-06 Thread Oleg Kalnichevski
, it is intentional that the exception thrown does not contain a response body, because it would involve reading the entire body content into a memory buffer. Oleg -- David Hosier On Thursday, October 6, 2011 at 11:29 AM, Oleg Kalnichevski wrote: On Thu, 2011-10-06 at 10:47 -0700, David Hosier

Re: Broken BasicResponseHandler

2011-10-06 Thread Oleg Kalnichevski
enough or specific enough I'll happily apply a patch if you submit one. Oleg So now that I understand better how things work, I can take action accordingly. Thanks for the responses. -- David Hosier On Thursday, October 6, 2011 at 11:40 AM, Oleg Kalnichevski wrote: On Thu, 2011-10-06

Re: Broken BasicResponseHandler

2011-10-06 Thread Oleg Kalnichevski
On Thu, 2011-10-06 at 14:23 -0700, David Hosier wrote: On Thursday, October 6, 2011 at 1:40 PM, Oleg Kalnichevski wrote: On Thu, 2011-10-06 at 13:21 -0700, David Hosier wrote: Understood. The library does not support the use case of obtaining the entity of a response via the recommended

Re: HttpClient cache - caching custom objects

2011-10-07 Thread Oleg Kalnichevski
On Thu, 2011-10-06 at 15:53 -0700, MakMak wrote: I see that the HttpClient cache caches byte stream retrieved from an operation. In my usecase, I depend on an external restful webservice to drive my website. The service responds by XML. When I use the HttpClient's cache module, after

Re: HttpClient with Resource Adapter?

2011-10-11 Thread Oleg Kalnichevski
On Tue, 2011-10-11 at 00:22 -0700, pjuza wrote: Hello, I would like to ask you about using HttpClient with Resource adapter as suggested in issue HTTPCLIENT-720 (https://issues.apache.org/jira/browse/HTTPCLIENT-720)? We need to solve the following problem - we have some connectors (sql,

Re: ConnectTimeoutException after 5 to 6 hrs

2011-10-12 Thread Oleg Kalnichevski
On Wed, 2011-10-12 at 14:10 +0300, Vasile Alin wrote: Are you sure this is not caused by your web server? The server is clearly unable to handle additional connections after a while, so this does seem to suggest a server side issue. Oleg On 11 October 2011 11:24, Litty

Testing HttpClient 4.2 alpha1 snapshot

2011-10-12 Thread Oleg Kalnichevski
Folks There has been a _lot_ of changes in the trunk for the coming 4.2 release of HttpClient. The connection management and HTTP authentication code has been pretty much fully redesigned and re-written. We are looking at an official ALPHA release off the trunk towards the end of the month.

Re: Setting up a delay between requests to a host

2011-10-14 Thread Oleg Kalnichevski
On Fri, 2011-10-14 at 16:06 +0200, Jordi Domingo Borràs wrote: Hi all, I'm using the latest version of HttpClient. I've set it up with ccm.setDefaultMaxPerRoute(1) but I also need to establish a delay between requests for some hosts. Is there any fast way to do so? If not, your

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