Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 71918 invoked from network); 19 Oct 2004 22:08:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 19 Oct 2004 22:08:12 -0000 Received: (qmail 77908 invoked by uid 500); 19 Oct 2004 22:08:10 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 77843 invoked by uid 500); 19 Oct 2004 22:08:09 -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 77829 invoked by uid 99); 19 Oct 2004 22:08:09 -0000 X-ASF-Spam-Status: No, hits=1.5 required=10.0 tests=DNS_FROM_RFC_POST X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [64.4.37.27] (HELO hotmail.com) (64.4.37.27) by apache.org (qpsmtpd/0.28) with ESMTP; Tue, 19 Oct 2004 15:08:09 -0700 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 19 Oct 2004 15:05:18 -0700 Received: from 199.46.199.233 by by10fd.bay10.hotmail.msn.com with HTTP; Tue, 19 Oct 2004 22:04:12 GMT X-Originating-IP: [199.46.199.233] X-Originating-Email: [jarvisnicholas@hotmail.com] X-Sender: jarvisnicholas@hotmail.com From: "Nick Jarvis" To: commons-httpclient-dev@jakarta.apache.org Bcc: Subject: Re: HTTP Version Not Supported Error Date: Tue, 19 Oct 2004 18:04:12 -0400 Mime-Version: 1.0 Content-Type: text/plain; format=flowed Message-ID: X-OriginalArrivalTime: 19 Oct 2004 22:05:18.0184 (UTC) FILETIME=[B818F680:01C4B627] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Mike, I have taken your advise and set the content length manually sending in the length of a file even if it is larger than 2 gigs. I am getting a bug however when uploading over 2 gigs still. It seems that the server is blocking the read function for the ServletInputStream. I get a socket read time out exception thrown. When I look at the bytes that were written and the length of the file, the bytes that were written seem to be more than the length of the file. This only occurs for files over 2 gigs. I tested multiple files, (512 MB, 1.8 GB, 2.0 GB). On the client side I have checked my code for the file input stream and writing of the bytes to the request output stream. The bytes I am writing are consistent with the length of the file, yet I am having this trouble on the server side. I am using HttpServlet on the server side of my application. I am getting the input stream from the request input stream, I am creating a file output stream, and I am writing to the file. I believe that the HttpServlet should be compatible with HTTP 1.1. Still, from my previous threading problem I had to set the setHttp11 function to false so that I do not get the upload error I stated before. Sorry for the questions, but I have tried fixing this and understanding it to no avail. I appreciate any help that you could give me. Thanks for your time, N. Jarvis >From: Michael Becke >Reply-To: "Commons HttpClient Project" > >To: Commons HttpClient Project >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 length > >2GB because of the use of an int. This has been fixed in the 3.0 API but >it can be done in 2.0 by setting the content-length header manually: > >method.setRequestHeader("Content-Length", "Some number bigger than 2GB"); > >Mike > >--------------------------------------------------------------------- >To unsubscribe, e-mail: >commons-httpclient-dev-unsubscribe@jakarta.apache.org >For additional commands, e-mail: >commons-httpclient-dev-help@jakarta.apache.org > _________________________________________________________________ FREE pop-up blocking with the new MSN Toolbar � get it now! http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/ --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org