You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by Padraig O'hIceadha <Pa...@sabre.com> on 2003/04/01 14:07:50 UTC

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
>
>
>  
>