Hello Nick,

by implementing ...methods.multipart.PartSource, you can supply your
own InputStream. Using HttpMethod.getResponseBodyAsStream(),
you have direct access to the input stream of the response. What more
control do you need?

The problem you report suggests that your version of the post method
somehow fails to synchronize the connection usage. But that is hard to
diagnose if you don't send the modified source.

cheers,
  Roland





"Nick Jarvis" <[EMAIL PROTECTED]> 
14.10.2004 20:13
Please respond to
"Commons HttpClient Project"


To
[EMAIL PROTECTED]
cc

Subject
HTTP Version Not Supported Error






I am currently using HttpClient 2.0.2 and trying to create a multi 
threaded 
file upload.  I have restrictions on the project I can use , therefore I 
am 
using HttpClient MultiThreadedHttpConnectionManager that is connecting to 
the same host and I am using HttpClient PostMethod for the upload.  I am 
trying to use the PostMethod as a subclass and overide the 
WriteRequestBody 
function to have more control over the upload.  However, I am getting and 
error reading: 'HTTP Version Not Supported' from the status text for the 
third thread (for the third file that I am trying to upload after the 
previoius two are complete).  The response from the server is not pretty 
either.  I even tried copying the same exact source from the PostMetho 
class 
into a new class but I am still getting this error when running the 
method. 
I am noticing that the MultiThreadedHttpConnectionManager defaults to 2 
connections per host, and the manager seems to be blocking my third thread 

until one of the other two complete.  Once one thread is complete and 
unblocks the next thread, I am unable to upload the next file due to this 
server error.  If I increase the connections per host variable, the upload 

after the connections per host limit is returning this message.    If I 
just 
use the PostMethod or MultipartPostMethod, the uploads work fine, but I 
need 
more control over the input stream and the upload.  Could someone please 
advise.  Thank you for your time,

Nick Jarvis

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! 

hthttp://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: 
[EMAIL PROTECTED]
For additional commands, e-mail: 
[EMAIL PROTECTED]


Reply via email to