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? S

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 : > On Tue, 2014-12-02 at 10:48 +0100, Stefan Magnus Landrø wrote: > > Hi there, > > > > I see the MultipartEntityBuilder

Re: MultipartEntityBuilder limitations

2014-12-02 Thread Stefan Magnus Landrø
sition header is not used at all). It think it would be better with an api that looks something like this: ContentBody attachment = new InputStreamBody(inputStream, contentType).addHeader("Content-ID", "uuid").addHeader(...); .addPart(attachment) Cheers, Stefan 2014-12-02

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 : > 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 creat

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 > : > > 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 > the pool so I can reuse it aga

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 : > >> 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: &g

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 : > >> On 1/8/2015 7:20 AM, Oleg Kalnichevski wrote: >>

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 : > > Hi All, > > We recently upgraded from commons-httpclient (3.1) to httpcomponents-client > (4.3.6) in order to support proxies with NTLM authentication. We also > converte

Re: HTTPClient is not loading a page

2015-02-14 Thread Stefan Magnus Landrø
Maybe use a different user-agent header? Sendt fra min iPhone > Den 14. feb. 2015 kl. 18.04 skrev jeevi tesh : > > Hi, > Below URL's web page content I'm not able to get using httpclient. Please > help me in this regard > http://parts.arrow.com/item/search/?utm_campaign=arrowMain&utm_medium=link

Re: The two ways to use HttpClient

2015-02-15 Thread Stefan Magnus Landrø
What exactly is your use case? Load testing? Sendt fra min iPhone > Den 15. feb. 2015 kl. 04.55 skrev "bit1...@163.com" : > > Can someone take a look at my question, thanks. > > > > > > From: bit1...@163.com > Date: 2015-02-09 17:10 > To: httpclient-users > Subject: The two ways to use Htt

Re: HTTPClient is not loading a page

2015-02-16 Thread Stefan Magnus Landrø
ttpclient = HttpClientBuilder.create().setRedirectStrategy(new > LaxRedirectStrategy()).build(); > httget.setHeader("User-Agent", "MySuperUserAgent"); > HttpResponse response = httpclient.execute(httget); > HttpEntity entity = response.getEntity(); > String thirdPartyPageCont

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 > De

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 : > > 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 Tuesday, February 24, 20

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 > : > > I made a simple client that sends a xml stream to a webapp running on tomcat > 7

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 : > 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 approp

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Stefan Magnus Landrø
> Post a wire log 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 > > >> : > > >> I

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-02-26 Thread Stefan Magnus Landrø
Try http://www.tcpdump.org/manpages/tcpdump.1.html in case the simple wire logging thing doesn't work out for you. You can restrict interface and destination port to reduce impact on production. 2015-02-26 13:06 GMT+01:00 Alessandro Manzoni : > Il 26.02.2015 11.59, Stefan Magnus L

Re: 400 bad request POSTing to Tomcat 7.0.42

2015-03-02 Thread Stefan Magnus Landrø
what's the encoding used by the tomcat jvm? If it's let's say ISO 8859-1 that would explain everything. Sendt fra min iPhone > Den 2. mar. 2015 kl. 11.45 skrev Alessandro Manzoni > : > > Using InputStreamEntity and forcing UFF-8 as enconding in HttpPost the > problem was solved. InputStreamE

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 : > > Hi, > > My application uses commons-httpclient 3.1 to make post request to tomcat > hosted application. The lates

Re: HttpClient timeouts

2015-03-27 Thread Stefan Magnus Landrø
Have you had a look at the async client? Stefan 2015-03-27 17:03 GMT+01:00 Huston, Jeff (Omaha) : > Hi, relatively new to HttpClient here. So I can setup server connect, > socket, and connection pool time outs via the various RequestConfig methods > (setSocketTimeout, setConnectTimeout, setCon

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 : > 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 established in short

Re: HTTPClient 4.3.6 : SSL Session reuse

2015-04-15 Thread Stefan Magnus Landrø
of 12 connections. > > > > We are looking to reuse same SSL context for these 12 requests. > > > > Are you using mutual SSL authentication by any chance? > > Oleg > > > Thank you. > > On Apr 15, 2015 10:12 AM, "Stefan Magnus Landrø" < > stefa

Re: HTTPClient 4.3.6 : SSL Session reuse

2015-04-15 Thread Stefan Magnus Landrø
A tcpdump from the server would help too Sendt fra min iPhone > Den 15. apr. 2015 kl. 19.48 skrev Oleg Kalnichevski : > > On Wed, 2015-04-15 at 13:38 -0400, Ryan Fulghum wrote: >>> Are you using mutual SSL authentication by any chance? >> >> I don't think so. This is an Android client relying o

Re: HTTPClient 4.3.6 : SSL Session reuse

2015-04-16 Thread Stefan Magnus Landrø
re if we can get TCP dump from server though; > On Apr 15, 2015 3:07 PM, "Stefan Magnus Landrø" > wrote: > >> A tcpdump from the server would help too >> >> Sendt fra min iPhone >> >>> Den 15. apr. 2015 kl. 19.48 skrev Oleg Kalnichevski :

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 : > On Fri, 2015-04-24 at 13:22 +0200, Joan Balagueró wrote: > > Hello, > > > > Regarding th

Re: Strange SSL error

2015-05-08 Thread Stefan Magnus Landrø
Looks like a tcp reset to me Sendt fra min iPhone > Den 8. mai 2015 kl. 22.49 skrev Mark A. Claassen : > > We are having one user that is getting this sporadically. No one else can > reproduce it. Any idea what might be causing it? Because it is hard to > reproduce, I am having trouble know

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 : > > 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 httpclient > codebase.

Re: Strange SSL error

2015-05-11 Thread Stefan Magnus Landrø
> > Donnell Systems, Inc. > 130 South 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

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 : > > Here is the trace messages from the HTTPClient library and a wireshark > capture. As I said earlier, this doesn't happen all the time. > > Thanks. > > https://

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 : > What happens at this point is we have tried to issue an HTTP GET (but > nothing goes out on the wire) and there's no timeout or excepti

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: 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 : > 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 async > client at the

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: Reg: HttpClient - POST with InputStreamEntity

2015-05-26 Thread Stefan Magnus Landrø
Flex because the > same is working in production with commons httpclient 3.1. > > Thanks, > Bhuvaneswari > > -Original Message- > From: Stefan Magnus Landrø [mailto:stefan.lan...@gmail.com] > Sent: Tuesday, May 26, 2015 5:23 PM > To: HttpClient User Discussion > Sub

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? Are

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

2015-05-28 Thread Stefan Magnus Landrø
What logging framework are you using? 2015-05-28 23:43 GMT+02:00 Emiliano Carlesi : > Hi to all, > I have a problem I can't understand related to the execution of HttpClient > 4 within a web application running in Tomcat + Struts2. > > I create an HTTP client for a specific site that uses basic a

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ø : > 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

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

2015-05-28 Thread Stefan Magnus Landrø
rl...@itattitude.com > Mobile: +39 3487837153 > Phone: +39 0650939115 > > > > -----Original Message- > From: Stefan Magnus Landrø [mailto:stefan.lan...@gmail.com] > Sent: Friday, May 29, 2015 12:00 AM > To: HttpClient User Discussion > Subject: Re: There are

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

2015-05-28 Thread Stefan Magnus Landrø
pache.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

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 : > I am using Spring RestTemplate to make a HTTP Calls to my RestService. I am > using sp

Re: MultiThreadedConnectionManager

2015-06-15 Thread Stefan Magnus Landrø
Stacktrace? > Den 15. jun. 2015 kl. 21.43 skrev Erik Stansbury > : > > 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 httpclient 4.3.5. Thanks for the

Re: NoHttpResponseException: :443 failed to respond

2015-07-01 Thread Stefan Magnus Landrø
Like a firewall killing connections? If you perform a tcpdump, you should be able to see what's going on 2015-07-01 13:08 GMT+02:00 Oleg Kalnichevski : > On Wed, 2015-07-01 at 16:35 +0530, Ravi C Chamarthy wrote: > > Ok. Thanks Oleg. > > Going by the similarity of the trace, thought it is related

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 : > 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. > > I want to to

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 : > Sorry, I don't understand what you mean? > > On 6 July 2015 at 10:17, Stefan Magnus Landrø > wrote: > > > try with resources in java wil

Re: httpclient4 is extremely slow than correpsoning code of HttpClient3

2015-07-07 Thread Stefan Magnus Landrø
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" : > > > Can someone kindly help me on this? Thanks a lot! > > > > > bit1...@163.com > > From: bit1...@163.com > Date: 2015-07-07 20:51 > To: httpclient-

Re: httpclient4 is extremely slow than correpsoning code of HttpClient3

2015-07-07 Thread Stefan Magnus Landrø
>> try{ >> CloseableHttpClient httpclient = Try with resources will close client Sendt fra min iPhone > Den 7. jul. 2015 kl. 16.59 skrev Todd : > > Thanks Stefan for the reply. Could you please point to me which code you are > referring to? > > > > At

Re: httpclient4 is extremely slow than correpsoning code of HttpClient3

2015-07-07 Thread Stefan Magnus Landrø
at I move the CloseableHttpClient out of the try block like >> following, >> >> public String execute(HttpGet httpGet) { >> String body = ""; >> CloseableHttpClient httpclient = this.getHttpclient(); >> try{ >> CloseableHttpResponse response =

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

2015-07-08 Thread Stefan Magnus Landrø
e) > > > > Thanks very much for you guys's time on this!! > > > > > > > > > > > > bit1...@163.com > > > > From: Stefan Magnus Landrø > > Date: 2015-07-08 12:58 > > To: HttpClient User Discussion > > Subject:

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

2015-07-08 Thread Stefan Magnus Landrø
t; 3548(>1000) > 7072(>1000) > 10038(>1000) > 263 > 25 > 25 > 25 > 248 > 24 > 25 > 26 > 31 > 246 > 26 > 244 > 456 > 26 > 26 > 25 > 26 > 237 > 25 > 238 > 446 > 27 > 25 > 234 > 28 > > > > > > &g

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

2015-07-08 Thread Stefan Magnus Landrø
urrences that > are a little 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 co

Re: Do I need to worry about NoHttpResponseException?

2015-07-13 Thread Stefan Magnus Landrø
Your server is overloaded or persistent connections got shutdown by a fw Sendt fra min iPhone > Den 13. jul. 2015 kl. 09.58 skrev Check Peck : > > Does anyone have any idea on this? > >> On Sat, Jul 11, 2015 at 6:24 PM, Check Peck wrote: >> >> I am using Apache HttpClient 4.5 version in my l

Re: Do I need to worry about NoHttpResponseException?

2015-07-14 Thread Stefan Magnus Landrø
allows long lived connections > Any idea? > > On Mon, Jul 13, 2015 at 1:56 AM, Stefan Magnus Landrø < > stefan.lan...@gmail.com> wrote: > >> Your server is overloaded or persistent connections got shutdown by a fw >> >> Sendt fra min iPhone >> >>

Re: intermittent org.apache.http.ConnectionClosedException:

2015-08-20 Thread Stefan Magnus Landrø
Sendt fra min iPhone > Den 20. aug. 2015 kl. 21.06 skrev Shushant Arora : > > A doubt regarding async client - does it sends the request on same > connection before waiting for repose of previous request on same connection No request multiplexing in http 1.1 > ? Or it will reuse the connectio

Re: intermittent org.apache.http.ConnectionClosedException:

2015-08-20 Thread Stefan Magnus Landrø
gt; On Fri, Aug 21, 2015 at 2:12 AM, Stefan Magnus Landrø < > stefan.lan...@gmail.com> wrote: > >> >> >> Sendt fra min iPhone >> >>>> Den 20. aug. 2015 kl. 21.06 skrev Shushant Arora < >>> shushantaror...@gmail.com>: >>> &

Re: intermittent org.apache.http.ConnectionClosedException:

2015-08-22 Thread Stefan Magnus Landrø
>>> Thanks ! >>> >>> shall the value of tcp_fin_timeout be reduced(from default 60 to 30) in >>> heavy concurrent requests? >> >> Heavy? What do you mean? >> >>> Does it have any side affect? >> >> Seriously? >>

Re: intermittent org.apache.http.ConnectionClosedException:

2015-08-22 Thread Stefan Magnus Landrø
Clientobject using > PoolingNHttpClientConnectionManager .So > object should stay till JVM is not crashed but connections are gone not > able to understand ? > > Can you elabborate ? > > On Sat, Aug 22, 2015 at 1:21 PM, Stefan Magnus Landrø < > stefan.lan...@gmail.com> wro

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 : > > Hello > > How do I determine the optimal settings for maxTotal and defaultMaxPerRoute > for a PoolingHttpClientConnectionManager? > > Thanks > > Mak > >

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 : > > No SSL. > > 50. > >> On 24/08/15 13:24, Stefan Magnus Landrø wrote: >> How many requests do you perform per second? Ssl

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 : > > 305ms Avg > 518ms 90% > >> On 24/08/15 14:23, Stefan Magnus Landrø wrote: >> What do the response t

Re: Async problem with GET

2015-08-31 Thread Stefan Magnus Landrø
Sendt fra min iPhone > Den 31. aug. 2015 kl. 09.48 skrev Graeme Wallace > : > > 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 fairly regular > basis - maybe a query every minute or so. > > After about 8 ho

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 fairly regular >>

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 : > >> 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 Kalnichevski : >>&g

Re: HttpClient with Post and an https address

2015-09-02 Thread Stefan Magnus Landrø
Pretty much, yes Sendt fra min iPhone > Den 3. sep. 2015 kl. 00.25 skrev LgM Michael : > > I’m attempting to establish an https connection and perform a POST. The > examples I’ve seen show a somewhat solution where the URL of the HttpPost is > an https url. (HttpPost post = new HttpPost(“htt

Re: Getting SocketTimeoutException after a very short amount of time

2015-09-04 Thread Stefan Magnus Landrø
Could you use SocketConfig? Sendt fra min iPhone > Den 4. sep. 2015 kl. 19.52 skrev Shawn Heisey : > >> On 9/4/2015 11:39 AM, Shawn Heisey wrote: >> I must be creating the client objects incorrectly for the "set socket >> timeout" message to never be logged. > > I checked the ClientConfiguratio

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: > > Hi there, > > > >

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 implementa

Re: unable to log using log4j for httpclient4.1.3 in JBoss EAP6.0

2015-09-08 Thread Stefan Magnus Landrø
Isn't this rather a log4j issue? Sendt fra min iPhone > Den 9. sep. 2015 kl. 04.23 skrev Tony : > > Hi, > > We are using slf4j&log4j for our web application logging, and we put the > log4j.xml file out of our WAR file so that any changes to the log4j.xml > will be read by our scheduler(every 1

Re: unable to log using log4j for httpclient4.1.3 in JBoss EAP6.0

2015-09-09 Thread Stefan Magnus Landrø
more of a combination. I just want to see if anyone has > > similar problem and can shed some light. > > > > On Wed, Sep 9, 2015 at 2:05 AM, Stefan Magnus Landrø < > > stefan.lan...@gmail.com> wrote: > > > > > Isn't this rather a log4j issue? >

Re: unable to log using log4j for httpclient4.1.3 in JBoss EAP6.0

2015-09-09 Thread Stefan Magnus Landrø
link is for JBoss AS 4, 5 and 6, ours is JBoss EAP 6, i.e. AS 7. > ok. some of the things probably still apply. Classloader priority/isolation for instance? > > On Wed, Sep 9, 2015 at 3:01 PM, Stefan Magnus Landrø < > stefan.lan...@gmail.com> wrote: > > > H

Re: unable to log using log4j for httpclient4.1.3 in JBoss EAP6.0

2015-09-09 Thread Stefan Magnus Landrø
now httpclient uses commons logging. > > Yes, Classloader priority/isolation is the area I'm focusing now. > > On Wed, Sep 9, 2015 at 3:47 PM, Stefan Magnus Landrø < > stefan.lan...@gmail.com> wrote: > > > 2015-09-09 21:26 GMT+02:00 Tony : > > > > > Wit

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 list of > kazillion are b

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 rea

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: https://github.com/apache/httpclient/blob/trunk/httpclient/src/main/java/org/apache/h

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

2015-10-14 Thread Stefan Magnus Landrø
ad 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/httpclient/blob/tr

Multipart Mixed

2016-06-02 Thread Stefan Magnus Landrø
Hi there, We're struggeling with some limitations in the current multipart implementation in 4.5 (latest). The MultipartEntityBuilder is actually building a MultipartFormEntity, whereas we actually want to be able to build a multipart/mixed entity which does have limitations with respect to files

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 nam

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 explaining > the proble

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 4.1.2. I've had this work

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 PoolingNHttpClientConnectionManager (v 4.

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 > wrote: > > > On Mon

Re: Disabling pooling of PoolingConnectionManager

2016-10-18 Thread Stefan Magnus Landrø
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 would you think so

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: SSL Handshake : timing and timeout

2016-11-11 Thread Stefan Magnus Landrø
hanks > > 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...@apache.org > > >: > >

Re: SSL Handshake : timing and timeout

2016-11-11 Thread Stefan Magnus Landrø
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/org/apache/http/impl/client/HttpClie