Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 3160 invoked from network); 20 Oct 2004 02:37:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 20 Oct 2004 02:37:02 -0000 Received: (qmail 66912 invoked by uid 500); 20 Oct 2004 02:36:45 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 66880 invoked by uid 500); 20 Oct 2004 02:36:44 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 66855 invoked by uid 99); 20 Oct 2004 02:36:43 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [140.142.32.134] (HELO mxout1.cac.washington.edu) (140.142.32.134) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 19 Oct 2004 19:36:41 -0700 Received: from smtp.washington.edu (smtp.washington.edu [140.142.32.139]) by mxout1.cac.washington.edu (8.13.1+UW04.08/8.13.1+UW04.08) with ESMTP id i9K2aaJL032332 for ; Tue, 19 Oct 2004 19:36:36 -0700 Received: from [10.0.1.2] (pool-70-19-177-91.bos.east.verizon.net [70.19.177.91]) (authenticated bits=0) by smtp.washington.edu (8.13.1+UW04.08/8.13.1+UW04.08) with ESMTP id i9K2aYeA014035 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Tue, 19 Oct 2004 19:36:35 -0700 Mime-Version: 1.0 (Apple Message framework v619) In-Reply-To: References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-Id: Content-Transfer-Encoding: quoted-printable From: Michael Becke Subject: Re: HTTP Version Not Supported Error Date: Tue, 19 Oct 2004 22:36:32 -0400 To: "Commons HttpClient Project" X-Mailer: Apple Mail (2.619) X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Hi Nick, Sounds like there may be a problem with the server side. What server=20 are you using? Mike On Oct 19, 2004, at 6:04 PM, Nick Jarvis wrote: > Mike, > I have taken your advise and set the content length manually sending=20= > in the length of a file even if it is larger than 2 gigs. I am=20 > getting a bug however when uploading over 2 gigs still. It seems that=20= > the server is blocking the read function for the ServletInputStream. =20= > I get a socket read time out exception thrown. When I look at the=20 > bytes that were written and the length of the file, the bytes that=20 > were written seem to be more than the length of the file. This only=20= > occurs for files over 2 gigs. I tested multiple files, (512 MB, 1.8=20= > GB, 2.0 GB). On the client side I have checked my code for the file=20= > input stream and writing of the bytes to the request output stream. =20= > The bytes I am writing are consistent with the length of the file, yet=20= > I am having this trouble on the server side. I am using HttpServlet=20= > on the server side of my application. I am getting the input stream=20= > from the request input stream, I am creating a file output stream, and=20= > I am writing to the file. I believe that the HttpServlet should be=20 > compatible with HTTP 1.1. Still, from my previous threading problem I=20= > had to set the setHttp11 function to false so that I do not get the=20 > upload error I stated before. Sorry for the questions, but I have=20 > tried fixing this and understanding it to no avail. I appreciate any=20= > help that you could give me. Thanks for your time, > > N. Jarvis > >> From: Michael Becke >> Reply-To: "Commons HttpClient Project"=20 >> >> To: Commons HttpClient Project=20 >> >> Subject: Re: HTTP Version Not Supported Error >> Date: Mon, 18 Oct 2004 11:10:48 -0400 >> >> Hi Nick, >> >> I have one addition to Roland's comments. >> >>> b) Don't call setContentLength, or set it to -1 in a >>> FilePart object. This should work fine with HTTP/1.1 >>> and chunked encoding, but also with HTTP/1.0 and >>> no chunked encoding. Since the server does not know >>> the content length in advance, it has to read until the >>> end of the stream in no-chunks mode. Connection >>> re-use is impossible, but after transferring more than >>> 2 gigs I doubt you'll notice the performance impact >>> of opening a new connection :-) >>> It might be a violation of HTTP to POST data without >>> a valid content length, but since you're controlling >>> the server as well, that shouldn't bother you much. >> >> The HttpClient 2.0 API does not directly support setting content=20 >> length > 2GB because of the use of an int. This has been fixed in=20 >> the 3.0 API but it can be done in 2.0 by setting the content-length=20= >> header manually: >> >> method.setRequestHeader("Content-Length", "Some number bigger than=20 >> 2GB"); >> >> Mike >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail:=20 >> commons-httpclient-dev-unsubscribe@jakarta.apache.org >> For additional commands, e-mail:=20 >> commons-httpclient-dev-help@jakarta.apache.org >> > > _________________________________________________________________ > FREE pop-up blocking with the new MSN Toolbar =96 get it now!=20 > http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ > > > --------------------------------------------------------------------- > To unsubscribe, e-mail:=20 > commons-httpclient-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail:=20 > commons-httpclient-dev-help@jakarta.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org