Return-Path: Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 1405 invoked from network); 2 Apr 2003 13:37:08 -0000 Received: from mailgate.sabre-ots.com (HELO postoffice.sabre-ots.com) (62.17.165.2) by daedalus.apache.org with SMTP; 2 Apr 2003 13:37:08 -0000 Received: (qmail 13871 invoked from network); 2 Apr 2003 13:37:02 -0000 Received: from postoffice.sabre-ots.com (HELO silke.wdc.dublin.sabre-ots.com) (qmailr@62.17.165.141) by mailgate.sabre-ots.com with SMTP; 2 Apr 2003 13:37:02 -0000 Received: (qmail 27041 invoked from network); 2 Apr 2003 13:37:07 -0000 Received: from busby.hq.dublin.sabre-ots.com (HELO sabre.com) (10.135.129.55) by silke.wdc.dublin.sabre-ots.com with SMTP; 2 Apr 2003 13:37:07 -0000 Message-ID: <3E8AE592.8020208@sabre.com> Date: Wed, 02 Apr 2003 14:28:50 +0100 From: Padraig O'hIceadha Organization: Sabre OTS User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030307 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Commons HttpClient Project Subject: Re: Problem encountered posting large files References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Oleg, This all looks fine. I'd guess Sergio Berna is right and the problem lies with the WebLogic proxy plugin rather than with HttpClient. Thanks, Padraig Kalnichevski, Oleg wrote: >Hi Padraig > >I just checked the way HttpClient handles request content-length header and it appears reasonable to me. > > > >... > > protected void addContentLengthRequestHeader(HttpState state, > HttpConnection conn) > throws IOException, HttpException { > LOG.trace("enter HttpMethodBase.addContentLengthRequestHeader(" > + "HttpState, HttpConnection)"); > > // add content length or chunking > int len = getRequestContentLength(); > if (getRequestHeader("content-length") == null) { > if (0 < len) { > setRequestHeader("Content-Length", String.valueOf(len)); > } else if (http11 && (len < 0)) { > setRequestHeader("Transfer-Encoding", "chunked"); > } > } > } >... > > > >I have not had any exposure to iPlanet Web server. However, I have been working quite heavily with WebSphere Application server which is also reliant on a conceptually similar plug-in architecture for its HTTP tunnelling. I have had any problems so far. The quality of HTTP spec compliance varies among HTTP & application server vendors. So far we have been resisting the pressure to optimise HttpClient for any specific HTTP dialect. > >I do feel any measures should be taken on the part of HttpClient development team in this particular case. Please let me know if you see it differently > >Cheers > >Oleg > > > > > > > >-----Original Message----- >From: Padraig O'hIceadha [mailto:Padraig.OhIceadha@sabre.com] >Sent: Dienstag, 1. April 2003 14:39 >To: Commons HttpClient Project >Subject: Re: Problem encountered posting large files > > >Hi Oleg, > > There ia also an additional case I have seen. WebLogic is often >deployed on a seperate server to the web server. In this case a web >server plugin is used to forward any requests which must be handled by >the app server. > > For example for iPlanet there is an NCSAPI plugin which reads the >request and then resends it to the app server. If you send a large >request which does not have a Content-Length set then the NCSAPI plugin >can perform very poorly as it doesn't seem to do a good job of detecting >if the client has finished sending before it starts sending the data on >to the app server. > > I suppose the wire log should show exactly what HttpClient is >sending to the server. > > Regards, > > > Padraig > >Kalnichevski, Oleg wrote: > > > >>Hi Padraig >> >>I am glad you have gotten a handle on this problem. I suppose older versions of WebLogic HTTP server have issues with chunk-encoding content. This is exactly the case when 'Content-Length' header MUST NOT be sent to the server according to the HTTP/1.1 spec. Under all other circumstances HttpClient either relies on an explicitly specified content length value or calculates it automatically by buffering the request body. >> >>Cheers >> >>Oleg >> >>-----Original Message----- >>From: Padraig O'hIceadha [mailto:Padraig.OhIceadha@sabre.com] >>Sent: Tuesday, April 01, 2003 14:08 >>To: Commons HttpClient Project >>Subject: Re: Problem encountered posting large files >> >> >>Hi Oleg, >> >>Oleg Kalnichevski wrote: >> >> >> >> >> >>>Gourav, >>> >>>We will have difficulties addressing this problem unless we know how it >>>can be reliably reproduced. So, we will need your help on that. A JUnit >>>test case reproducing the problem would be ideals >>> >>>More questions: >>>- what platform are you using on the client-side and on the server-side? >>>- are you using chunk-encoding or not? >>>- if not, are you explicitly specifying the content length or not? >>> >>> >>> >>> >>> >> If the server is WebLogic I have found that it is extremely >>important for the request to have a valid ContentLength for the server >>to process it efficiently, so this could be very relevant. >> >> Regards, >> >> Padraig >> >> >> >> >> >>>- are you sure that HttpClient does try to buffer the request in order >>>to be able to determine its size? >>>- have you tried posting large files to Tomcat servlet engine running on >>>the same platform? I have not tried it myself, but I believe quite a few >>>people have been successfully using HttpClient to post massive files >>> >>>Cheers >>> >>>Oleg >>> >>> >>>On Mon, 2003-03-10 at 23:06, Pani, Gourav wrote: >>> >>> >>> >>> >>> >>> >>>>Oleg, >>>> >>>>- The HttpClient takes a lot longer to post large files as opposed to using >>>>a raw socket. >>>>- The header on the HTTP Server is as follows >>>> HTTP/1.0 200 OK >>>> Date: Mon, 10 Mar 2003 22:02:57 GMT >>>> Server: WebLogic WebLogic Temporary Patch for CR072964 04/03/2002 >>>>10:26:28 >>>> Content-Length: 0 >>>> Content-Type: text/xml >>>> Connection: Close >>>>- We do not get any exceptions because it keeps trying to post and then the >>>>thread hangs. Finally, I just have to kill the thread. >>>> >>>> >>>>Thanks, >>>>Gourav >>>> >>>> >>>>-----Original Message----- >>>>From: Oleg Kalnichevski [mailto:o.kalnichevski@dplanet.ch] >>>>Sent: Monday, March 10, 2003 5:00 PM >>>>To: Commons HttpClient Project >>>>Subject: Re: Problem encountered posting large files >>>> >>>> >>>>Gourav, >>>> >>>>Help us understand the problem better: >>>>- Are you saying that it takes longer to post a large file using >>>>HttpClient compared to using a raw socket? >>>>- What kind of HTTP server are you posting your request to? >>>>- What kind of exception are you getting? Can you post the the call >>>>stack of that exception? >>>> >>>>Oleg >>>> >>>>On Mon, 2003-03-10 at 22:36, Pani, Gourav wrote: >>>> >>>> >>>> >>>> >>>> >>>> >>>>>I am using HttpClient release 2.0 Alpha 3 using J2SDK1.4.1_01 . When I >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>try >>>> >>>> >>>> >>>> >>>> >>>> >>>>>posting large files greater than 2MB using the PostXML.java example, I see >>>>>the packets going across and get responses back but it takes extremely >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>long >>>> >>>> >>>> >>>> >>>> >>>> >>>>>sending the data and in the process, the connection times out. >>>>> >>>>>I managed to successfully post and receive a response using the Socket >>>>>object in a different test program. >>>>> >>>>>Any help is greatly appreciated. >>>>> >>>>>Thanks in Advance. >>>>> >>>>>Gourav >>>>> >>>>> >>>>> >>>>> >>>>>--------------------------------------------------------------------- >>>>>To unsubscribe, e-mail: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>commons-httpclient-dev-unsubscribe@jakarta.apache.org >>>> >>>> >>>> >>>> >>>> >>>> >>>>>For additional commands, e-mail: >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>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 >>>> >>>>--------------------------------------------------------------------- >>>>To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org >>>>For additional commands, e-mail: 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 >>> >>> >>> >>> >>> >>> >>> >>> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org >>For additional commands, e-mail: 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 >> >> >> >> >> >> > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org >For additional commands, e-mail: 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 > > > >