RE: HTTP Trailers in HttpClient 4.0.1

2010-02-03 Thread Ben Cox
Ah, getting there - almost! I was making the mistake of trying to cast the InputStream of a BufferedHttpEntity. If I instead try response.getEntity().getContent() (i.e. work with the BasicManagedEntity that it gives me) I get an EofSensorInputStream which, I can see in debug, wraps a ChunkedIn

Re: Apache httpclient read timeout

2010-02-03 Thread Oleg Kalnichevski
Learn Learn wrote: Oleg, That's right, but is there a way I can do a "request" timeout? Any option in HTTPCLient that would abort a request after a time interval elapses? (time interval defined by the timeout) No, there is no such option. Oleg

Re: Apache httpclient read timeout

2010-02-03 Thread Learn Learn
Oleg, That's right, but is there a way I can do a "request" timeout? Any option in HTTPCLient that would abort a request after a time interval elapses? (time interval defined by the timeout) -- View this message in context: http://old.nabble.com/Apache-httpclient-read-timeout-tp27414268p2744478

Re: HTTP Trailers in HttpClient 4.0.1

2010-02-03 Thread Oleg Kalnichevski
Ben Cox wrote: Oleg, Thanks for your response. That's interesting - as you say, using trailers is somewhat of an edge case, though there's something to be said for using them as part of mashup-type applications in which data may be being sent over an extended period, so some state may be unkn

Re: Http Multi-part exception when using InputStreamBody

2010-02-03 Thread Yadu
> Let me elaborate on my case. I am implementing a proxy servlet which is > meant to receive multipart-form data, process data using Jakarta Commons > fileupload and make HttpPost request to some REST service. I am using > InputStreamBody for files uploaded. Code works perfectly fine when runnin

RE: Any up-to-date comparison of HttpClient vs. HttpUrlConnection?

2010-02-03 Thread KARR, DAVID (ATTCINW)
> -Original Message- > From: Oleg Kalnichevski [mailto:ol...@apache.org] > Sent: Wednesday, February 03, 2010 2:30 AM > To: HttpClient User Discussion > Subject: RE: Any up-to-date comparison of HttpClient vs. > HttpUrlConnection? > > On Sat, 2010-01-30 at 16:13 -0800, KARR, DAVID (ATTCINW

RE: HTTP Trailers in HttpClient 4.0.1

2010-02-03 Thread Ben Cox
Oleg, Thanks for your response. That's interesting - as you say, using trailers is somewhat of an edge case, though there's something to be said for using them as part of mashup-type applications in which data may be being sent over an extended period, so some state may be unknown at the begin

Re: HTTP Trailers in HttpClient 4.0.1

2010-02-03 Thread Oleg Kalnichevski
On Tue, 2010-02-02 at 21:07 +, Ben Cox wrote: > Hi all, > > I'm testing out using chunked encoding with trailing headers at the moment, > but seem to be having some problems getting the HttpClient to find the > trailers. My code looks like this: > > /

Re: Apache httpclient read timeout

2010-02-03 Thread Oleg Kalnichevski
On Mon, 2010-02-01 at 17:23 -0800, Learn Learn wrote: > Hi, > > We have an application on Servicemix that uses ApacheHTTPCLient within it to > handle http based communication. In our flows, we have defined http > endpoints with a socket timeout of 30 seconds and this usually works except > for the

RE: Any up-to-date comparison of HttpClient vs. HttpUrlConnection?

2010-02-03 Thread Oleg Kalnichevski
On Sat, 2010-01-30 at 16:13 -0800, KARR, DAVID (ATTCINW) wrote: > > -Original Message- > > From: Oleg Kalnichevski [mailto:ol...@apache.org] > > Sent: Saturday, January 30, 2010 2:40 PM > > To: HttpClient User Discussion > > Subject: RE: Any up-to-date comparison of HttpClient vs. > > HttpU