Re: SSL Handshake : timing and timeout

2016-11-11 Thread Stefan Magnus Landrø
com>: > Thanks but I see not property related to Ssl Handshake timeout. > > Regards > > On Friday, November 11, 2016, Stefan Magnus Landrø < > stefan.lan...@gmail.com> > wrote: > > > https://hc.apache.org/httpcomponents-client-ga/ > > httpclient/apidocs/or

Re: SSL Handshake : timing and timeout

2016-11-11 Thread Stefan Magnus Landrø
you point me to some doc ? > > Thanks > > On Fri, Nov 11, 2016 at 9:20 AM, Stefan Magnus Landrø < > stefan.lan...@gmail.com> wrote: > > > > > > > Sendt fra min iPhone > > > > > Den 11. nov. 2016 kl. 00.25 skrev Philippe Mouawad < > pmoua

Re: SSL Handshake : timing and timeout

2016-11-11 Thread Stefan Magnus Landrø
Sendt fra min iPhone > Den 11. nov. 2016 kl. 00.25 skrev Philippe Mouawad : > > Hello, > Is there a way in HttpClient/HttpCore to compute the time taken by SSL > Handshake ? > And timeout handshake ? Use socketoptions > > Thank you > Regards > Philippe M.

Re: Disabling pooling of PoolingConnectionManager

2016-10-18 Thread Stefan Magnus Landrø
ST rather than SHOULD. So, it should not up to server > implementation. But I find the TTL and Strategy approaches safer as we have > some kind of control over them. > > On Tue, Oct 18, 2016 at 10:26 AM, Stefan Magnus Landrø < > stefan.lan...@gmail.com> wrote: > > > Why

Re: Disabling pooling of PoolingConnectionManager

2016-10-18 Thread Stefan Magnus Landrø
Why would you think so? 2016-10-18 16:10 GMT+02:00 Murat Balkan : > Thanks Oleg, > One question. I think it would be up to server implementation whether to > take these parameters into account right? > Regards, > Murat > > On Tue, Oct 18, 2016 at 10:06 AM, Oleg Kalnichevski

Re: TimeoutException in async pool

2016-10-03 Thread Stefan Magnus Landrø
So - first I'd set pool size to 50 since that's all you need on average. Then set acquisition timeout to something that makes sense. 10-20ms? Sendt fra min iPhone > Den 3. okt. 2016 kl. 07.32 skrev Joan Balagueró > : > > Hello, > > I’m using the async

Re: Versions and osgi and async and such

2016-09-14 Thread Stefan Magnus Landrø
are you using the correct core version? Sendt fra min iPhone > Den 14. sep. 2016 kl. 14.13 skrev Benson Margulies : > > I am struggling to maintain some code that wants to use the latest 4.x > version of http asynchronous client via OSGi. > > The latest async client is

Re: Can a 201 (Created) response cause HTTP async client to prematurely send a FIN to the server?

2016-08-19 Thread Stefan Magnus Landrø
How can you return a 201 without having read all the data from the client? I believe you're violating the http spec Sendt fra min iPhone > Den 19. aug. 2016 kl. 16.47 skrev Sachin Nikumbh : > > Hi all, > > I realized that in my previous post, I did not do a good job of

Re: Telling HC to make new connections all the time

2016-06-22 Thread Stefan Magnus Landrø
Hi Benson, Have you considered implementing a custom https://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/conn/DnsResolver.html that handles DNS changes in a better way than the default implementation? You could probably use http://www.xbill.org/dnsjava/ and lookup

Re: Responding adaptively to 503 errors (including respecting the Retry-After header)

2015-10-14 Thread Stefan Magnus Landrø
Newer versions handle the retry-after header: https://github.com/apache/httpclient/blob/trunk/httpclient/src/main/java/org/apache/http/client/ServiceUnavailableRetryStrategy.java Have a look at the default impl:

Re: Responding adaptively to 503 errors (including respecting the Retry-After header)

2015-10-14 Thread Stefan Magnus Landrø
updating :P > > Glad it’s been handled either way. Thanks for the info. > > > On Oct 14, 2015, at 4:59 PM, Stefan Magnus Landrø < > stefan.lan...@gmail.com> wrote: > > > > Newer versions handle the retry-after header: > > > https://github.com/apache/httpc

Re: Checking validity of URL at other end without downloading any contents

2015-09-25 Thread Stefan Magnus Landrø
provided the server side supports the HEAD method, something which is not always the case. I you plan to performs thousands of requests in parallell, you certainly want it to be async. You also might want to consider https://github.com/AsyncHttpClient/async-http-client, which lets you stop

Re: Checking validity of URL at other end without downloading any contents

2015-09-24 Thread Stefan Magnus Landrø
Have you looked at the async client? Sendt fra min iPhone > Den 25. sep. 2015 kl. 03.12 skrev Karl Wettin : > > Hi all, > > I want to send a request that download headers but no actual content. Is that > possible? What I'm trying to solve is to check if any URLs in a

Re: PoolingHttpClientConnectionManager SSL Handshake exception

2015-09-08 Thread Stefan Magnus Landrø
Are you ONLY changing the http client you use and NOTHING else? 2015-09-08 10:31 GMT+02:00 Bhuvaneswari Anandhan < bhuvaneswari.anand...@oracle.com>: > Hi , > > > > Recently we have done a Apache http component migration from 3.1 to 4.4.1. > > > > We have changed the connection manager

Re: Input on solution for "Could not generate DH keypair" error w/SSL connection

2015-09-08 Thread Stefan Magnus Landrø
I fully agree. Hardening ssl config both client and server side makes a lot of sense. Most folks focus on the server config, but client config is equally important. Stefan 2015-09-08 10:20 GMT+02:00 Oleg Kalnichevski : > On Mon, 2015-09-07 at 11:06 -0700, Ken Krugler wrote: >

Re: Async problem with GET

2015-08-31 Thread Stefan Magnus Landrø
Sendt fra min iPhone > Den 31. aug. 2015 kl. 11.07 skrev Oleg Kalnichevski : > >> On Mon, 2015-08-31 at 08:48 +0100, Graeme Wallace wrote: >> I'm running into a strange problem using async http components. I have a >> site that i'm using GET to pull information back from on a

Re: Async problem with GET

2015-08-31 Thread Stefan Magnus Landrø
Sendt fra min iPhone > Den 31. aug. 2015 kl. 18.06 skrev Oleg Kalnichevski <ol...@apache.org>: > >> On Mon, 2015-08-31 at 18:01 +0200, Stefan Magnus Landrø wrote: >> >> Sendt fra min iPhone >> >>>> Den 31. aug. 2015 kl. 11.07 skrev Oleg Ka

Re: Optimal settings for maxTotal and defaultMaxPerRoute

2015-08-24 Thread Stefan Magnus Landrø
How many requests do you perform per second? Ssl involved? Sendt fra min iPhone Den 24. aug. 2015 kl. 13.14 skrev Mark Thomas chxmlgate...@googlemail.com: Hello How do I determine the optimal settings for maxTotal and defaultMaxPerRoute for a PoolingHttpClientConnectionManager?

Re: Optimal settings for maxTotal and defaultMaxPerRoute

2015-08-24 Thread Stefan Magnus Landrø
What do the response times look like ? Avg and 90 th percentile Sendt fra min iPhone Den 24. aug. 2015 kl. 15.18 skrev Mark Thomas chxmlgate...@googlemail.com: No SSL. 50. On 24/08/15 13:24, Stefan Magnus Landrø wrote: How many requests do you perform per second? Ssl involved

Re: Optimal settings for maxTotal and defaultMaxPerRoute

2015-08-24 Thread Stefan Magnus Landrø
About 3 reqs per conn per sec. = 16 to 20 conn pool size to prevent starvation Sendt fra min iPhone Den 24. aug. 2015 kl. 15.25 skrev Mark Thomas chxmlgate...@googlemail.com: 305ms Avg 518ms 90% On 24/08/15 14:23, Stefan Magnus Landrø wrote: What do the response times look like ? Avg

Re: Re: httpclient4 is extremely slow than correpsoning code of HttpClient3

2015-07-08 Thread Stefan Magnus Landrø
26 26 25 26 237 25 238 446 27 25 234 28 bit1...@163.com From: Stefan Magnus Landrø Date: 2015-07-08 15:29 To: HttpClient User Discussion Subject: Re: Re: httpclient4 is extremely slow than correpsoning code of HttpClient3 Few things here: HttpClientPoolUtilsTest: why

Re: Re: httpclient4 is extremely slow than correpsoning code of HttpClient3

2015-07-08 Thread Stefan Magnus Landrø
more that 1 seconds. Not sure where the problem goes. bit1...@163.com From: Stefan Magnus Landrø Date: 2015-07-08 17:40 To: HttpClient User Discussion Subject: Re: Re: httpclient4 is extremely slow than correpsoning code of HttpClient3 Have you looked at the response times (access logs

Re: httpclient4 is extremely slow than correpsoning code of HttpClient3

2015-07-07 Thread Stefan Magnus Landrø
Magnus Landrø stefan.lan...@gmail.com wrote: You shouldn't close http client on every request, only response Sendt fra min iPhone Den 7. jul. 2015 kl. 16.05 skrev bit1...@163.com bit1...@163.com: Can someone kindly help me on this? Thanks a lot! bit1...@163.com From: bit1...@163

Re: Releasing resources when using CloseableHttpAsyncClient

2015-07-06 Thread Stefan Magnus Landrø
try with resources in java will automatically call close(). 2015-07-06 10:03 GMT+02:00 Simao Mata simao.m...@carjump.de: Hello, In the examples for the async hc version, I noticed the `close()` is always called after using the `CloseableHttpAsyncClient` instance, inside a `finally` block.

Re: Releasing resources when using CloseableHttpAsyncClient

2015-07-06 Thread Stefan Magnus Landrø
https://docs.oracle.com/javase/tutorial/essential/exceptions/tryResourceClose.html 2015-07-06 10:29 GMT+02:00 Simao Mata simao.m...@carjump.de: Sorry, I don't understand what you mean? On 6 July 2015 at 10:17, Stefan Magnus Landrø stefan.lan...@gmail.com wrote: try with resources in java

Re: MultiThreadedConnectionManager

2015-06-15 Thread Stefan Magnus Landrø
Stacktrace? Den 15. jun. 2015 kl. 21.43 skrev Erik Stansbury estansb...@beachheadsolutions.com: I am getting an error where the class MultiThreadedConnectionManager is missing. I am creating an android email app and I need this class in order for it to work. I am using the Android

Re: What is the relation between TIME_WAIT and HTTP Client calls to a RestService?

2015-06-04 Thread Stefan Magnus Landrø
I presume you are reusing/pooling your client connections, right? Also - you could tune your OS to shutdown connections faster. You can easily google you issue. Stefan 2015-06-04 17:51 GMT+02:00 Check Peck comptechge...@gmail.com: I am using Spring RestTemplate to make a HTTP Calls to my

Re: There are known problems of running HttpClient in a web application?

2015-05-28 Thread Stefan Magnus Landrø
, org.apache.commons.logging.impl.SimpleLog); Isn't right? Emiliano Carlesi Email: emiliano.carl...@itattitude.com Lync: emiliano.carl...@itattitude.com Mobile: +39 3487837153 Phone: +39 0650939115 -Original Message- From: Stefan Magnus Landrø [mailto:stefan.lan...@gmail.com] Sent: Friday, May

Re: There are known problems of running HttpClient in a web application?

2015-05-28 Thread Stefan Magnus Landrø
What server are you running on? 2015-05-28 23:58 GMT+02:00 Stefan Magnus Landrø stefan.lan...@gmail.com: What logging framework are you using? 2015-05-28 23:43 GMT+02:00 Emiliano Carlesi emiliano.carl...@itattitude.com: Hi to all, I have a problem I can't understand related

Re: Httpclient 4.4.1 - Issue in passing InputStreamEntity

2015-05-28 Thread Stefan Magnus Landrø
I believe you have to do some more digging here. As I see it you send x bytes from your your client to your proxy. That should see the exact same x bytes. Can you confirm in any way? The exact same x bytes should then be sent by your proxy to your backend. Can you confirm that on the backend?

Re: Reg: HttpClient - POST with InputStreamEntity

2015-05-26 Thread Stefan Magnus Landrø
Are you touching the input stream before passing it on? Have you performed a wire capture to see what part of the stream gets lost? Stefan 2015-05-26 13:42 GMT+02:00 Bhuvaneswari Anandhan bhuvaneswari.anand...@oracle.com: Hi , In one of my project we are migrating Apache http client

Re: Pool congestion

2015-05-13 Thread Stefan Magnus Landrø
Maybe worthwhile to check out hystrix instead: https://github.com/Netflix/Hystrix 2015-05-13 9:16 GMT+02:00 Thomas Boniface tho...@stickyads.tv: Thanks for the pointers, this does seems similar to what I was thinking of. My understanding is that this is currently not possible with the http

Re: No Response to TCP RESET (???)

2015-05-12 Thread Stefan Magnus Landrø
You say the app hangs - do you know where it hangs? do you have a thread dump you could provide? (use jstack or jcmd) 2015-05-10 17:10 GMT+02:00 Mark Johnson mjohnson...@gmail.com: What happens at this point is we have tried to issue an HTTP GET (but nothing goes out on the wire) and there's

Retry and backoff

2015-05-12 Thread Stefan Magnus Landrø
Hi there, I'm considering implementing a ServiceUnavailableRetryStrategy and/or conneciton backoff manager that handles HTTP 429 responses and the retry-after http header (in conjunction with 503 or 429). Does that make sense? Would a code contribution be of any interest, Oleg? Stefan

Re: Strange SSL error

2015-05-11 Thread Stefan Magnus Landrø
Main Street Leighton Plaza Suite 375 South Bend, IN 46601 E-mail: mailto:mclaas...@ocie.net Voice: (574)232-3784 Fax: (574)232-4014 -Original Message- From: Stefan Magnus Landrø [mailto:stefan.lan...@gmail.com] Sent: Friday, May 08, 2015 5:20 PM To: HttpClient User Discussion

Re: No Response to TCP RESET (???)

2015-05-11 Thread Stefan Magnus Landrø
I'll try to have a look at the tcpdump tomorrow. Stefan Sendt fra min iPhone Den 12. mai 2015 kl. 00.10 skrev Mark Johnson mjohnson...@gmail.com: Here is the trace messages from the HTTPClient library and a wireshark capture. As I said earlier, this doesn't happen all the time.

Re: Websocket support??

2015-05-10 Thread Stefan Magnus Landrø
Pavel, why not contribute this yourself? Sendt fra min iPhone Den 9. mai 2015 kl. 23.20 skrev Pavel Bucek pavel.bu...@oracle.com: Hi Oleg, would you at least consider generic support for HTTP UPGRADE? WebSocket can be build on top of that and does not necessary need to be part of

Re: Fw:Fw:PoolingHttpClientConnectionManager how to reuse the connection

2015-04-24 Thread Stefan Magnus Landrø
I prefer this code-style: client.execute(new HttpGet(), response - { return response.getAllHeaders(); } ); The response handler will clean up everything. 2015-04-24 13:57 GMT+02:00 Oleg Kalnichevski ol...@apache.org: On Fri, 2015-04-24 at 13:22 +0200, Joan Balagueró wrote: Hello,

Re: HTTPClient 4.3.6 : SSL Session reuse

2015-04-16 Thread Stefan Magnus Landrø
if we can get TCP dump from server though; On Apr 15, 2015 3:07 PM, Stefan Magnus Landrø stefan.lan...@gmail.com wrote: A tcpdump from the server would help too Sendt fra min iPhone Den 15. apr. 2015 kl. 19.48 skrev Oleg Kalnichevski ol...@apache.org: On Wed, 2015-04-15 at 13:38 -0400

Re: HTTPClient 4.3.6 : SSL Session reuse

2015-04-15 Thread Stefan Magnus Landrø
2015-04-15 15:40 GMT+02:00 Ryan Fulghum ryan.fulgh...@gmail.com: We are using HTTPClient 4.3.6 to conduct Multipart File uploads over HTTPs. As the file size grows bigger the upload operation becomes chatty. Chatty? What exactly do you mean? Lot of connections (contextually related) are

Re: Expect-continue authentication failure

2015-03-05 Thread Stefan Magnus Landrø
Downsides? No, quite the opposite in many cases. Less data transfer in total and lower latency. Stefan Sendt fra min iPhone Den 5. mar. 2015 kl. 09.54 skrev Umesh Sehgal umesh.seh...@gmail.com: Hi, My application uses commons-httpclient 3.1 to make post request to tomcat hosted

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Stefan Magnus Landrø
, Stefan Magnus Landrø ha scritto: or a tcp dump if you prefer. Could it be a transfer encoding issue? Is there a proxy involved in this process? The error is returned only with certain post (I noticed that only posts 30KB are rejected), while the encoding is always the same as posts

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Stefan Magnus Landrø
of the session exhibiting the problem. Oleg Il 25.02.2015 20.44, Stefan Magnus Landrø ha scritto: 2015-02-25 20:07 GMT+01:00 Alessandro Manzoni manzoni.alessand...@gmail.com : Il 25.02.2015 19.28, Stefan Magnus Landrø ha scritto: Few questions: Why not use a more

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-25 Thread Stefan Magnus Landrø
2015-02-25 20:07 GMT+01:00 Alessandro Manzoni manzoni.alessand...@gmail.com : Il 25.02.2015 19.28, Stefan Magnus Landrø ha scritto: Few questions: Why not use a more appropriate entity type? ByteArrayEntity? StreamEntity? Should I? Why an entity would be more or less appropriate

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-25 Thread Stefan Magnus Landrø
Few questions: Why not use a more appropriate entity type? ByteArrayEntity? StreamEntity? How do you consume the response? Sendt fra min iPhone Den 25. feb. 2015 kl. 17.26 skrev Alessandro Manzoni manzoni.alessand...@gmail.com: I made a simple client that sends a xml stream to a

Re: Support for http 2.0

2015-02-24 Thread Stefan Magnus Landrø
What do you mean by simpler? Sendt fra min iPhone Den 24. feb. 2015 kl. 20.46 skrev Tony Anecito adanec...@yahoo.com.INVALID: My guess is IT and developers will be pushed to quickly use the new standard and bypass HC to use a simpler solution in the interim. Regards,-Tony On

Re: How to make http client to use the Protocol TLSv1 and not TLSv1.2

2015-02-19 Thread Stefan Magnus Landrø
Are you saying you can crash one client (3.x) by using a different client (4.x) ? Wouldn't that rather be a serious server issue? Are you running both clients from the same jvm? Are you aware of the security flaws in tlsv1 (or don't they affect your use case?) Stefan Sendt fra min iPhone

Re: Upload Performance

2015-01-26 Thread Stefan Magnus Landrø
Has the buffer size been changed on either client or server? Den 27. jan. 2015 kl. 03.46 skrev Lansing, Carina S carina.lans...@pnnl.gov: Hi All, We recently upgraded from commons-httpclient (3.1) to httpcomponents-client (4.3.6) in order to support proxies with NTLM authentication.

Re: HTTP 2 and Apache HTTP client

2015-01-08 Thread Stefan Magnus Landrø
Maybe consider jetty instead? https://github.com/eclipse/jetty.project/blob/jetty-http2/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/Client.java Sendt fra min iPhone Den 8. jan. 2015 kl. 23.28 skrev Shawn Heisey apa...@elyograg.org: On 1/8/2015 7:20 AM, Oleg

Re: MultipartEntityBuilder limitations

2014-12-23 Thread Stefan Magnus Landrø
Thanks! Sendt fra min iPhone Den 23. des. 2014 kl. 21.43 skrev Oleg Kalnichevski ol...@apache.org: On Tue, 2014-12-02 at 12:55 +0100, Stefan Magnus Landrø wrote: Hi, I had a go with 4.4-b1. I need to generate a header similar the following: Content-Type: multipart/related; type

Re: PoolingHttpClientConnectionManager leaking connections

2014-12-16 Thread Stefan Magnus Landrø
Connmgr.releaseConnection Sendt fra min iPhone Den 16. des. 2014 kl. 18.25 skrev Maurice MILLS maurice.mi...@externe.bnpparibas.com: I don't want to put an invalid connection back into the pool. I want to put the connection I just finished using, that should still be valid, back into

MultipartEntityBuilder limitations

2014-12-02 Thread Stefan Magnus Landrø
Hi there, I see the MultipartEntityBuilder is rather limited in functionality (I'm trying to create a soap with attachments request - EBMS style) For instance, it is currently impossible to set the subtype. There are other missing features too. Is it ok to provide pull request over at github?

Re: MultipartEntityBuilder limitations

2014-12-02 Thread Stefan Magnus Landrø
ok. Great. How stable is the 4.4 line? Would it be ok to use for prime time if we test our use cases well? 2014-12-02 11:03 GMT+01:00 Oleg Kalnichevski ol...@apache.org: On Tue, 2014-12-02 at 10:48 +0100, Stefan Magnus Landrø wrote: Hi there, I see the MultipartEntityBuilder is rather

Re: MultipartEntityBuilder limitations

2014-12-02 Thread Stefan Magnus Landrø
like this: ContentBody attachment = new InputStreamBody(inputStream, contentType).addHeader(Content-ID, uuid).addHeader(...); .addPart(attachment) Cheers, Stefan 2014-12-02 11:03 GMT+01:00 Oleg Kalnichevski ol...@apache.org: On Tue, 2014-12-02 at 10:48 +0100, Stefan Magnus Landrø wrote: Hi

Re: MultipartEntityBuilder limitations

2014-12-02 Thread Stefan Magnus Landrø
I'd love to, but EBMS requires SwA (no XOP) 2014-12-02 14:30 GMT+01:00 Michael Osipov micha...@apache.org: Am 2014-12-02 um 10:48 schrieb Stefan Magnus Landrø: Hi there, I see the MultipartEntityBuilder is rather limited in functionality (I'm trying to create a soap with attachments