Re: HttpDelete and similar could exhaust your http connection pool if not handled properly

2011-01-11 Thread Oleg Kalnichevski
On Tue, 2011-01-11 at 06:11 +0100, Stevo Slavić wrote: Hello httpclient-users, Beginner httpclient user here and this is more note to self and httpclient users alike. Been hit by http connection pool getting exhausted, randomly, on production... For few days I've been BMHATW, suspected even

Re: Need help with ProxySelectorRoutePlanner

2011-01-13 Thread Oleg Kalnichevski
On Wed, 2011-01-12 at 14:07 -0500, David Motes wrote: After spending too much time on ProxySelectorRoutePlanner, here is what I have discovered. Note this is for a Java application not an applet. If you do not use System.setProperty(java.net.useSystemProxies, true); in your program Java

Re: Httpclient duplicate cookies issue

2011-01-13 Thread Oleg Kalnichevski
On Thu, 2011-01-13 at 05:34 -0800, motital74 wrote: I am connecting to a web site which send in the response the same cookies twice. The first one with value and second one empty. The httpclient take the last one (with the empty value) to the cookie store and dismiss the one with the value.

Re: Need help with ProxySelectorRoutePlanner

2011-01-14 Thread Oleg Kalnichevski
On Thu, 2011-01-13 at 16:57 -0500, David Motes wrote: I probably was not clear about the ProxySelectorRoutePlanner, I took that code out. With ProxySelectorRoutePlanner and System.setProperty(java.net.useSystemProxies, true) the routing code looks right based on the trace: 2011/01/11

Re: Multiple post with Httpclient 4.0.3 hanging randomly

2011-01-17 Thread Oleg Kalnichevski
On Fri, 2011-01-14 at 10:24 -0800, sherkal wrote: Hello friends, let me explain the situation. I have a servlet redirecting outgoing GET/POST to another project on another domain (some kind of proxy) whose job is to handle it and return some stuff (params and a gif). Im using HttpClient

[ANNOUNCEMENT] HttpComponents HttpAsyncClient 4.0-alpha1 Released

2011-01-18 Thread Oleg Kalnichevski
This is the first public release of Apache HttpAsyncClient. HttpAsyncClient is a library for asynchronous client-side HTTP communication built on top of HttpCore NIO and HttpClient components. HttpAsyncClient is NOT meant to replace or supersede Apache HttpClient. It is a complementary library to

Re: Changing connection manager params

2011-01-18 Thread Oleg Kalnichevski
On Tue, 2011-01-18 at 21:23 +0100, Stevo Slavić wrote: Hello httpclient users, Can someone please just validate if following is true or not. It seems to me that it was possible in 3.x to change connection manager parameters even after it's construction. It doesn't seem possible now in

Re: Threads hang in ThreadSafeClientConnManager.getConnection:216

2011-01-19 Thread Oleg Kalnichevski
On Wed, 2011-01-19 at 02:32 -0800, olze wrote: I wrote a multithreaded Tool which creates some DefaultHttpClient instances and HttpGets which then download a site (like a crawler). My Problem is that, after a couple of minutes (~20) the application goes slower and slower. In the beginning 10

Re: new HttpPost(post_url); fails inside an web applet

2011-01-20 Thread Oleg Kalnichevski
On Thu, 2011-01-20 at 14:54 +, Giuseppe De Marco wrote: who can tell me why if I use HttpPost and HttpGet inside a webapplet theese works only if the post/get_url is different from the server that has given me the applet? If in a java webapplet I launch a procedure to connect to site

Re: TLS close handshake

2011-01-21 Thread Oleg Kalnichevski
On Fri, 2011-01-21 at 14:17 +, Matthew Churcher wrote: Hi All, HttpClient appears to be closing https connections without completing the TLS close handshake. This is reported by our server but also the JCCE debugging on the client. I'm using 4.1-beta1, does this occur in other peoples

[ANNOUNCEMENT] HttpComponents HttpClient 4.1 (GA) release

2011-01-24 Thread Oleg Kalnichevski
The HttpComponents project is pleased to announce 4.1 (GA) release of Apache HttpClient. HttpClient 4.1 builds upon the stable foundation laid by HttpClient 4.0 and adds several functional improvements and popular features: * Response caching conditionally compliant with HTTP/1.1 specification

RE: Problem with Proxy Basic Authentication

2011-01-25 Thread Oleg Kalnichevski
On Mon, 2011-01-24 at 21:50 -0200, Rodrigo B. Campacci wrote: Hi, I'm trying to make a GET request through a HTTP proxy (squid) with basic authentication (user and password). I found a sample of how to do that using version 3.0, but for version 4.x I can't found this. Please post a

Re: Resolving bad formatted hrefs.

2011-01-26 Thread Oleg Kalnichevski
On Wed, 2011-01-26 at 16:02 +0100, Karl Wettin wrote: Hi gang, I've implemented a piece of code that resolved bad formatted URIs (as in hrefs, etc) and what not similar to the way browsers does it. It doesn't really belong in hc but it's the best project fit I can find and since I find

Re: RE How to prevent retry on time out while waiting for response

2011-01-26 Thread Oleg Kalnichevski
On Wed, 2011-01-26 at 11:14 -0500, laurent.duper...@videotron.com wrote: Let me just add that I tried a much shorter timeout (20 seconds) and that makes the process fail much more rapidly. I'm also investigating whether the fact that the httpclient call is executed within a thread has any

Re: Resolving bad formatted hrefs.

2011-01-27 Thread Oleg Kalnichevski
On Wed, 2011-01-26 at 19:31 +0100, Karl Wettin wrote: On Jan 26, 2011, at 5:25 PM, Oleg Kalnichevski wrote: On Wed, 2011-01-26 at 16:02 +0100, Karl Wettin wrote: I've implemented a piece of code that resolved bad formatted URIs (as in hrefs, etc) and what not similar to the way browsers

Re: set encodings for http post in httpclient v4.1

2011-01-27 Thread Oleg Kalnichevski
On Thu, 2011-01-27 at 01:03 +0100, Yanchuan Li wrote: Hello, I've been using httpclient v4.1 in my application. But so far I've searched for the whole week and couldn't find how to set encoding to UTF8 for all my post requests. I mean, we have got really a few documents there. Following is

RE: Problem with Proxy Basic Authentication

2011-01-27 Thread Oleg Kalnichevski
On Thu, 2011-01-27 at 01:28 -0200, Rodrigo B. Campacci wrote: Hi Oleg! ... And I don't get anything printed in console. But jUnit in eclipse captured an exception stacktrace: (sorry to don´t mention that before, I´m a little bit new at jUnit in Eclipse) java.lang.NoClassDefFoundError:

Re: multi-user/settings with httpclient

2011-01-28 Thread Oleg Kalnichevski
On Fri, 2011-01-28 at 00:05 +0100, khiem nguyen wrote: hi, i want to use http-client to implement a kind of proxy-server, since it'll be used by several users each user can have different settings (cookie-handling, headers-handling...), is there a better way than to give each user 1 or more

Re: multi-user/settings with httpclient

2011-01-28 Thread Oleg Kalnichevski
On Fri, 2011-01-28 at 14:43 +0100, khiem nguyen wrote: what about Interceptors (request response) ? from my understanding, these are properties of HttpClient. No, they are not. Protocol interceptors are strategies that implement a particular aspect of the HTTP protocol. They are meant to be

RE: Problem with Proxy Basic Authentication

2011-02-01 Thread Oleg Kalnichevski
On Mon, 2011-01-31 at 07:17 -0800, Pifagor wrote: Oleg Your advice needed: When I import browser proxy settings into HttpClient in applet using: DefaultHttpClient hc = new DefaultHttpClient(); ProxySelectorRoutePlanner routePlanner = new ProxySelectorRoutePlanner(

RE: Problem with Proxy Basic Authentication

2011-02-01 Thread Oleg Kalnichevski
On Tue, 2011-02-01 at 05:19 -0800, Pifagor wrote: olegk wrote: it turns out that the ProxySelectorRoutePlanner did not pick up proxy settings correctly. Oleg It correctly picks host and port but not username and password. Also JRE does not provide http.proxyUser or

Re: HTTP request using another method such as PATCH

2011-02-01 Thread Oleg Kalnichevski
On Tue, 2011-02-01 at 15:30 +0100, Grzegorz Szpetkowski wrote: Hi, According to HttpClient Tutorial (1.1.1. HTTP request) there is support for methods: GET, HEAD, POST, PUT, DELETE, TRACE and OPTIONS. How I can make request using PATCH (RFC 5789) method or CONNECT ? You ought not execute

Re: Forcing a chunk boundary

2011-02-02 Thread Oleg Kalnichevski
On Wed, 2011-02-02 at 12:16 -0500, John Kiffmeyer wrote: Hi all, I'm working with an application that requires requests to be chunked a certain way. More or less, the body contains an application request and some data associated with it. If chunked normally, the first chunk contains the

Re: Upgrade from Commons HttpClient to HttpClient 4.1

2011-02-06 Thread Oleg Kalnichevski
On Fri, 2011-02-04 at 11:30 +, Ewan Slater wrote: Hi, I have downloaded (and wish to run) a piece of example code for accessing an application that was written for Commons HttpClient. I have downloaded HttpClient 4.1 as this is recommended and I would like to upgrade the example code

Re: Streaming content header-parsing

2011-02-07 Thread Oleg Kalnichevski
On Mon, 2011-02-07 at 10:28 +0100, khiem nguyen wrote: Hi, i'm trying to use httpclient 4.1 to get some stream-content from this site http://oe1.orf.at/konsole/?show=live this doesnt work, log message: DefaultResponseParser [DEBUG] Garbage in response: from browser, debug with firebug

Re: Upgrade from Commons HttpClient to HttpClient 4.1

2011-02-07 Thread Oleg Kalnichevski
On Mon, 2011-02-07 at 10:01 +, ewan.sla...@googlemail.com wrote: Hi Guys, Thanks for the suggestions. It seems that upgrade in this case uses what one of my friends (who works in product management for a software vendor) describes as a bumpy upgrade path with limited appeal to the

Re: Streaming content header-parsing

2011-02-07 Thread Oleg Kalnichevski
On Mon, 2011-02-07 at 13:58 +0100, khiem nguyen wrote: here's logging-console: ... DEBUG [org.apache.http.wire] ICY 200 OK[\r][\n] DEBUG [org.apache.http.impl.conn.DefaultResponseParser] Garbage in response: ICY 200 OK 'ICY 200 OK' is not a valid HTTP status line. Oleg

Re: HC 4.1

2011-02-09 Thread Oleg Kalnichevski
On Wed, 2011-02-09 at 14:40 +0100, Joan Balaguero wrote: Hello Oleg, I’m using HttpClient4.0.3. In terms of performance, is there any gain using HttpClient 4.1. vs 4.0.3? Thanks, Joan. Joan HttpCore 4.1 used by HttpClient 4.1 should be approximately 5% faster than HttpCore

Re: Header and Content parsing and saving as html page

2011-02-11 Thread Oleg Kalnichevski
On Fri, 2011-02-11 at 00:39 -0800, CodingForever wrote: Thanks olegk for the answer,Now I am looking that. But I will ask something I wrote the code that below. How can I get the decoded content using header parameters ? String s = HTTP/1.1 200 OK\r\n + Server: whatever\r\n + Date:

Re: Unvalid httpcore-nio-4.0-beta1.jar

2011-02-11 Thread Oleg Kalnichevski
On Fri, 2011-02-11 at 10:15 +0100, Håkon Sagehaug wrote: Hi, I've got http-core 4.1 as a dependency in a maven project. So when I compile the project I get error that the httpcore-nio-4.0-beta1.jar is invalid. The jar file is a http page with 301 Moved Permanently. Do you know how I can

Re: SO_LINGER option

2011-02-11 Thread Oleg Kalnichevski
On Fri, 2011-02-11 at 11:48 +0100, Kennke, Roman wrote: Hello, I see it is possible to set the SO_LINGER option by calling HttpConnectionParams.setLinger(params, so_linger); However, from looking at the docs and specification I find that it is not possible to enable SO_LINGER and

Re: java.io.IOException: Request already aborted - Why ThreadSafeClientConnManager does not renew connection?

2011-02-15 Thread Oleg Kalnichevski
On Tue, 2011-02-15 at 11:38 +0200, Maxim Veksler wrote: Hello everyone, I'm doing a small stress run from my Workstation to my Laptop. The code is attached below. This code emulates a situation where the connection pool runs out of connections. I'm seeking to catch this situation and act

Re: java.io.IOException: Request already aborted - Why ThreadSafeClientConnManager does not renew connection?

2011-02-15 Thread Oleg Kalnichevski
Thanks for your response. The test runs for ~25seconds and only then starts to fail. Once it fails I eclipse trace it, by going step by step over the code and the failure reproduces on each attempt. Should the ThreadSafeClientConnManager attempt the reconnect or do I need to do manual

Re: java.io.IOException: Request already aborted - Why ThreadSafeClientConnManager does not renew connection?

2011-02-15 Thread Oleg Kalnichevski
On Tue, 2011-02-15 at 14:53 +0200, Maxim Veksler wrote: On Tue, Feb 15, 2011 at 2:44 PM, Ryan Smith ryan.justin.sm...@gmail.com wrote: ms = 0.2 seconds. If youre making calls over the internet, you might want to try a timeout of 15000ms (15 seconds). I sometimes set it to 6ms b/c the

Re: Gzip problem ?

2011-02-15 Thread Oleg Kalnichevski
On Tue, 2011-02-15 at 07:38 -0800, CodingForever wrote: Hi, there I am using a piece of code(thanks to oleg) for decoding html data. (chunked or gzipped vs. ) when I try to decode the gzipped data it does not work. That gives me gzipped data. - I looked the header it contains

Re: Non-blocking file upload

2011-02-16 Thread Oleg Kalnichevski
On Wed, 2011-02-16 at 11:05 +, Frazer Irving wrote: Hi, ... It seems that the call to executeMethod is blocking until the entire body of the RequestEntity has been written to the server before processing the response. Yes, this is indeed the case due to the limitations of the

Re: java.io.IOException: Request already aborted - Why ThreadSafeClientConnManager does not renew connection?

2011-02-16 Thread Oleg Kalnichevski
On Wed, 2011-02-16 at 14:47 +0200, Maxim Veksler wrote: ... I've implemented the suggested changes. Please find them at the revision https://gist.github.com/829061/8a173df84ce47b288f6b34f675fc708fcf649535 This has improved the execution, now calling httpGet.abort(); does not affect the

Re: java.io.IOException: Request already aborted - Why ThreadSafeClientConnManager does not renew connection?

2011-02-16 Thread Oleg Kalnichevski
On Wed, 2011-02-16 at 16:31 +0200, Maxim Veksler wrote: On Wed, Feb 16, 2011 at 3:14 PM, Oleg Kalnichevski ol...@apache.org wrote: Once aborted a request cannot be executed again. Create a new HttpGet instance for each request execution. They are cheap. The problem is that HttpClient

Re: Webstart problems with SSL and the DEFAULT SSLSocketFactory

2011-02-17 Thread Oleg Kalnichevski
A. On Thu, 2011-02-17 at 14:48 -0500, Mark Claassen wrote: I have been using HttpClient for a while now with success. However, I have recently encountering some problems which I think have an easy solution, although it is not accessible to me through the current API. Situation (my

Re: HttpCore - getting POST parameters

2011-02-19 Thread Oleg Kalnichevski
On Fri, 2011-02-18 at 22:46 +0200, Mario Pavlov wrote: Hi, I'm trying to create a simple HTTP server with HttpCore 4.1 but I can't figure out how to get parameters from HTTP POST requests. For instance I want to handle the POST request generated by this HTML code: form action=/login

Re: Http Server with error Connection Reset

2011-02-19 Thread Oleg Kalnichevski
On Sat, 2011-02-19 at 12:59 +0800, LongkerDandy wrote: Hi I'm using latest version of HTTP Core. And I'm following the sample Basic HTTP Server ( http://hc.apache.org/httpcomponents-core-ga/examples.html). But I keep getting the error: Connection Reset. Every time I finished handle the

Re: Proxy-Authorization header received on server side

2011-02-24 Thread Oleg Kalnichevski
On Thu, 2011-02-24 at 10:15 +0100, Onofer Dusan wrote: Hi, I'm following example http://hc.apache.org/httpcomponents-client-ga/examples.html Proxy authentication but it seems that not only proxy is receiving credentials for proxy. In log, which is generated at target.host I can see

Re: Slowness of 4.1

2011-03-03 Thread Oleg Kalnichevski
On Thu, 2011-03-03 at 01:38 -0800, Tony Anecito wrote: Hi All, I downloaded httpclient 4.1 and noticed it is significantly slower than 3.1. I even used the threadsafe connection manager hoping for better performance. I used to get below 3msec and now it is above 150msec. Is keepalive

Re: Slowness of 4.1

2011-03-03 Thread Oleg Kalnichevski
it to what I have unless you have a link to it. Thanks, -Tony - Original Message From: Oleg Kalnichevski ol...@apache.org To: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Thu, March 3, 2011 2:46:03 AM Subject: Re: Slowness of 4.1 On Thu, 2011-03-03

Re: How to handle Range header in Http Core

2011-03-05 Thread Oleg Kalnichevski
On Fri, 2011-03-04 at 15:42 +0800, LongkerDandy wrote: Hi I'm developing a UPnP/DLNA media server, and using Http Core for file transfer. Client may ask for part of the file, using IF Range and Range Http headers. Is there a easy way to deal with that? LongkerDandy HttpCore does not

Re: How to determine the authentication method used by HttpClient?

2011-03-07 Thread Oleg Kalnichevski
On Sun, 2011-03-06 at 06:49 -0800, Utopius wrote: I'm using HttpClient for basic and NTLM authentication. Therefore I configure a HttpClient with both types of credentials and based on the authentication challenge from the server it chooses the correct one. Now, after the authentication, I

Re: httpclient configuration over ssl-truststores question

2011-03-08 Thread Oleg Kalnichevski
On Mon, 2011-03-07 at 09:02 -0800, am am wrote: I have a question relating httpclient and ssl connections. I have no problem connecting to tomcat for server authentication using apache httpclient (tomcat is sending back a self-signed certificate i.e. not trusted by java by default).

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

2011-03-08 Thread Oleg Kalnichevski
On Mon, 2011-03-07 at 15:24 -0800, Travis T wrote: I have a server with a self signed certificate. I've created a java key store (trustStore) which includes that server in the trust store. I have a keystore which includes my certificate and private key. My certificate was signed by the

Re: 400 Bad request is returned (Target Authentication)

2011-03-09 Thread Oleg Kalnichevski
On Wed, 2011-03-09 at 17:09 +0530, manasa k wrote: Hi all, I am trying to connect a URL * http://renderv3.mappoint.net/render-30/RenderService.asmx *which needs WWW-Authenticate(uses Digest Authentication). Also this should go via a Proxy(uses Basic Authentication). Following is my code

Re: HttpPost is being retried

2011-03-09 Thread Oleg Kalnichevski
On Wed, 2011-03-09 at 15:14 +0100, Martin Ždila wrote: On Wed, Mar 9, 2011 at 3:02 PM, Razvan Mihailescu razvan.mihaile...@computaris.com wrote: You may need to implement your own HttpRequestRetryHandler, as the one provided by default by http-client does a number of retries by default -

Re: Retrieve HTML code after POST request

2011-03-09 Thread Oleg Kalnichevski
On Wed, 2011-03-09 at 07:21 -0800, Desholo wrote: Hello everyone! I'm new with HttpClient package so my question could be found silly, but I searched a solution for some time with no answer. I've to do an application that performs a POST request in a certain host, then navigates some pages,

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

2011-03-09 Thread Oleg Kalnichevski
On Wed, 2011-03-09 at 10:16 -0800, Travis T wrote: olegk wrote: Travis, It looks like the remote server once of a sudden drops the connection in the middle of the SSL handshake on the unsuspecting client. Looks very bizarre. I reviewed code of both versions and I found out

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

2011-03-10 Thread Oleg Kalnichevski
On Wed, 2011-03-09 at 14:05 -0800, Travis T wrote: olegk wrote: On Wed, 2011-03-09 at 10:16 -0800, Travis T wrote: 4.1.1 can be expected next week. Oleg Excellent. Thank you! I will look for that and try it when it becomes available. Ideally you should test the

Re: Retrieve HTML code after POST request

2011-03-10 Thread Oleg Kalnichevski
On Wed, 2011-03-09 at 15:22 -0800, Desholo wrote: ... Thanks for help Oleg! I would like to understand how HttpClient works, so I created locally a simple login form with php, without any cookie or session variable. I'm unable to understand if the code above works! This is what I get from

Re: AuthCache not caching?

2011-03-10 Thread Oleg Kalnichevski
On Wed, 2011-03-09 at 21:43 -0800, Eric Jain wrote: According to section 4.7 in http://hc.apache.org/httpcomponents-client-ga/tutorial/html/authentication.html, HttpClient automatically caches information about hosts it has successfully authenticated with. Can someone confirm that this

Re: 400 Bad request is returned (Target Authentication)

2011-03-10 Thread Oleg Kalnichevski
On Thu, 2011-03-10 at 15:02 +0530, manasa k wrote: As mentioned, I have attached 2 log files. * logs_withoutProxy.txt - Here connection is establised directly and gives the required result. * logstosend_withProxy.txt - Here connection is established via proxy,

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

2011-03-10 Thread Oleg Kalnichevski
On Thu, 2011-03-10 at 07:56 -0800, Travis T wrote: olegk wrote: Ideally you should test the fix _before_ it gets officially released. The fix is now available in both trunk and 4.1.x branch. Oleg Sure. Is there a nightly build that you can point me to just to be sure I

Re: HttpClient 3.1 safe as replacement for 3.0.1?

2011-03-10 Thread Oleg Kalnichevski
On Thu, 2011-03-10 at 09:37 -0800, Ken Krugler wrote: Hi all, Hadoop 0.20.2 still depends on HttpClient 3.0.1 - I know, seems like something to be fixed. A project I'm working with is using HttpClient 3.1 as well as Hadoop, which means I have to use HttpClient 3.1 as well. So - any

Re: AuthCache not caching?

2011-03-10 Thread Oleg Kalnichevski
On Thu, 2011-03-10 at 10:58 -0800, Eric Jain wrote: On Thu, Mar 10, 2011 at 02:32, Oleg Kalnichevski ol...@apache.org wrote: I just recently re-tested that particular bit of code and it worked for me (at least with BASIC auth). You may want to generate a wire / context log of the session

Re: AuthCache not caching?

2011-03-10 Thread Oleg Kalnichevski
On Thu, 2011-03-10 at 14:24 -0800, Eric Jain wrote: On Thu, Mar 10, 2011 at 12:45, Oleg Kalnichevski ol...@apache.org wrote: This might be due to this bug https://issues.apache.org/jira/browse/HTTPCLIENT-1056 Can you try the latest snapshot off the trunk or 4.1.x branch? Where can I

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

2011-03-10 Thread Oleg Kalnichevski
On Thu, 2011-03-10 at 16:05 -0800, Travis T wrote: ... Ok, I download that branch and built it (had troubles with a memcache dependency so commented out the httpcache project). I manually put that jar ahead of my maven dependencies in my project classpath and the issue I originally

Re: 400 Bad request is returned (Target Authentication)

2011-03-11 Thread Oleg Kalnichevski
manasa k maanu1...@gmail.com wrote: Thanks for your response. I do not have access to the proxy server. But when I tried with another HTTPClient from Innovation.ch, this works. So I doubt if there will be any trouble caused due to the proxy server. I have attached the sequence of

Re: Download of HttpClient 4.1 with dependencies seems not to be available

2011-03-11 Thread Oleg Kalnichevski
On Fri, 2011-03-11 at 13:43 +0100, Lars Vogel wrote: Hi, I'm trying to download HttpClient 4.1 with dependencies but I receive an 404. I tried lots of mirrors and also the backup mirrors. For example:

Re: AuthPNames.TARGET_AUTH_PREF and AuthPNames.PROXY_AUTH_PREF

2011-03-11 Thread Oleg Kalnichevski
On Fri, 2011-03-11 at 17:47 +, Ron Jacobs wrote: I have ported from 3.0.2 and in the old code I had: client.getParams().setParameter(AuthPolicy.AUTH_SCHEME_PRIORITY, policyList); To get the most similar behavior with the 4.1 API, do I set AuthPNames.TARGET_AUTH_PREF,

Re: NTLM authentication with a UPN instead of domain and user name

2011-03-11 Thread Oleg Kalnichevski
On Fri, 2011-03-11 at 17:47 +, Ron Jacobs wrote: I am using NTLM authentication and I find that when porting from 3.0.2 to 4.1, I have several questions: 1) Authenticating with domain and user works but with a UPN (like user@domain.local) authentication fails although both

Re: SSLcontext setting question

2011-03-14 Thread Oleg Kalnichevski
On Sun, 2011-03-13 at 15:21 -0700, Mark Aronszajn wrote: I'm using HttpClient 3.1. It appears that the use of an instance of AuthSSLProtocolSocketFactory in our code (when setting a Host for an HttpClient instance) results in a choice of SSLcontext that does not use a handshake compatible

Re: HttpClient 4.1 authenitcation not working

2011-03-14 Thread Oleg Kalnichevski
On Sun, 2011-03-13 at 20:55 -0700, Anirudh Visweswar wrote: Hi, I tired to upload an xml file using HttpClient 4.0 to an ftp server by supplying credentials and it was working fine,but when i tried uploading the same using HttpClient 4.1 version, I get the following response , If we

RE: SSLcontext setting question

2011-03-14 Thread Oleg Kalnichevski
http://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.1.x/httpclient/src/main/java/org/apache/http/conn/ssl/SSLSocketFactory.java Oleg -Original Message- From: Oleg Kalnichevski [mailto:ol...@apache.org] Sent: Monday, March 14, 2011 2:43 AM To: HttpClient User

[ANNOUNCEMENT] HttpComponents HttpClient 4.1.1 (GA) release

2011-03-21 Thread Oleg Kalnichevski
The HttpComponents project is pleased to announce 4.1.1 (GA) release of Apache HttpClient. This is a bug fix release that addresses a number of issues reported since release 4.1, including one critical security issue. For details please see the release notes. All users of HttpClient 4.0.x and

Re: logging httpclient.wire.content and SSL

2011-03-22 Thread Oleg Kalnichevski
On Mon, 2011-03-21 at 14:01 -0700, Monica_G wrote: Hi, Is there a way to suppress logging of httpclient.wire.content for SSL connections? The data being sent is sensitive information and I do not want it to show up in log files. I realize I can configure my log4j.properties file to

Re: HTTP Put setChunking(false) yet still sends chunked data

2011-03-22 Thread Oleg Kalnichevski
On Mon, 2011-03-21 at 18:34 -0500, hanasaki wrote: Using http client 4.1 with an http put and a route through a squid proxy to a basic-authentication http server. Not proxy auth in this case. The file upload is going through chunked dispite setting chunking off. I used the below example

Re: HttpCore ICAP server

2011-03-22 Thread Oleg Kalnichevski
On Tue, 2011-03-22 at 09:53 +, Sam Crawford wrote: Morning, I'm interested in developing an ICAP server for the purposes of content filtering and rewriting. As per the RFC (http://www.faqs.org/rfcs/rfc3507.html), ICAP uses an almost identical request/response protocol to HTTP. The only

Re: Problem getting NTLM to work with jespa

2011-03-23 Thread Oleg Kalnichevski
On Wed, 2011-03-23 at 08:18 -0400, Norris Shelton, Jr wrote: Can anyone help with this? Jespa is a commercial product. Try their official customer support channels. Oleg On Mon, Mar 21, 2011 at 10:06 AM, Norris Shelton, Jr norris.shel...@gmail.com wrote: I am using httpclient 4.1

Re: ResponseContentEncoding alternative for request

2011-03-23 Thread Oleg Kalnichevski
On Wed, 2011-03-23 at 05:34 -0700, CodingForever wrote: Hi, I am using ResponseContentEncoding class for content encoding. Is there any alternative class that does the same thing. I found the RequestContent , can i use that for the same thing ? what exactly do you mean by the same thing?

Re: ResponseContentEncoding alternative for request

2011-03-23 Thread Oleg Kalnichevski
On Wed, 2011-03-23 at 08:25 -0700, CodingForever wrote: I mean that, ResponseContentEncoding decompresses(gzip, deflate, identity) data using suitable decompression method. So for requests that has content body which class can be used ? Do you want a server side request interceptor or

Re: HttpClient Cookie2

2011-03-26 Thread Oleg Kalnichevski
On Sat, 2011-03-26 at 16:30 +0200, aljesco wrote: Hello, Is there any way to get rid of Cookie2: $Version=1 parameter in request executing? e.g., when I'm running next code, CookieStore cookieStore = new BasicCookieStore(); HttpContext localContext = new BasicHttpContext();

Re: ContentEncodingHttpClient throws IOException when reading chunked gzip response

2011-03-28 Thread Oleg Kalnichevski
On Mon, 2011-03-28 at 11:04 -0700, Adam Hahn wrote: Hi all, First of all, I enjoy the library a lot. I have been noticing some strange behavior with a chunked gzip response, though, and wanted to run it by some users before crying bug. First, the offending code snippet: String url

Re: ContentEncodingHttpClient throws IOException when reading chunked gzip response

2011-03-29 Thread Oleg Kalnichevski
... DEBUG| Connection can be kept alive indefinitely |DefaultRequestDirector.java:477|org.apache.http.impl.client.ContentEncodingHttpClient|main| DEBUG| Releasing connection

RE: Stale Connection Check

2011-03-29 Thread Oleg Kalnichevski
On Tue, 2011-03-29 at 13:30 -0500, Vadheraju, Rajeshwar wrote: Oleg, Could you please respond to my questions? Rajeshwar This may sound harsh to you, but I no longer have any bandwidth nor motivation for dealing with HC 3.1 related stuff. HC 3.1 is officially end of life and is no longer

Re: ContentEncodingHttpClient throws IOException when reading chunked gzip response

2011-03-29 Thread Oleg Kalnichevski
On Tue, 2011-03-29 at 13:23 -0700, Adam Hahn wrote: Thanks, Oleg. Interestingly, when I use the following code snippet, it works without throwing an exception: String url =

Re: Establishing a session with REST API using httpclient 4.1

2011-03-30 Thread Oleg Kalnichevski
On Wed, 2011-03-30 at 02:06 +, Richard Jose wrote: Hello everyone, Below is a simple code I am trying to run to consume a REST service with Apache's httpclient 4.1. I was of the opinion authscope would take care of the sessions but I was obviously wrong HTTP authentication and

RE: Stale Connection Check

2011-03-30 Thread Oleg Kalnichevski
On Tue, 2011-03-29 at 23:11 -0500, Vadheraju, Rajeshwar wrote: Oleg, Thanks for your response. We can't upgrade to 4.1 in a day or two as the mentioned errors are occurring in Production environment. We will consider moving to 4.x in near future(may be in the next release), thanks for your

Re: Bytes Missing from HTTP Response

2011-04-01 Thread Oleg Kalnichevski
On Fri, 2011-04-01 at 09:06 -0400, Chad La Joie wrote: I'm experiencing an odd problem with HttpClient 4.1.1. I perform a GET on a document and then use the following code to get the bytes of the response entity (assuming a 200 status code): byte[] responseEntity =

Re: ContentEncodingHttpClient throws NoHttpResponseException

2011-04-02 Thread Oleg Kalnichevski
On Fri, 2011-04-01 at 08:51 -0700, Pololang wrote: Hi all :-), I'm using HttpClient 4.1.1 with HttpCore 4.1, for a HTTPS request with client certificate stored inside a Java Keystore. The application runs with JBoss 5 and Spring 3. It works on my developpement computer (Windows), but not on

Re: Bytes Missing from HTTP Response

2011-04-02 Thread Oleg Kalnichevski
On Fri, 2011-04-01 at 18:14 -0400, Chad La Joie wrote: Here you go: http://shibboleth.net/dumps.tgz I found a much smaller document than the one I was initially testing with. It's off by one byte. On 4/1/11 9:38 AM, Oleg Kalnichevski wrote: On Fri, 2011-04-01 at 09:06 -0400, Chad La

Re: Bytes Missing from HTTP Response

2011-04-02 Thread Oleg Kalnichevski
On Sat, 2011-04-02 at 06:10 -0400, Chad La Joie wrote: Okay, that makes sense. To test this, is there a way I can force the content type on the client side, prior to requesting the response entity, via the response object? You can try adding Accept and / or Accept-Charset header to the

Re: Bytes Missing from HTTP Response

2011-04-04 Thread Oleg Kalnichevski
/EntityUtils.html#81 Oleg On 4/2/11 6:29 AM, Oleg Kalnichevski wrote: On Sat, 2011-04-02 at 06:10 -0400, Chad La Joie wrote: Okay, that makes sense. To test this, is there a way I can force the content type on the client side, prior to requesting the response entity, via the response object

Re: Bytes Missing from HTTP Response

2011-04-04 Thread Oleg Kalnichevski
? That is one possibility. Besides, I suspect that your application also needs to convert the response content to a stream of characters in order to be able to parse the XML message. This is another possibility for things to go screwy. Hope this helps Oleg On 4/4/11 8:08 AM, Oleg Kalnichevski wrote

Re: Connection Pool Event Listeners

2011-04-05 Thread Oleg Kalnichevski
On Mon, 2011-04-04 at 16:35 -0500, Neil Chaudhuri wrote: I am using ThreadSafeClientConnManager to manage a pool of connections to serve multiple threads, but some of the requests and responses have cookies set. Obviously, I would like to return the connections to the pool in the same

RE: Connection Pool Event Listeners

2011-04-05 Thread Oleg Kalnichevski
Neil Chaudhuri nchaudh...@potomacfusion.com wrote: Unfortunately, we are finding that connections that are reused from the pool contain cookie values that remain from prior connections. That is why I was curious if there was some particular approach recommended for making sure cookies don't

Re: How To Use RedirectHandler

2011-04-12 Thread Oleg Kalnichevski
On Mon, 2011-04-11 at 12:57 -0700, Andrew n marshall wrote: I need to get the intermediate headers during a redirect, but I can't figure out how to use RedirectHandler interface. What method takes in its implementation? Andrew Andrew, Please see

Re: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated

2011-04-18 Thread Oleg Kalnichevski
On Mon, 2011-04-18 at 11:24 +0100, sebb wrote: On 15 April 2011 17:08, Sunil Linga sunil.k.li...@gmail.com wrote: Hello All, I am getting below exception while connecting to an URL over SSL using httpclient 3 from our application running on WAS 6 and j2sdk 1.4. [4/15/11 11:16:15:103

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

2011-04-18 Thread Oleg Kalnichevski
On Mon, 2011-04-18 at 14:09 -0400, Langston, Jim wrote: Digging at this deeper, the problem is stemming from the client, which is a website that will bring up a popup, looking for a response. Normally, you would answer the popup and move on, but in this case, everything is being done

Re: help with EofSensorInputStream..

2011-04-20 Thread Oleg Kalnichevski
On Wed, 2011-04-20 at 06:00 -0700, Donald Fernandes wrote: I have recently moved from Httpclient 3.1 to HttpClient 4.2, mainly to resolve the inputstream autoclose problem. I need help in creating the EofSensorInputStream.. I have a http connection pool amanager using

Re: help with EofSensorInputStream..

2011-04-20 Thread Oleg Kalnichevski
On Wed, 2011-04-20 at 06:32 -0700, Donald Fernandes wrote: Hi Oleg, I want the stream to be open since i passing the response i receive to another method, which parses the stream to do additional workhence i want it to be open. Later we are explcitly closing the stream... Here is my

Re: help with EofSensorInputStream..

2011-04-20 Thread Oleg Kalnichevski
On Wed, 2011-04-20 at 09:32 -0700, Donald Fernandes wrote: Hi oleg, Let me explain the problem first. when using httpClient 3.1 we were using the getResponseBody api, which was resulting in huge jvm consumption for large data files and at time throwing out OutOfMemory exceptions. A bit

Re: NTLM v2 support?

2011-04-21 Thread Oleg Kalnichevski
On Thu, 2011-04-21 at 04:24 +0530, Susam Pal wrote: ... I don't know whether commons-httpclient-3.1.jar supported NTLM v2. This is the JAR the authentication code depends on. I have copied this email to httpclient-users in case anyone from httpclient-users can tell us whether NTLM v2 was

Re: Full NTLMv2 Support Achieved Easily (Was: NTLM authentication with a UPN instead of domain and user name)

2011-04-21 Thread Oleg Kalnichevski
On Thu, 2011-04-21 at 17:12 +, Ron Jacobs wrote: (I apologize for the delay in posting this update. It was delayed due to matters outside of my control. Nonetheless, I am sure that anyone struggling to gain NTLMv2 support with version 4.1.x will be helped by taking a look at the

RE: Full NTLMv2 Support Achieved Easily (Was: NTLM authentication with a UPN instead of domain and user name)

2011-04-22 Thread Oleg Kalnichevski
On Thu, 2011-04-21 at 21:07 +, Ron Jacobs wrote: I must say that I hadn't wanted to say anything negative about that code in my original post(s), but now that you've asked: The code now in your 4.1 distribution appears to be minimally (if at all) unchanged from some code that I came

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

2011-04-22 Thread Oleg Kalnichevski
On Fri, 2011-04-22 at 08:51 +0800, 陈朝 wrote: Hi there: Why AuthSSLProtocolSocketFactory no longer in HttpClient 4.1 ? What shold do to perform SSL auth? 2011-04-21 Zhao Chen AuthSSLProtocolSocketFactory functionality has been incorporated into the standard SSLSocketFactory

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