hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Seebregts" <to...@cibecs.com>
Subject RE: Unbuffered entity enclosing request can not be repeated
Date Thu, 09 Jun 2005 15:18:10 GMT
Hi Roland,

Thanks for the suggestion - have just tried it though and I still get the
double writeRequestBody() call. 

Hmmm ... wonder if its not a web server issue perhaps.

Regards

Tony


-----Original Message-----
From: Roland Weber [mailto:ROLWEBER@de.ibm.com] 
Sent: 9 June 2005 17:04
To: HttpClient User Discussion
Subject: Re: Unbuffered entity enclosing request can not be repeated

Hello Tony,

enable the expect-continue handshake. Then the client
gets the "authentication required" response before it
tries to send the body. 

Sorry, I don't have the method name at hand.

hope that helps anyway,
  Roland




"Tony Seebregts" <tonys@cibecs.com> 
09.06.2005 16:45
Please respond to
"HttpClient User Discussion"


To
<httpclient-user@jakarta.apache.org>
cc

Subject
Unbuffered entity enclosing request can not be repeated






Hi,

 

I'm using the HttpClient to POST a request to the server with the
Content-Length set to CONTENT_LENGTH_CHUNKED.

 

It works fine with pre-emptive BASIC authentication but fails with an
"Unbuffered entity enclosing request 
can not be repeated" with anything else.

 

Tracing the request it seems that the HttpClient attempts to read the
request body twice - at a guess before the authentication

challenge and then again when authenticated.

 

The workaround I have for now is to 'ignore' the first request (actually
send an empty body) and then send the real data

through on the second writeRequestBody() call. 

 

This seems more than a bit flaky - does anybody have a better solution ?

 

Regards

 

Tony Seebregts




---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Mime
View raw message