RE: Sometimes response timeout seems to not work

2010-03-23 Thread Oleg Kalnichevski
. Do you mean that, maybe, the response packets are received in long intervals (always less than 60 seconds), and then the exception is not thrown but the response time could take several minutes? Yes, I do. Oleg Thanks, Joan. -Mensaje original- De: Oleg Kalnichevski [mailto:ol

Re: HttpCore NIO: drop a connection intentionally

2010-03-23 Thread Oleg Kalnichevski
Leo Galambos wrote: Hello, I am trying to use HttpCore NIO for a deep web crawler. The crawler must be able to cancel/drop a connection as soon as the respective data stream length is above some limit (e.g. 10MB). Obviously, I have no intentions of fetching ISO/DVD images... AFAIK I would

Re: URL/URI syntax issue in HC 4.0.1

2010-03-23 Thread Oleg Kalnichevski
is defined by the newer standard RFC2396. http://www.ietf.org/rfc/rfc2396.txt URI specification supersedes that of URL. RFC2396 does not permit underscore neither in domain nor host names. Oleg Thanks Valli -Original Message- From: Oleg Kalnichevski [mailto:ol...@apache.org] Sent

Re: Loosing my HttpSession between Applet and Servlet

2010-03-24 Thread Oleg Kalnichevski
On Tue, 2010-03-23 at 17:57 -0400, deschamps.francoi...@hydro.qc.ca wrote: Hi, I'am using HttpClient 4.0.1. Each time my applet make a get or post to the servlet, I am loosing my httpSession on the back end. How can we keep the httpSession alive with HttpClient ? Here's the call

Re: Locking problems of SocketInputSteam at org.apache.commons.httpclient.HttpParser.readRawLine

2010-03-24 Thread Oleg Kalnichevski
On Wed, 2010-03-24 at 10:41 +0530, Ruchi Goel wrote: Hi, We are using commons-httpclient-3.0.jar for one of our yahoo properties. The application is running on jetty. In production, we are seeing the lock problems as follows : btpool0-11554

Re: NHttp client questions.

2010-03-24 Thread Oleg Kalnichevski
On Wed, 2010-03-24 at 16:02 +0200, Todor Boev wrote: Hi, I examined the current nio HTTP client code locate in http://svn.apache.org/repos/asf/httpcomponents/asynchttpclient/trunk I have some questions. 1) The method AsyncHttpClient.execute() returns an instance of HttpExchange. All I

AsyncHttpClient - HttpAsyncClient

2010-03-24 Thread Oleg Kalnichevski
Folks I renamed the experimental async HTTP client project from AsyncHttpClient - HttpAsyncClient in order to be more consistent with the usual naming convention used within the project. I also had to rename the module name in SVN. As a result the SVN url changed to:

Re: intermittent SocketException in HC 4.0.1 GA

2010-03-28 Thread Oleg Kalnichevski
natarajan_va...@emc.com wrote: I just updated our code to use HC 4.0.1 GA (no change to server app that run in jboss server) and getting following 2 exceptions Any suggestions to resolve this issue would be much appreciated. Thanks again, Valli In both cases the request failed

Re: Performance problem with multiple requests to the same server simultaneously

2010-04-05 Thread Oleg Kalnichevski
On Mon, 2010-04-05 at 00:20 -0400, zxt...@gmail.com wrote: Used multiple threads to connect to the same server (httpcomponents-client 4.0.1). Each thread represents an account on the server and has different username/password combination, so different cookies. Normally 1000 threads are

Re: Never use absolute URIs with EasySSLProtocolSocketFactory

2010-04-05 Thread Oleg Kalnichevski
On Mon, 2010-04-05 at 10:50 +0200, Marcel Stör wrote: We're using HttpClient for an Eclipse plugin. To support self-signed certificates we also use EasySSLProtocolSocketFactory. Hence, we modify the standard HttpClient HostConfiguration instance like so: ... if

Re: Unable to authenticate with HttpClinet 4.0.1 with NTLM

2010-04-08 Thread Oleg Kalnichevski
On Thu, 2010-04-08 at 15:24 +0200, dan...@math.uni-sb.de wrote: Dear all, if followed the example on http://hc.apache.org/httpcomponents-client-4.0.1/ntlm.html But I am still not able to authenticate. (I have read that Domain and Workstation are optional, so I have set them to the empty

Re: migrating from 3.1 - 4.1

2010-04-08 Thread Oleg Kalnichevski
On Thu, 2010-04-08 at 10:21 -0700, LeeBreisacher wrote: I see this was not answered. Nor can I find a migration guide. Surely such a guide must exist? There are SO many API changes between 3 and 4 -- at least a simple map showing class name changes? Please! There is no migration guide, as

Re: Access to socket for tunnelled protocol

2010-04-09 Thread Oleg Kalnichevski
On Fri, 2010-04-09 at 17:19 +1200, Richard Williams wrote: Hi, I am writing some client code to tunnel a propriety protocol over http/ssl optionally via a NTLMv2 proxy. I have the NTMLv2 authentication, working and I can successfully GET over https. Now I want to get hold of the

Re: Manually Setting up Authorization Header.

2010-04-11 Thread Oleg Kalnichevski
On Sun, 2010-04-11 at 13:19 -0400, rangeli nepal wrote: Good Evening Everybody, I am trying to seup Authorization header in GET method like this. Header authHeader=new Header(); authHeader.setName(Authorization); get deflated and base64 encoded String

Re: should I be concerned about these messages?

2010-04-19 Thread Oleg Kalnichevski
On Sun, 2010-04-18 at 10:48 -0700, Douglas Ferguson wrote: httpclient.HttpMethodDirector - Narrowly avoided an infinite loop in execute It depends on your application - To unsubscribe, e-mail:

Re: instream.read() ---- In SSL mode

2010-04-20 Thread Oleg Kalnichevski
On Tue, 2010-04-20 at 03:34 -0700, Guru Prasad P.S wrote: Any reason why no exception is thrown in case of non ssl mode. SSL transport is significantly more complex and different factors may have an effect Explicitly the connection is not closed before reading data from stream. Making

Re: instream.read() ---- In SSL mode

2010-04-20 Thread Oleg Kalnichevski
On Tue, 2010-04-20 at 04:17 -0700, Guru Prasad P.S wrote: Don't think there is any issue connection management logic. Only this use case has problem and rest all works perfectly fine. I am just telling you what I see as the most likely cause of the problem. Whether you choose to listen or

Re: Fw: SOCKS proxy example??

2010-04-20 Thread Oleg Kalnichevski
On Tue, 2010-04-20 at 13:48 -0700, Josh Gordineer wrote: Thanks John! So from this configuration it looks like there is no way to control socks proxy setting on a per request basis through HttpClient? We have a scenario where we let users give proxy configuration information to our

Re: Fw: SOCKS proxy example??

2010-04-20 Thread Oleg Kalnichevski
On Tue, 2010-04-20 at 14:52 -0700, Josh Gordineer wrote: Thanks Oleg!! Just to finish the thought, would I pass the JDK system parameters 'socksProxyHost' and 'socksProxyPort' as parameters in the HttpParams object in the connectSocket() operation on the SocketFactory? Yes, you can use

Re: How can I except uri encoding?

2010-04-21 Thread Oleg Kalnichevski
On Wed, 2010-04-21 at 10:30 +0200, John Smith wrote: On Wed, Apr 21, 2010 at 9:43 AM, Christophe Marchand christophe.march...@axyus.com wrote: URLEncoder.encodeUrl(...) ??? Regards, Christophe No, no. I know that and use. When I use that I'll transform request from GET

Re: Handling Redirects automatically in HttpClient4.0.1

2010-04-23 Thread Oleg Kalnichevski
On Fri, 2010-04-23 at 15:02 +0530, Phani Sajja wrote: Hi all, I am using HttpClient version 4.0.1. When I execute a method on a link I am getting error 302 saying HTTP/1.0 302 Moved Temporarily. How to handle redirects automatically so that I can get the final page. Help me please!

Re: Handling Redirects automatically in HttpClient4.0.1

2010-04-23 Thread Oleg Kalnichevski
On Fri, 2010-04-23 at 17:01 +0530, Phani Sajja wrote: Hi Oleg, Here is the complete log Works without any problem for me [DEBUG] SingleClientConnManager - Get connection for route HttpRoute[{}-http://www.tkdl.res.in] [DEBUG] DefaultHttpClient - Attempt 1 to execute request [DEBUG]

Re: Default parameters (user-agent)

2010-04-26 Thread Oleg Kalnichevski
On Mon, 2010-04-26 at 14:44 +0200, wvengen+list-httpcli...@nikhef.nl wrote: Hi, I'm using the httpclient 4.0.1 library in an application and I've been looking for a way to set default parameters, but haven't found it in the 4.x API. I could set the user-agent after each creation of

Re: HTTP Post without content-length : server failure even when chunked

2010-04-26 Thread Oleg Kalnichevski
On Mon, 2010-04-26 at 15:22 -0500, hanasaki jiji wrote: Using httpclient 4.0.1 and doing an http POST NOTE: this has been tried with both chunked = true and false The POST code does the following: InputStreamEntity uploadHttpEntity = new

Re: Distinguish between temporary and permanent redirects.

2010-04-28 Thread Oleg Kalnichevski
On Wed, 2010-04-28 at 10:45 -0700, swatkatz wrote: That's the first thing I looked at - it doesn't tell me whether a URL was temporarily or permanently redirected. I have to take different actions based on whether the URL was a temporary or permanent redirect. Then you obviously need to put

Re: HTTP Post without content-length : server failure even when chunked

2010-04-30 Thread Oleg Kalnichevski
On Thu, 2010-04-29 at 22:07 -0500, hanasaki wrote: Unfortunately my code is hitting a servlet not under my control which depends on the content length being set to the actual number of bytes. * note: the content is in an InputStream and thus its full length is not known (could be a file,

Re: HttpClient using custom authentication in a multi-user environment

2010-05-04 Thread Oleg Kalnichevski
On Mon, 2010-05-03 at 17:37 -0400, Eric Rizzo wrote: I'm writing a bridge web app that needs to accept login from credentials from users and use HttpClient to authenticate them to another site/service. I also need to remember the session (track it in my app's session) so that my app can

Re: Getting past authentication to Flickr/Yahoo

2010-05-04 Thread Oleg Kalnichevski
On Tue, 2010-05-04 at 09:58 -0700, lsacco wrote: I've been using LiveHTTPHeaders/Wireshark to analyze it. I see 3 redirects. This part works fine for HTTPClient. The problem is posting the resulting Yahoo login form. There's a bunch of hidden fields with GUIDs and it has a hash function

Re: defaulthttpclient - connected ?

2010-05-04 Thread Oleg Kalnichevski
On Tue, 2010-05-04 at 15:47 -0400, Langston, James wrote: Hi all, Is there a way to check that I'm still connected w/ defaulthttpclient ? Essentially, I'm logged into a server and if the login session gets timed out or not, I just quickly want to check, but I don't see any easy methods to

Re: HttpClient using custom authentication in a multi-user environment

2010-05-04 Thread Oleg Kalnichevski
On Tue, 2010-05-04 at 17:14 -0400, Eric Rizzo wrote: On May 4, 2010, at 4:39 PM, Oleg Kalnichevski wrote: Thanks for the help; see my responses inline below. On Mon, 2010-05-03 at 17:37 -0400, Eric Rizzo wrote: I'm writing a bridge web app that needs to accept login from credentials

Re: Interceptor ioReactor thread terminated abnormally

2010-05-06 Thread Oleg Kalnichevski
On Thu, 2010-05-06 at 17:08 +0200, Leo Galambos wrote: Hello, I cannot decide who is responsible for an exception in the following example -- me or http-core? Should I always handle the getEntity()==null case in interceptors? BTW: ResponseGzipUncompress does not check the case as well

Re: HttpClient Post failed to work with ISA server

2010-05-06 Thread Oleg Kalnichevski
On Thu, 2010-05-06 at 10:17 -0700, piHuv wrote: Hi I am trying to do a POST from a search website and get the following error message HTTPHelp : ClientProtocolException : org.apache.http.client.HttpResponseException: Bad Request ( The HTTP request includes a non-supported header.

Re: httpclient 4, ssl and client side certificates

2010-05-07 Thread Oleg Kalnichevski
On Fri, 2010-05-07 at 13:24 +0930, Luke Coe wrote: Hi All, I am having trouble working out how I can get get HttpClient 4 to use SSL in the way I need. I have X HTTPS servers that I send requests to. One requires a client side certificate while the others have trusted certificates and

Re: Determine how much traffic goes threw connection?

2010-05-10 Thread Oleg Kalnichevski
On Mon, 2010-05-10 at 08:24 +0200, Sven Kasten wrote: Hi @all, I want to know if there is a way to get the amount of sent and received bytes from a connection? Looked through the API all day but didn't find anything! Kind regards, Sven Sven If you are using 4.0 API you can obtain basic

Re: multiple sessions on single MultiThreadedHttpConnectionManager

2010-05-11 Thread Oleg Kalnichevski
On Tue, 2010-05-11 at 08:20 -0700, Miguel De Anda wrote: i have an app that needs to crawl for data from another server. the service requires login, and it keeps track of the session via a cookie. i need the app to be able to login as thousands of different users to crawl for data. the

Re: stale connection

2010-05-11 Thread Oleg Kalnichevski
On Tue, 2010-05-11 at 12:28 -0700, Ken Krugler wrote: On May 11, 2010, at 11:53am, Brooks, Kenneth S wrote: In the 4.0.1 tutorial I see the following paragraph. ... begin snippet ... HttpClient tries to mitigate the problem by testing whether the connection is 'stale', that is no

RE: stale connection

2010-05-12 Thread Oleg Kalnichevski
On Tue, 2010-05-11 at 22:04 -0400, Brooks, Kenneth S wrote: We are doing serialization over http.. This means that 100% of our calls will *not* be idempotent.. I don't see how we can avoid the stale check. Are you saying that NoHttpResponseException is __always__ safe to retry? Yes, it

Re: releasing connection

2010-05-12 Thread Oleg Kalnichevski
On Wed, 2010-05-12 at 15:33 -0400, Brooks, Kenneth S wrote: In 3.1 we did this: } finally { if (postMethod != null) { postMethod.releaseConnection(); } } I don't see anything similar to that nor do I see it called out in the

RE: stale connection

2010-05-12 Thread Oleg Kalnichevski
On Wed, 2010-05-12 at 16:33 -0400, Brooks, Kenneth S wrote: Thanks for the responses. In the case of the StaleChecking, we also have an IdleConnectionMonitorThread that will evict connections that are over 20,000ms. We can do this in our environment with relative confidence because we

RE: releasing connection

2010-05-12 Thread Oleg Kalnichevski
On Wed, 2010-05-12 at 16:55 -0400, Brooks, Kenneth S wrote: Thanks to both of you.. We call httpResponse.getEntity().getContent() Careful here. Response entity can be null. since we always need the full response since it is serialized data.. Just need to dig in and see if that will

Re: Intermittent errors when sending compressed data to Apache

2010-05-15 Thread Oleg Kalnichevski
On Fri, 2010-05-14 at 09:35 -0700, Deb wrote: We have a Java client - Apache httpd proxy - Tomcat configuration that uses HttpClient to upload files to the Tomcat server by means of a HttpPost with a MultipartEntity. This worked fine until we added compression. That is, we: 1. Wrapped the

Re: Aborting requests via Thread.interrupt()?

2010-05-16 Thread Oleg Kalnichevski
On Sat, 2010-05-15 at 18:56 +0200, Mario Winterer wrote: Hi! Is it possible to abort an ongoing HTTP request by calling Thread.interrupt() on the thread currently executing HttpClient.execute(...)? The tutorial only mentions HttpUriRequest.abort(), which is nice but proprietary (code that

[ANNOUNCEMENT] HttpComponents HttpClient 4.1-alpha2 Released

2010-05-19 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce the release of HttpComponents HttpClient 4.1-alpha2. This release fixes a number of non-severe bugs discovered since the last release and introduces support for several frequently requested features: * HTTP/1.1 response caching *

Re: HttpClient 4.0.1 and Timeout

2010-05-24 Thread Oleg Kalnichevski
On Mon, 2010-05-24 at 12:21 -0700, Ray Hooker wrote: I am having trouble getting my client to timeout with a non-responsive host. I should say up front that I am doing authentication discovery to setup valid auth credentials for hosts that I am managing. The other big deal is that I am

Re: ThreadSafeClientConnManager - connections to the same destination but everytime via different proxy server

2010-05-25 Thread Oleg Kalnichevski
On Tue, 2010-05-25 at 03:18 +0200, Jakub wrote: Hello, I just wanted to ask If I can do this http://pastebin.com/P5TZYC37 ? I have some spring issues and I'm wondering whether this scenario would be OK for the example from documentation. It's really hard to tell, I don't like

Re: HttpClient 4.0.1 and Timeout

2010-05-25 Thread Oleg Kalnichevski
On Mon, 2010-05-24 at 19:17 -0700, Ray Hooker wrote: Thanks for the reply. I think you are probably right about the SSL handshake being where it fails. With version 4.1, is it possible to deal with the self-signed certificate? Of course. The code I have for the custom protocol to

Re: Sending a multipart message with http client nio causes the UnsupportedOperationException exception

2010-05-25 Thread Oleg Kalnichevski
On Tue, 2010-05-25 at 16:57 +0200, MOSSE Franck wrote: Hi, I am facing an issue while I am trying to send a Multipart Entity with the http client nio api. I received the UnsupportedOperationException exception. I am using the following libraries: httpcore-nio-4.0.1; httpmime-4.0.1 and

Re: java.lang.IllegalStateException: Connection already open

2010-05-25 Thread Oleg Kalnichevski
On Tue, 2010-05-25 at 13:06 -0400, Brooks, Kenneth S wrote: What would cause this: java.lang.IllegalStateException: Connection already open Never saw this when using httpclient 3.x, recently upgraded to 4.0.1 and saw this a few times while running performance tests. Here are all of the

RE: java.lang.IllegalStateException: Connection already open

2010-05-26 Thread Oleg Kalnichevski
On Tue, 2010-05-25 at 16:31 -0400, Brooks, Kenneth S wrote: Oleg, 22-May-2010:07:56:19.310 scd2ntb215 mainEXCEPTION AbunchOfOurInfo... ltu068_scd2ntb215_-1c64b48c:128bb71b989:-73d0 SYSTEM_EXCEPTION[Error making call[Error executing Remote Method=[addIncentive]

Re: Sending a multipart message with http client nio causes the UnsupportedOperationException exception

2010-05-26 Thread Oleg Kalnichevski
Hi olekg, Using a buffer content in memory will not be a good solution for me as i have to transfert large amount of data like videos and i don't want to load the full video in memory. Is it planned to include the support of multipart messages and stream body in the httpcore nio

Re: Sending a multipart message with http client nio causes the UnsupportedOperationException exception

2010-05-26 Thread Oleg Kalnichevski
On Wed, 2010-05-26 at 05:21 -0700, franck.mosse wrote: olegk wrote: Hi olekg, Using a buffer content in memory will not be a good solution for me as i have to transfert large amount of data like videos and i don't want to load the full video in memory. Is it planned

RE: java.lang.IllegalStateException: Connection already open

2010-05-26 Thread Oleg Kalnichevski
On Wed, 2010-05-26 at 11:01 -0400, Brooks, Kenneth S wrote: Attaching 2 log snippets. First is the httpclient log with log4j.logger.org.apache.http=TRACE, F as the log4j setting. I've included the very last line of the wire trace from the previous call.. just to give some conetext. I think

RE: java.lang.IllegalStateException: Connection already open

2010-05-26 Thread Oleg Kalnichevski
On Wed, 2010-05-26 at 11:01 -0400, Brooks, Kenneth S wrote: Attaching 2 log snippets. First is the httpclient log with log4j.logger.org.apache.http=TRACE, F as the log4j setting. I've included the very last line of the wire trace from the previous call.. just to give some conetext. I think

RE: java.lang.IllegalStateException: Connection already open

2010-05-26 Thread Oleg Kalnichevski
On Wed, 2010-05-26 at 13:31 -0400, Brooks, Kenneth S wrote: Ok.. I had the same gut feeling when I put that in back in the 3.1 era.. 1) going to go look for that configuration (instructing HttpClient not to use connections idle longer than 20,000ms). 2) change the idle to check each

RE: java.lang.IllegalStateException: Connection already open

2010-05-26 Thread Oleg Kalnichevski
On Wed, 2010-05-26 at 13:51 -0400, Brooks, Kenneth S wrote: When you say 'If you want to make sure persistent connections do not get stale, you can simply instruct HttpClient to not re-use connections that have been idle longer than, say, 20,000ms' are you referring to the Connection Keep

RE: java.lang.IllegalStateException: Connection already open

2010-05-30 Thread Oleg Kalnichevski
On Wed, 2010-05-26 at 11:01 -0400, Brooks, Kenneth S wrote: Attaching 2 log snippets. First is the httpclient log with log4j.logger.org.apache.http=TRACE, F as the log4j setting. I've included the very last line of the wire trace from the previous call.. just to give some conetext. I think

RE: java.lang.IllegalStateException: Connection already open

2010-05-30 Thread Oleg Kalnichevski
On Sun, 2010-05-30 at 17:23 -0400, Brooks, Kenneth S wrote: Solaris 10 JDK should be 1.5.0_11 but I'll double check on Tuesday. Nasty. The problem seems to be platform specific. I am using Linux (Ubuntu) and am unable to reproduce it locally. Do you think you could put together a test case?

RE: turn off hostname verification

2010-06-01 Thread Oleg Kalnichevski
On Sun, 2010-05-30 at 21:46 +, Lee Breisacher wrote: Yes, I read that piece of the tutorial, but I have a bare-bones simple client: HttpClient httpclient = new DefaultHttpClient(); HttpGet httpget = new HttpGet(https://www.xyz.com/...;); HttpResponse response =

RE: java.lang.IllegalStateException: Connection already open

2010-06-02 Thread Oleg Kalnichevski
On Mon, 2010-05-31 at 22:39 -0400, Brooks, Kenneth S wrote: I would love to but its pretty unlikely that I'll be able to do it.. we see 1 or 2 of these in a 24 hour period. There are millions of calls to the server during that time but that is spread out among 16 (or more) client machines

Re: ThreadSafeClientConnManager + jdk Executor

2010-06-02 Thread Oleg Kalnichevski
On Tue, 2010-06-01 at 22:55 +0200, Jakub wrote: Hey folks, I was trying out the ThreadSafeClientConnManager example from documentation, together with java executor framework and the executor.shutdown() function. Is it ok to exit threads running httpClient.execute like this ? I'm getting

RE: java.lang.IllegalStateException: Connection already openn

2010-06-02 Thread Oleg Kalnichevski
On Wed, 2010-06-02 at 09:49 -0400, Brooks, Kenneth S wrote: Excellent. I just read the jira.. Since I'm on 4.0.x, when you say For 4.0.x the problem can be worked around by retaining the pool lock for the entire span of the #closeIdleConnection. Is that something that I can do in my

Re: SSO jsessionid and ltpa cookie

2010-06-03 Thread Oleg Kalnichevski
On Wed, 2010-06-02 at 16:19 -0400, deschamps.francoi...@hydro.qc.ca wrote: Hi, I am using HttpClient 4. I am using Httpclient from an applet. I'am trying to extract the jsessionid and ltpa cookie from the browser to pass it to my HttpClient objtect contain in my applet. Of course,

Re: robots.txt

2010-06-05 Thread Oleg Kalnichevski
On Fri, 2010-06-04 at 16:03 -0700, Josh Gordineer wrote: Was running through the mail archives looking for a plug-in solution for the robots.txt. Seems like there are some libraries that exist, what is the recommended way of plugging it into HttpClient and making sure it gets invoked for

Re: multipart/mixed and using mime part's charset in Content-Disposition

2010-06-07 Thread Oleg Kalnichevski
On Mon, 2010-06-07 at 11:52 +0530, Saisatish vedam wrote: Hi, I need to construct a multipart/mixed request with (a) Set Content-type hdr (along with charset) for individual mime part (b) Encode filename in the Content-Disposition hdr's using that charset (ex: for multibyte file names).

Re: persistent connection on GET

2010-06-08 Thread Oleg Kalnichevski
On Mon, 2010-06-07 at 22:54 +0200, SZERB, Tamas wrote: Hello, is there any way to keep alive the connection what has been established by GetMethod()? Currently, using GetMethod gm = new GetMethod(http://ide/?ez=az;) and I'd like to re-use the current connection by changing the `ez'

Re: POST without urlencode

2010-06-08 Thread Oleg Kalnichevski
On Tue, 2010-06-08 at 01:50 +0200, SZERB, Tamas wrote: Hello, Is it possible to send raw or simply turn off the Content-Type: application/x-www-form-urlencoded request header? httpclient 3.1 Yes, it is. One can generate any arbitrary request entities by implementing RequestEntity

Re: Redirect is not followed on POST

2010-06-08 Thread Oleg Kalnichevski
On Mon, 2010-06-07 at 22:29 -0700, droidin.net wrote: I'm trying to automate 2-step search request. There's no JS and no authentication the form is HTTP Post to ASP page followed by 302 GET redirect which supposed to return batch of search results. Subsequent GET requests can be issued to

Re: multipart/mixed and using mime part's charset in Content-Disposition

2010-06-08 Thread Oleg Kalnichevski
On Tue, 2010-06-08 at 11:02 +0530, Saisatish vedam wrote: On Mon, Jun 7, 2010 at 6:48 PM, Oleg Kalnichevski ol...@apache.org wrote: On Mon, 2010-06-07 at 11:52 +0530, Saisatish vedam wrote: Hi, I need to construct a multipart/mixed request with (a) Set Content-type hdr (along

Re: Understand cause and properly handle Connection reset

2010-06-09 Thread Oleg Kalnichevski
On Wed, 2010-06-09 at 13:24 +0200, Hubert, Eric wrote: Hi, having the following setup: HttpClient 3.0.1 -- HWLB -- Apache Synapse 1.2 -- AS hosting web services we encounter a couple of java.net.SocketException: Connection reset while performing a graceful restart of Apache Synapse 1.2

Re: GET request using httpclient4.0.1

2010-06-09 Thread Oleg Kalnichevski
On Wed, 2010-06-09 at 07:15 -0700, Ken Krugler wrote: Hi Udit, I believe the problem is that technically the subdomain (donotdelete_httpclient, in your case) can't have underscores. So the URI class will return null for the hostname. The same thing would happen if you had a subdomain

Re: org.apache.http.impl.cookie.BasicClientCookie not serializable???

2010-06-09 Thread Oleg Kalnichevski
On Wed, 2010-06-09 at 14:20 -0500, Misha Koshelev wrote: Dear All: I am quite confused... I am reading here and BasicClientCookie _clearly_ implements Serializable per JavaDoc: http://hc.apache.org/httpcomponents-client/httpclient/apidocs/org/apache/http/impl/cookie/BasicClientCookie.html

Re: HttpCore NIO IOReactorException

2010-06-11 Thread Oleg Kalnichevski
On Fri, 2010-06-11 at 11:33 +0100, Sam Crawford wrote: Morning, We've just put together our first HttpCore-based server and we're intermittently seeing an exception in our logs which is causing the entire server to shutdown. INFO com.acmecorp.proj.http.HttpSSLServer: Connection open:

Re: HttpCore NIO IOReactorException

2010-06-11 Thread Oleg Kalnichevski
On Fri, 2010-06-11 at 11:46 +0100, Sam Crawford wrote: I should add that we're using HttpCore 4.01. The issue sounds similar to HTTPCORE-180. We're using the following JVM: java version 1.6.0_17 Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) 64-Bit Server VM (build

Re: HttpCore NIO IOReactorException

2010-06-11 Thread Oleg Kalnichevski
) at java.lang.Thread.run(Thread.java:619) INFO com.acmecorp.proj.http.HttpSSLServer: Shutdown HTTP server I'll try the latest 4.0.x trunk build now. Thanks, Sam On 11 June 2010 12:07, Oleg Kalnichevski ol...@apache.org wrote: On Fri, 2010-06-11 at 11:46 +0100, Sam Crawford wrote: I should add

Re: how to use HttoCore 4.0.1 directly instead of httpclient 4.0.1

2010-06-15 Thread Oleg Kalnichevski
On Mon, 2010-06-14 at 23:19 -0700, Udit Bhatnagar wrote: Hi, I am using httpclient4.x in my code for GET request, as I am upgrading httpclient3.x to httpclient4.x in my project. The domain name of the requested URI contains some Invalid Character as '_', so Httpclient4.x is not lenient with

Re: websockets

2010-06-15 Thread Oleg Kalnichevski
On Mon, 2010-06-14 at 23:55 +0200, SZERB, Tamas wrote: Hello, Is there any plan to use WebSockets from httpclient? Currently no, not with the current project composition. Might be an interesting sub-project, though. Oleg

Re: intermittent issues with HC 3.1 on Windows loopback

2010-06-18 Thread Oleg Kalnichevski
On Thu, 2010-06-17 at 00:52 -0700, Paul Brown wrote: I'm seeing odd issues with HC 3.1 on Windows. The symptom is that the receiving server will intermittently report a chunking error. Background on the scenario: - JDK 1.6 u20, 32-bit Windows - HC 3.1 used by SolrJ for ingest from one

Re: HttpClient Connections

2010-06-18 Thread Oleg Kalnichevski
On Thu, 2010-06-17 at 10:47 +0200, Eric wais wrote: I have an application which needs to make requests to another application and am using HttpClient to do this. My application will have multiple users at once using the application. The application that I need to connect to is in the form of a

RE: Keep alive questions

2010-06-18 Thread Oleg Kalnichevski
On Fri, 2010-06-18 at 12:51 +0200, Joan Balaguero wrote: Hello Oleg, Thanks for your response. What I mean by removing keep alive strategy is the following. I have an administration application with the following option: [x] Keep alive http connection for [ ] seconds. If the

Re: Connection Shutdown Immediately on HttpClient 4.01

2010-06-24 Thread Oleg Kalnichevski
On Thu, 2010-06-24 at 05:42 -0700, Ken Krugler wrote: On Jun 23, 2010, at 8:24pm, ctg3 wrote: I am having an issue with HttpClient 4.01. When I try to access www.google.com or any other website I get a java.net.SocketException: Permission denied: connect. There is no firewall or other

Re: Connection Shutdown Immediately on HttpClient 4.01

2010-06-24 Thread Oleg Kalnichevski
On Thu, 2010-06-24 at 08:45 -0700, Ken Krugler wrote: Hi Oleg, On Jun 24, 2010, at 6:54am, Oleg Kalnichevski wrote: On Thu, 2010-06-24 at 05:42 -0700, Ken Krugler wrote: On Jun 23, 2010, at 8:24pm, ctg3 wrote: I am having an issue with HttpClient 4.01. When I try to access

Re: Measuring/throttling bandwidth of a request

2010-06-28 Thread Oleg Kalnichevski
On Fri, 2010-06-25 at 07:42 -0700, Pierre Paour wrote: I'm using HTTPComponents 4.1-alpha2 to upload large-ish files from a desktop to a server, and I'd like to be able to report to the end-user the bandwidth consumed by the application (and projected time to completion), as well as optionally

Re: How to initiate CRL check or OCSP check with httpclient 4.0

2010-07-02 Thread Oleg Kalnichevski
On Thu, 2010-07-01 at 23:43 +0530, arpita k wrote: Hi, I am using Httplcient 4.0 to communicate between client and the server. The client is written in Java and the server is IIS.SO, I am doing mutual authentication to establish the SSL connection between these two. I like to initiate the

Re: Cookie problem

2010-07-05 Thread Oleg Kalnichevski
On Sat, 2010-07-03 at 23:42 -0700, droidin.net wrote: I'm trying to mimic OAuth authentication using HttpClient 4. That requires 2 calls - first I do GET to obtain the form and then I do POST to get security code. GET works just fine - I get the form, no error. If I input GET URL in the

Re: How to use httpclient4.0 to connect HTTPS via socks proxy?

2010-07-05 Thread Oleg Kalnichevski
On Sun, 2010-07-04 at 11:39 -0700, Jacky-Zhu-1 wrote: I've been trying to use httpclient4.0 to connect https server via socks proxy, but it failed again and again. SOCKS is a TCP/IP level, not HTTP level protocol. SOCKS proxy support can be configured using standard JVM settings. Oleg

Re: How to use httpclient4.0 to connect HTTPS via socks proxy?

2010-07-05 Thread Oleg Kalnichevski
On Mon, 2010-07-05 at 08:56 -0700, Jacky-Zhu-1 wrote: olegk wrote: On Sun, 2010-07-04 at 11:39 -0700, Jacky-Zhu-1 wrote: I've been trying to use httpclient4.0 to connect https server via socks proxy, but it failed again and again. SOCKS is a TCP/IP level, not HTTP level

Re: How to use httpclient4.0 to connect HTTPS via socks proxy?

2010-07-07 Thread Oleg Kalnichevski
Hi Oleg, Yes, I have implemented my SocksSSLSocketFactory who has implemented the SocketFatory interface, as the code I pasted. In the debug mode, I also found this class was used by HttpClient, and the function createSocket and connectSocket of the SocksSSLSocketFactory were calle,

Re: How to use httpclient4.0 to connect HTTPS via socks proxy?

2010-07-07 Thread Oleg Kalnichevski
On Wed, 2010-07-07 at 06:40 -0700, Jacky-Zhu-1 wrote: olegk wrote: On Wed, 2010-07-07 at 05:48 -0700, Jacky-Zhu-1 wrote: olegk wrote: Hi Oleg, Yes, I have implemented my SocksSSLSocketFactory who has implemented the SocketFatory interface, as the code I pasted.

Re: httpclient performance

2010-07-18 Thread Oleg Kalnichevski
On Sun, 2010-07-18 at 02:04 -0400, Brooks, Kenneth S wrote: Oleg, We’re replacing a t3 solution with one that is similar to SpringRemoting.. Serializing POJOs over http. I’ve been able to optimize the CPU utilization and memory usage very well.. We’re running in a smaller memory

Re: http pipelining

2010-07-19 Thread Oleg Kalnichevski
On Sun, 2010-07-18 at 14:50 -0700, am am wrote: Hi, Does httpclient support http pipelining as stated in rfc2616? It does not. HTTP pipelining and 'expect:continue' handshaking are (pretty much) mutually exclusive. HttpClient support the latter. HttpClient is based on HttpCore, which is fully

Re: http pipelining

2010-07-19 Thread Oleg Kalnichevski
On Mon, 2010-07-19 at 03:26 -0700, am am wrote: So I would have to built my own client using httpcore? Is this something straithforward? I mean was there a reason it was prefered the httpclient to not support pipelining? Are there issues in servers support for pipelining or something

Re: http pipelining

2010-07-19 Thread Oleg Kalnichevski
On Mon, 2010-07-19 at 05:00 -0700, am am wrote: Oleg, thank you for your reply. Is it easy to get a specific reference/paper/example that serves as a valid argument/example to avoid implementing pipelining in the httpclient? That would be very helpful to me. Because articles e.g. about

RE: httpclient performance

2010-07-19 Thread Oleg Kalnichevski
On Mon, 2010-07-19 at 10:22 -0400, Brooks, Kenneth S wrote: ... What in the world am I missing? Is that just to be expected.. or am I doing something wrong? What further information do you need from me? A context log of the HTTP session would be most useful. [[-KenBrooks-]]

Re: 4.0.1 - 4.1

2010-07-19 Thread Oleg Kalnichevski
On Mon, 2010-07-19 at 14:27 -0400, Brooks, Kenneth S wrote: Both of these are now deprecated in 4.1 with a message of Do Not Use. ConnManagerParams.setMaxTotalConnections(...); ConnManagerParams.setMaxConnectionsPerRoute(...); Is there a suggested alternative? I was under

Re: Setting Content Type on a HTTP POST

2010-07-20 Thread Oleg Kalnichevski
On Tue, 2010-07-20 at 07:28 +0800, Mingfai wrote: On Tue, Jul 20, 2010 at 4:12 AM, Zachariah Young zpyo...@gmail.com wrote: Where should I be setting the Content Type when I'm posting and XML string? HttpPost httppost = new HttpPost(http://localhost:8080/REST;); // Make sure the server

Re: Performance

2010-07-20 Thread Oleg Kalnichevski
On Tue, 2010-07-20 at 11:20 -0400, Brooks, Kenneth S wrote: Oleg.. * Here is the wire error and context debug. o From my end I made 3 service calls, (which translates into 4 total calls because the very first call is to create a security token to be reused on subsequent

Re: How to upgrade httpclient 3.0 to httpclient 4.0?

2010-07-21 Thread Oleg Kalnichevski
On Wed, 2010-07-21 at 21:34 +0530, arpita k wrote: Hi, I am using common-httpclient 3.0 and common-ssl 0.3.11 library to establish SSL communication between client and the server.Here is the code: *AuthSSLProtocolSocketFactory myAuthFactory = null; try {

Re: 4.1 roadmap

2010-07-21 Thread Oleg Kalnichevski
On Wed, 2010-07-21 at 14:52 -0400, Brooks, Kenneth S wrote: I'm sure this was asked before but I can't seem to find it in the archives. Usually release plans are discussed on the dev list. Is there an expected release date for httpclient core 4.1? HttpCore 4.1 GA can be expected some

Re: axis 1.5.1, httpclient 3.1 and missing FINACK

2010-07-22 Thread Oleg Kalnichevski
On Thu, 2010-07-22 at 13:20 -0400, Brooks, Kenneth S wrote: Oleg, Another team in my company is using Axis2 1.5.1 (with HttpClient 3.1) as clients of a webservice. They are seeing the following: * When communicating from source - destination via http, everything works fine. o

Re: Best strategy to terminate an HttpClient (3.0.1) connection from a background thread?

2010-08-01 Thread Oleg Kalnichevski
On Thu, 2010-07-29 at 08:31 -0700, KARR, DAVID (ATTSI) wrote: If I had a background task that was monitoring certain conditions, and it had a handle to an HttpClient object, or perhaps the Method object, where the Method was still executing, what would be the cleanest way to force terminate

<    2   3   4   5   6   7   8   9   10   11   >