Re: Need Help with ProxyClient (httpClient 4.2.1)

2012-08-20 Thread kim young ill
to internet thought the entreprise proxy. Well, I'm using grizzly to listen http request, and httpclient to pass the ntlm proxy, everything is ok for normal http connections. But, when my browser have to access to https, this is another story. Well : I have to implements the CONNECT method, so I'm

Re: Need Help with ProxyClient (httpClient 4.2.1)

2012-08-20 Thread Yann Blazart
to implements my own 'cntlm' local proxy, my goal is to have a centralized access for Java program, safari, and other, acessing to internet thought the entreprise proxy. Well, I'm using grizzly to listen http request, and httpclient to pass the ntlm proxy, everything is ok for normal http connections

Re: Is the HttpClient class in version 3.1 thread safe?

2012-08-18 Thread Gary Gregory
Is there something there that doesn't cover your use case? Thanks Stephen, I do use the MT ConMan like so: HttpClient newHttpClient = new HttpClient(new MultiThreadedHttpConnectionManager()); HttpConnectionManagerParams params = newHttpClient.getHttpConnectionManager().getParams

Need Help with ProxyClient (httpClient 4.2.1)

2012-08-16 Thread Yann Blazart
Hi ! I'm trying to implements my own 'cntlm' local proxy, my goal is to have a centralized access for Java program, safari, and other, acessing to internet thought the entreprise proxy. Well, I'm using grizzly to listen http request, and httpclient to pass the ntlm proxy, everything is ok

Re: Instrumenting HttpClient library

2012-08-13 Thread Oleg Kalnichevski
instantiate a JmxEnabledHttpClient given an HttpClient (uses the decorator pattern from the HttpClient interface). Unit tests are also in place. I think what makes the most sense is for me to remove the external dependencies, which shouldn't take me long, and then show it to Oleg to see what he

Re: Instrumenting HttpClient library

2012-08-12 Thread Mike Boyers
an HttpClient (uses the decorator pattern from the HttpClient interface).  Unit tests are also in place. I think what makes the most sense is for me to remove the external dependencies, which shouldn't take me long, and then show it to Oleg to see what he recommends as far as the best way to integrate. I

Re: Instrumenting HttpClient library

2012-08-08 Thread Jaikit Savla
Hi Oleg, I have created a feature request with little detail about how I am planning to implement. Please comment if something needs to be corrected. https://issues.apache.org/jira/browse/HTTPCLIENT-1222 Thanks, Jaikit From: Oleg Kalnichevski ol

Re: Instrumenting HttpClient library

2012-08-08 Thread Jaikit Savla
...@gmail.com To: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Wednesday, August 8, 2012 5:44 AM Subject: Re: Instrumenting HttpClient library Sounds like a nice contribution and efficient for you to do since you've already done this before. Gary On Wed, Aug 8, 2012 at 8:41 AM

Re: Instrumenting HttpClient library

2012-08-08 Thread mboyers
to integrate ? If you do not have bandwidth than I can assist you or start from your code base. Let me know. Thanks, Jaikit From: Gary Gregory garydgreg...@gmail.com To: HttpClient User Discussion httpclient-users@hc.apache.org Sent: Wednesday, August 8, 2012

Re: Instrumenting HttpClient library

2012-08-07 Thread Oleg Kalnichevski
On Mon, 2012-08-06 at 21:39 -0700, Jaikit Savla wrote: For some reason my previous email had junk characters hence resending - sorry for spam. Hi Team, Is monitoring via JMX already implemented in HttpClient ? -Number of request (socket) timeouts -Number of connection timeouts

Instrumenting HttpClient library

2012-08-06 Thread Jaikit Savla
Hi Team, Is monitoring via JMX already implemented in HttpClient ? -Number of request (socket) timeouts  -Number of connection timeouts  -Number of timeouts while waiting for connection from pool  -Total number of requests  -Average Request duration  -Maximum Request duration  -Number

Instrumenting HttpClient library

2012-08-06 Thread Jaikit Savla
For some reason my previous email had junk characters hence resending - sorry for spam. Hi Team, Is monitoring via JMX already implemented in HttpClient ? -Number of request (socket) timeouts  -Number of connection timeouts  -Number of timeouts while waiting for connection from pool  -Total

Re: [HttpClient 4] local socket port

2012-07-23 Thread Oleg Kalnichevski
control over the process of connection initialization. However, I just figured there is probably a much simpler way to get the endpoint details of an active connection --- DefaultHttpClient httpclient = new DefaultHttpClient(); httpclient.addRequestInterceptor(new HttpRequestInterceptor

Re: [HttpClient 4] local socket port

2012-07-23 Thread Wolfram Alpha
Thank you for your solutions! Both are working as expected and I have already implemented the solution with the ClientConnectionOperator.

[HttpClient 4] local socket port

2012-07-20 Thread Wolfram Alpha
Hi I'm using the Apache HttpClient 4.1.2 and I want to get the local port of the underlying socket. I have not found a reasonable way to get the port-number without changing a lot of the httpclient code, which I don't want to do. Is there realy no easy way to get the port-number? Any

Re: [HttpClient 4] local socket port

2012-07-20 Thread Telvis Calhoun Jr.
-port, sock.getLocalPort()); } }; // thread http://old.nabble.com/get-InetAddress-for-the-HTTP_TARGET_HOST-tt34157287.html On Fri, Jul 20, 2012 at 11:06 AM, Wolfram Alpha wolfram.alpha2...@googlemail.com wrote: Hi I'm using the Apache HttpClient 4.1.2 and I want to get the local port

Re: Fully Android compatible HttpClient 4.1.x; was Re: HttpClient-Cache release that works against HttpClient 4.0?

2012-07-09 Thread Oleg Kalnichevski
On Sun, 2012-07-08 at 06:39 +, Mayur Rustagi wrote: Hi Guys, Any progress on this? This would work wonders with my application. Regards Mayur Not much progress, unfortunately. I have my hands full with the next release of HttpAsyncClient and a major refactoring of HttpClient in the 4.3

Re: Fully Android compatible HttpClient 4.1.x; was Re: HttpClient-Cache release that works against HttpClient 4.0?

2012-07-08 Thread Mayur Rustagi
Hi Guys, Any progress on this? This would work wonders with my application. Regards Mayur - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org

RE: HTTPClient ntlm smart card

2012-06-29 Thread Matthew Young
Must be missing something basic In 4.2 of httpclient there is no constructor for the new org.apache.http.conn.ssl.SSLSocketFactory with a single argument of javax.net.ssl.SSLSocketFactory rather: /** * @since 4.2 */ public SSLSocketFactory( final

RE: HTTPClient ntlm smart card

2012-06-29 Thread Mark Claassen
.) Plus I don't follow at all once I get a hold of the SSLSocketFactory what to do with it. Somehow like I wrote it has to be injected into either the HTTPClient or HTTPParam classes to be used. SSLSocketFactory fact = ... scheme = new Scheme(protocol, port , fact); //http or https for the protocol

Re: HTTPClient retry authentication

2012-06-28 Thread Oleg Kalnichevski
On Wed, 2012-06-27 at 10:54 -0400, Bob Anderson wrote: Hi, I have clients using HTTPClient with NTLM set on the client. We are changing the backend and it only supports Kerberos and BASIC. Does the HTTPClient send the BASIC credentials (Userid and Password) if NTLM is not available

RE: HTTPClient ntlm smart card

2012-06-28 Thread Mark Claassen
Not sure if you that was a question or not. With 4.2, one line is all it is: new org.apache.http.conn.ssl.SSLSocketFactory(HttpsURLConnection.getDefaultSSLSocketFactory()); HttpClient will then use the native socket factory to create its sockets. So, if you can get HttpsURLConnection to work

RE: HTTPClient ntlm smart card

2012-06-27 Thread Matthew Young
on the SSLSocketFactory: http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/index.html How do I hand over the HTTPUrlConnection factory when building up the HTTPClient? Have an example? -- View this message in context: http://old.nabble.com/HTTPClient-ntlm-smart-card

HTTPClient retry authentication

2012-06-27 Thread Bob Anderson
Hi, I have clients using HTTPClient with NTLM set on the client. We are changing the backend and it only supports Kerberos and BASIC. Does the HTTPClient send the BASIC credentials (Userid and Password) if NTLM is not available on the server? If the answer is Yes how long has this support

RE: HTTPClient ntlm smart card

2012-06-27 Thread Mark Claassen
To: httpclient-users@hc.apache.org Subject: RE: HTTPClient ntlm smart card Began looking at the HTTPUrlConnection yesterday to isolate how it build up the NTMLCreditials and hunted around for a couple of minutes for how to pull out cred info Never would have thought of getting the socket factory. Nice

RE: HTTPClient ntlm smart card

2012-06-27 Thread Matthew Young
Building the SSLSocketFactory I got from your previous posts (with 4.2), more how the SSLSocketFactory gets injected into the HTTPClient. ;-) -- View this message in context: http://old.nabble.com/HTTPClient-ntlm-smart-card-tp34070660p34084430.html Sent from the HttpClient-User mailing list

Re: HTTPClient ntlm smart card

2012-06-26 Thread Oleg Kalnichevski
On Mon, 2012-06-25 at 22:51 -0700, Matthew Young wrote: Using HTTPClient 4 and want to authenticate via a proxy with NTLM But the authenticate data should be pulled from my smart card and hard cert. Haven't found examples of this with HTTPClient (only using basic with user/pass

Re: HTTPClient ntlm smart card

2012-06-26 Thread Matthew Young
Not really answering my question rather assuming how the underlying implementation is done. Essentially I know that Eclipse and the subversion extension to Eclipse to some type of proxy pass through using my smartcard cert. Guessing it is via NTML. Likely v2. And HTTPClient support v2 (http

Re: HTTPClient ntlm smart card

2012-06-26 Thread Matthew Young
Or is the user of the NTCreditials class: http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/auth/NTCredentials.html suppost to populate the constructor? In other words, I have to talk to the smartcard and pull out my user info then create a NTCreditials class

Re: HTTPClient ntlm smart card

2012-06-26 Thread Oleg Kalnichevski
On Tue, 2012-06-26 at 07:10 -0700, Matthew Young wrote: Or is the user of the NTCreditials class: http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/auth/NTCredentials.html suppost to populate the constructor? In other words, I have to talk

Re: HTTPClient ntlm smart card

2012-06-26 Thread Matthew Young
(); And just like you said it works. Will look at the HttpURLConnection code. Thanks -- View this message in context: http://old.nabble.com/HTTPClient-ntlm-smart-card-tp34070660p34073158.html Sent from the HttpClient-User mailing list archive at Nabble.com

RE: HTTPClient ntlm smart card

2012-06-26 Thread Mark Claassen
I am jumping in on this a bit late, but this sounds similar to a problem I had. What I did was to use HttpsURLConnection.getDefaultSSLSocketFactory() and wrap that with the HttpClient's socket factory class. This way, when HttpClient connects a socket, it uses the native one. (In my case, I

javascript:__doPostBack() not redirecting using httpClient Navigation

2012-06-25 Thread Raju23
Hi, I am trying to invoke javascript (developed by .net) by using HTTPClient, but cant navigate at all. Can any one tell me how can I resolve this issue. description javascript is here. anchor id=ctl00_ContentPlaceHolder3_lvPayments_ctrl0_lbtPaymentIDLink class=LinkProfileMgmtField href

HTTPClient ntlm smart card

2012-06-25 Thread Matthew Young
Using HTTPClient 4 and want to authenticate via a proxy with NTLM But the authenticate data should be pulled from my smart card and hard cert. Haven't found examples of this with HTTPClient (only using basic with user/pass). Eclipse in it's proxy settings must do something similar behind

Simple app with commons-httpclient-3.1.jar

2012-06-20 Thread bibble_235
of an activity which calls another activity. This works fine and all is good. Now I want to connect to a server and I have choosen to use apache commons-httpclient-3.1.jar. Reading the documentation from apache it says I need as dependencies commons-codec-1.2.jar and commons-logging-1.0.4.jar junit- 3.8.1

Converting from httpclient 3 to httpclient 4 (Cookie policy)

2012-06-20 Thread Yan Cheng CHEOK
httpClient.getParams().setCookiePolicy(org.apache.commons.httpclient.cookie.CookiePolicy.BROWSER_COMPATIBILITY); Thanks. - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail

Re: Converting from httpclient 3 to httpclient 4 (Cookie policy)

2012-06-20 Thread Sam Crawford
See Section 3.5 of http://hc.apache.org/httpcomponents-client-ga/tutorial/html/statemgmt.html This includes an example setting the 'browser compatibility' cookie policy in HttpClient 4.x. Thanks, Sam On 20 June 2012 17:02, Yan Cheng CHEOK ycch...@yahoo.com wrote: Previously, I have

Re: Converting from httpclient 3 to httpclient 4 (Cookie policy)

2012-06-20 Thread Oleg Kalnichevski
in this line. // org.apache.commons.httpclient cannot be resolved to a variable httpClient.getParams().setCookiePolicy(org.apache.commons.httpclient.cookie.CookiePolicy.BROWSER_COMPATIBILITY); Thanks. HttpClient 4.x can automatically pick up the best cookie policy based on the cookie version

Re: Use a unique instance of httpclient with some differents sets of trust certificates

2012-06-14 Thread Jose Escobar
(I can get new certificates for specific Urls at runtime). Nearest aproximation I found was Embby's answer at http://stackoverflow.com/questions/2642777/trusting-all-certificates-using-httpclient-over-https but doesn't fit to my requirements at all. My solution, change the context for each

Re: Use a unique instance of httpclient with some differents sets of trust certificates

2012-06-01 Thread Oleg Kalnichevski
at http://stackoverflow.com/questions/2642777/trusting-all-certificates-using-httpclient-over-https but doesn't fit to my requirements at all. My solution, change the context for each request if needed, fits my requirements and apparently worked until you say it could fail. I'm going

Re: Use a unique instance of httpclient with some differents sets of trust certificates

2012-05-31 Thread Jose Escobar
-certificates-using-httpclient-over-https but doesn't fit to my requirements at all. My solution, change the context for each request if needed, fits my requirements and apparently worked until you say it could fail. I'm going to investigate more in a custom socket factory solution, however could

Re: Use a unique instance of httpclient with some differents sets of trust certificates

2012-05-30 Thread Jose Escobar
Hi, Finally I found a solution. I create a new SchemeRegistry on each request thread that need specific trust and key material and I add it as a SCHEME_REGISTRY attribute to a Context variable(each thread maintains its own dedicated instance of HttpContext). Then I use the singleton httpClient

Re: Use a unique instance of httpclient with some differents sets of trust certificates

2012-05-30 Thread Oleg Kalnichevski
instance of HttpContext). Then I use the singleton httpClient and that new context to execute the request. Using this I can use a custom SchemeRegistry for each request with a singleton httpclient bean. BUT I found that SCHEME_REGISTRY context attribute is not working properly in httpclient

Use a unique instance of httpclient with some differents sets of trust certificates

2012-05-29 Thread Jose Escobar
Hi there, First of all let me say English is not my native language; please excuse typing errors. I'm using Httpclient 4.2 on a Spring project to send Http Post requests. It's working correctly with a singleton DefaultHttpClient bean managed by a PoolingClientConnectionManager

Re: Use a unique instance of httpclient with some differents sets of trust certificates

2012-05-29 Thread Oleg Kalnichevski
On Tue, 2012-05-29 at 16:17 +0200, Jose Escobar wrote: Hi there, First of all let me say English is not my native language; please excuse typing errors. I'm using Httpclient 4.2 on a Spring project to send Http Post requests. It's working correctly with a singleton DefaultHttpClient bean

Httpclient 3.1 - reading the response from a GET request...

2012-05-23 Thread Michael Burbidge
I think I might have a fundamental misunderstanding about how httpclient works. Suppose I have set up a get request using the following code snippet: GetMethod getMethod = new GetMethod(https://somedownloadurl.com;); getMethod.setQueryString(someQueryString

HttpClient Proxy authentication

2012-05-23 Thread Gonzalo Pennino
I'm developing an application that uses HttpClient 4.2. The app runs in a Windows 2008 server and I can't connect through the proxy (Squid, not sure about configuration) With this code I can connect and print the stream: System.setProperty(http.proxyHost, 10.9.190.251); System.setProperty

Re: Httpclient 3.1 - reading the response from a GET request...

2012-05-23 Thread Fredrik Jonson
the data one byte at a time, it is unlikely that the byte copying will be a hotspot in the application anyway. -- Fredrik Jonson - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail

Re: HttpClient API - upload files using OutputStream not Filepart

2012-05-22 Thread Emilian Utma
Hello Oleg, Thank you for your reply. I'll try to implement a homemade httpclient based on the Apache HttpCore component. Best regards, Emil On Mon, May 21, 2012 at 6:48 PM, Oleg Kalnichevski ol...@apache.org wrote: On Mon, 2012-05-21 at 17:13 +0300, Emilian Utma wrote: Hello, Thank

Re: HttpClient API - upload files using OutputStream not Filepart

2012-05-22 Thread Oleg Kalnichevski
On Tue, May 22, 2012 at 10:24:07AM +0300, Emilian Utma wrote: Hello Oleg, Thank you for your reply. I'll try to implement a homemade httpclient based on the Apache HttpCore component. Best regards, Emil Let me know if you need help with the API. Oleg On Mon, May 21, 2012 at 6:48

[ANNOUNCEMENT] HttpComponents HttpClient 4.2 GA release

2012-05-22 Thread Oleg Kalnichevski
The HttpComponents project is pleased to announce 4.2 GA release of Apache HttpClient. The most notable enhancements included in this release are: * New facade API for HttpClient based on the concept of a fluent interface. The fluent API exposes only the most fundamental functions of HttpClient

HttpClient API - upload files using OutputStream not Filepart

2012-05-21 Thread Emilian Utma
Hello, I want to know if is possible to upload a file which its content is set via a java.io.OutputStream (as in old times when using java.net.HttpURLConnection) not org.apache.commons.httpclient.methods.multipart.FilePart.Filepart. I need this behaviour because the content is provided by

RE: HttpClient API - upload files using OutputStream not Filepart

2012-05-21 Thread Mark Claassen
Utma [mailto:utma.emil...@gmail.com] Sent: Monday, May 21, 2012 8:55 AM To: httpclient-users@hc.apache.org Subject: HttpClient API - upload files using OutputStream not Filepart Hello, I want to know if is possible to upload a file which its content is set via a java.io.OutputStream (as in old

Re: HttpClient API - upload files using OutputStream not Filepart

2012-05-21 Thread Oleg Kalnichevski
design decision to not expose the underling socket and its input and output streams to HttpClient API consumers. This enables HttpClient to ensure that persistent connections are always in a consistent state when kept alive. You still have an option of dropping to HttpCore and implementing your own

Re: HttpClient 4.1 Threading

2012-05-17 Thread Oleg Kalnichevski
On Thu, 2012-05-17 at 13:02 +, Gordon Ross wrote: Using HttpClient 4.1, I'm creating an instance by: client = DefaultHttpClient(new ThreadSafeClientConnManager()); Which gives me a thread-safe environment. But how separate are the thread environments ? If I set headers, cookies

HttpClient 3.x and JRE 1.7...

2012-05-17 Thread Michael Burbidge
We are still on HttpClient 3.x. We recently started having problems with random connection close errors while downloading content, use a GET request with HttpClient 3.x. Not much has changed in this code. I realize that at some point we should upgrade to 4.x. One of the things that has changed

Re: HttpClient 3.x and JRE 1.7...

2012-05-17 Thread Michael Burbidge
Oops, let me correct myself. The exception we are getting is a connection reset exception. On May 17, 2012, at 1:14 PM, Michael Burbidge wrote: We are still on HttpClient 3.x. We recently started having problems with random connection close errors while downloading content, use a GET request

Re: [Junk released by Allowed List] Re: HTTPClient stops working and produce java.net.ConnectException: Connection timed out exception

2012-05-08 Thread Oleg Kalnichevski
On Mon, 2012-05-07 at 20:39 +, Eugene Dvorkin wrote: Hi Oleg, thanks. I will investigate. But is it matter in this particular case? Ii might or it might not. The simple truth is I _personally_ have no bandwidth for looking into problems with deprecated versions of HttpClient. Oleg

Re: Avoiding HTTP Error 301 when using HttpClient 4.x

2012-05-08 Thread Mugoma Joseph Okomba
assistance. Mugoma. - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h...@hc.apache.org

Re: HTTPClient stops working and produce java.net.ConnectException: Connection timed out exception

2012-05-07 Thread Sam Crawford
change IP address, and have a low TTL in DNS accordingly. Depending on your Java version and configuration, you may be caching DNS records indefinitely. If this was the case, then your JVM may have cached an old IP address for your Amazon ELB and HttpClient is dutifully trying to connect to this old

Re: [Junk released by Allowed List] Re: HTTPClient stops working and produce java.net.ConnectException: Connection timed out exception

2012-05-07 Thread Eugene Dvorkin
I was trying to use snoop instead of tcpdumb because it is solaris platform. The problem is, I don't capture any communication at all! I see communications for wget and curl, but not this one. I checked usage of snoop and pretty sure I use it correctly. Is it possible with httpclient? On 05/07

Re: HTTPClient stops working and produce java.net.ConnectException: Connection timed out exception

2012-05-07 Thread Oleg Kalnichevski
On Mon, 2012-05-07 at 18:42 +, Eugene Dvorkin wrote: I have a client application that makes http calls to another servers using http client library (httpclient-4.1.3.jar) Just for the record, please note you are not using HttpClient 4.1.3. Judging by the stack trace and the code sample

Re: Avoiding HTTP Error 301 when using HttpClient 4.x

2012-05-06 Thread Oleg Kalnichevski
On Sun, 2012-05-06 at 06:22 +0300, Mugoma Joseph Okomba wrote: Hello, This relates to http://mail-archives.apache.org/mod_mbox/hc-httpclient-users/201205.mbox/browser (migrating from HC 3 to HC 4). I can access a link physically in a browser but when I try to access same link using

Migrating from Commons HttpClient (3.x) to HttpComponents Client (4.x)

2012-05-04 Thread Mugoma Joseph Okomba
Hello, I would like to migrate from HttpClient 3.x to HttpClient 4.x but having difficulty how to handle redirects. The code works properly under Commons HttpClient but breaks when migrated to HttpComponents Client. Some of the links get undesirable redirects but when I set http.protocol.handle

Re: Migrating from Commons HttpClient (3.x) to HttpComponents Client (4.x)

2012-05-04 Thread Oleg Kalnichevski
On Fri, 2012-05-04 at 14:28 +0300, Mugoma Joseph Okomba wrote: Hello, I would like to migrate from HttpClient 3.x to HttpClient 4.x but having difficulty how to handle redirects. The code works properly under Commons HttpClient but breaks when migrated to HttpComponents Client. Some

Re: Migrating from Commons HttpClient (3.x) to HttpComponents Client (4.x)

2012-05-04 Thread Oleg Kalnichevski
implement a custom RedirectStrategy and configure HttpClient to use it instead of the default one. The problem with HC 4.x is that it's being detected as a mobile browser. So when it hits a website the server tries to redirect to a mobile version if it has. This appears to be the anormally for me

HttpClient 4.1, NTLM and Webstart

2012-04-30 Thread Olivier Rossel
Hi everyone. I wish I could use HttpClient 4.1 through a NTLM proxy, in a Webstart environment. May be you can help me clarify a few things about that. I read that HttpClient 4.1 has out-of-the-box support of NTLM (but I am not sure what it really means). The doc gives such a NTLM-related code

RE: HttpClient 4.1, NTLM and Webstart

2012-04-30 Thread Mark Claassen
Wow, another HttpClient / Webstart user. Glad to know another one exists! I thought I was the only one. We don't use NTLM, but we do use certificate based authentication with HttpClient and Webstart. This involves interfacing with Windows to use a hardware device to do the encryption. We

Re: HttpClient 4.1, NTLM and Webstart

2012-04-30 Thread Oleg Kalnichevski
On Mon, 2012-04-30 at 19:00 +0200, Olivier Rossel wrote: Hi everyone. I wish I could use HttpClient 4.1 through a NTLM proxy, in a Webstart environment. May be you can help me clarify a few things about that. I read that HttpClient 4.1 has out-of-the-box support of NTLM (but I am

HttpClient cutting off big request?

2012-04-19 Thread Michael Szalay
Hi all we have an application that uses HttpClient 3.1 (built into Apache ServiceMix) to send large requests to a database over http PUT. When a PUT requests become really big ( 0.5 MBbyte), there is the following error: 16:49:39,581 | DEBUG | ile://data/tx/in | HttpMethodDirector

Httpclient support for PATCH method

2012-04-17 Thread Alberto Aresca
Hi all, A while ago a proposal for the new PATCH http verb has been made (see http://tools.ietf.org/html/rfc5789) Is there any plan to support it within the httpclient? Cheers -- Alberto Aresca - To unsubscribe, e-mail

Re: Httpclient support for PATCH method

2012-04-17 Thread Oleg Kalnichevski
On Tue, 2012-04-17 at 11:27 -0300, Alberto Aresca wrote: Hi all, A while ago a proposal for the new PATCH http verb has been made (see http://tools.ietf.org/html/rfc5789) Is there any plan to support it within the httpclient? Cheers No plans at the moment as usually custom / non

Re: How to use logging abilities of HttpClient?

2012-04-12 Thread tommmmmm
Found it out. Selenium-standalone-2.20.0.jar was in classpath - and it was forcing system to use lcf4j, so both commons-logging and log4j were rendered useless. Since I had little selenium code, I changed it to HtmlUnit code, and voila, it works.

Re: How to use logging abilities of HttpClient?

2012-04-12 Thread Oleg Kalnichevski
, and voila, it works. And what did I tell you? Sort out your local mess before making any accusations. Oleg - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional commands, e-mail: httpclient-users-h

Re: How to use logging abilities of HttpClient?

2012-04-12 Thread tommmmmm
And what did I tell you? Sort out your local mess before making any accusations. I am sorry.

Re: How to use logging abilities of HttpClient?

2012-04-11 Thread tommmmmm
test message --- Here should be output of HttpClient but its not --- DEBUG [jobManager.UploadManager] some test message I slept with the problem, yet no solutions came to my mind. For the sake of clarity here is output of: ClassLoader cl = ClassLoader.getSystemClassLoader(); URL

Re: How to use logging abilities of HttpClient?

2012-04-11 Thread tommmmmm
[tests.StupidClass] stupid class debug logger test And that ladies and gentleman is an ultimate proof that it's HttpClient's fault that logging doesn't work at all. Because from application's point of view, the class StupidClass and HttpClient are the same = a class outside a package. And log4j CAN

How to use logging abilities of HttpClient?

2012-04-10 Thread tommmmmm
reason the HttpClient doesn't want to sprout any logs at all. -- Tomasz P.

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread Ryan Smith
=DEBUG Yet absolutely no additional output is generated!!! I also did this: logger.debug(some test message); and it does show some test message so it ultimately proves that configuration file WAS lodaed and that it was loaded PROPERLY. Yet for some reason the HttpClient doesn't want

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread tommmmmm
I used it prior to using local path. Didn't work either. Also - the logger.debug(some test message); is pretty much a 100% proof loading was done correctly. On 10 April 2012 13:10, Ryan Smith ryan.justin.sm...@gmail.com wrote: Possibly try using the absolute path to your log4j.properties file

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread Ryan Smith
It is possible that your app might be reading a log4j config file somewhere in a jar. If you want to test, try commenting out your PropertyConfigurator line and see if your debug statement in your code still works. My guess is your log4j.properties file isnt on your CLASSPATH. Usually src

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread tommmmmm
prove it). Also, in log4j documentation it's said only one log file can exist, so if there was another one somewhere else I would have gotten warning for trying to overwrite it. Furthermore. I am loading a config file with root logger as DEBUG like 2 lines before calling HttpClient. So even

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread Oleg Kalnichevski
as DEBUG like 2 lines before calling HttpClient. So even if there was some other config file, my root settings should overwrite it because a) they are root settings b) I set the settings 2 lines before executing HttpClient, so the system has no possibility to load OTHER settings. Another

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread tommmmmm
I did this for a test: logger.debug(some test message); // - DOES get printed. my_code_here_based_on_HttpClient; // - should produce tons of logging output logger.debug(some test message); // - DOES get printed. So why the middle part doesn't produce any output? Just to recall I am using

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread tommmmmm
(org.apache.commons.logging.simplelog.log.org.apache.http.wire, ERROR); Yes, that is another almost exactly copy-pasted example from the HttpClient website. Didn't work. The class really isn't big - one main method + couple lines. So I have no idea how this could happen quote: If Commons Logging

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread Ryan Smith
perfectly as long as it is my code. The HttpClient related lines just seem to be ignored. Totally. I also used to used HttpClient 3.x few days ago - I went back to that old project and added logging lines - you won't believe - it worked Straight off the bat, without ANY fancy code. So why

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread tommmmmm
On 10 April 2012 16:43, Ryan Smith ryan.justin.sm...@gmail.com wrote: FWIW, in maven, I added log4j as a dependency to my pom.xml, I put a log4j.xml file in my ./src/main/resources folder and had debug logging working in under 2 minutes. 6 hours+ is no fun indeed. Gratz. I already made

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread Ryan Smith
Possibly try using a log4j.xml file instead of a log4j.properties file. Ive seen this fix a similar problem I had a while back. Its worth a shot anyways, right? hth, -Ryan On Tue, Apr 10, 2012 at 12:50 PM, tomm tommm...@gmail.com wrote: On 10 April 2012 16:43, Ryan Smith

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread Ken Krugler
Hi Tomasz, Typically logging issues wind up having little or nothing to do with the actual code being used to do the logging. Where you need to be looking is classpath and jar issues, which requires project context, not source code. I did a quick google search on netbeans log4j commons

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread tommmmmm
On 10 April 2012 19:45, Vasile Alin alinachegal...@gmail.com wrote: Try adding the environment variable -Dlog4j.debug=true so that you can see how log4 is configuring itself. log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@2827f394. log4j: Trying

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread Vasile Alin
log4j.additivity.jobManager=[null] log4j: Finished configuring. A complete jibberish. *reading it again and again till something useful pops into my head* - To unsubscribe, e-mail: httpclient-users-unsubscr...@hc.apache.org For additional

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread tommmmmm
On 10 April 2012 19:57, Vasile Alin alinachegal...@gmail.com wrote: Did you tried to change the order of these two lines: Logger logger = Logger.getLogger(jobManager.UploadManager); PropertyConfigurator.configure(./src/logging/log4j.properties); so that you'll have:

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread tommmmmm
I thought that if there is: getClass().getClassLoader().getResource(log4j.properties) there also woulb be: getClass().getClassLoader().setResource(log4j.properties) I was so wrong. How do I point the httpClient to my properties file? I thought that's why the line log4j.logger.org.apache.http

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread Ryan Smith
that if there is: getClass().getClassLoader().getResource(log4j.properties) there also woulb be: getClass().getClassLoader().setResource(log4j.properties) I was so wrong. How do I point the httpClient to my properties file? I thought that's why the line log4j.logger.org.apache.http=DEBUG

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread Ryan Smith
at 3:28 PM, tomm tommm...@gmail.com wrote: I thought that if there is: getClass().getClassLoader().getResource(log4j.properties) there also woulb be: getClass().getClassLoader().setResource(log4j.properties) I was so wrong. How do I point the httpClient to my properties file? I thought

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread tommmmmm
On 10 April 2012 21:37, Ryan Smith ryan.justin.sm...@gmail.com wrote: I guess I should include the code as part of the email , its only a few lines. ClassLoader cl = ClassLoader.getSystemClassLoader(); URL[] urls = ((URLClassLoader)cl).getURLs(); for(URL url: urls){

Re: How to use logging abilities of HttpClient?

2012-04-10 Thread tommmmmm
On 10 April 2012 21:47, Vasile Alin alinachegal...@gmail.com wrote: do you have the same output for log4j.debug? Almost. log4j: Trying to find [log4j.xml] using context classloader sun.misc.Launcher$AppClassLoader@2827f394. log4j: Trying to find [log4j.xml] using

How do you do multi-threaded/parallel/chunk downloading with HttpClient?

2012-03-31 Thread tommmmmm
I was searching for some java API for multi-threaded downloading and I came across jdownman which heavily uses HttpClient. However that project is long gone and google doesn't return any other sane results, so I decided to ask here. How do you do multi-threaded/parallel/chunk downloading

Re: How to set NTLM as the Preferred Auth Scheme in HttpClient 4.0.3

2012-03-22 Thread Oleg Kalnichevski
On Tue, 2012-03-20 at 18:57 -0700, kodeninja wrote: Howdy, I'm unable to figure out how to set NTLM as the preferred Proxy Auth Scheme in 4.0.3. In 4.1.2, I can use the below code to achieve this: DefaultHttpClient httpclient = new DefaultHttpClient(ccm, params); // Choose NTLM

How to set NTLM as the Preferred Auth Scheme in HttpClient 4.0.3

2012-03-20 Thread kodeninja
Howdy, I'm unable to figure out how to set NTLM as the preferred Proxy Auth Scheme in 4.0.3. In 4.1.2, I can use the below code to achieve this: DefaultHttpClient httpclient = new DefaultHttpClient(ccm, params); // Choose NTLM for proxy authentication Listlt;Stringgt; authpref = new

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