hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ROLWE...@de.ibm.com>
Subject Re: Unbuffered entity enclosing request can not be repeated
Date Thu, 09 Jun 2005 15:04:00 GMT
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



Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message