hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Guillaume Cauchon (JIRA)" <j...@apache.org>
Subject [jira] Closed: (HTTPCLIENT-785) Multipart POST seams to be truncated, causes client application to hang and file doesn't get transfered.
Date Fri, 11 Jul 2008 13:28:32 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-785?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Guillaume Cauchon closed HTTPCLIENT-785.
----------------------------------------

       Resolution: Won't Fix
    Fix Version/s: 3.1.1

After further test I found out the problem was caused by something else, which I can not understand
either but I'm able to work around it...

My client app. is built on Eclipse and the standard output (System.out and System.err) are
redirected in to custom Console so we can display many information to the user (as log4j logging
for many apache components: axis2, codegen, httpclient, etc...). What I realized is that sometime,
when to huge buffer or amount of output are made at the same time, the redirection cause my
whole app. environment to hang, many process state gets broken and unpredictable things happen!
I had the same issue in the past when logging big XML files...

Changing my logging level back to INFO or removing the output redirection both fixed my problem
so It's not a HttpClient issue!

> Multipart POST seams to be truncated, causes client application to hang and file doesn't
get transfered.
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HTTPCLIENT-785
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-785
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 3.1 Final
>         Environment: WinXP SP3, Eclipse 3.4, JDK 1.6.0_07, Tomcat 5.5.25 
>            Reporter: Guillaume Cauchon
>            Priority: Minor
>             Fix For: 3.1.1
>
>         Attachments: Browser-POST.txt, HttpClient-POST.txt
>
>
> I'm using the HttpClient 3.1 to upload my Axis2 archives from my client application to
the Axis2 webapp (using the default same URL as the one used by the JSP pages) and it keeps
failing in a way I can explain... If I use the webapp's upload jsp page the POST request works
correctly and my archive gets transferred without issues! However using HttpClient in my client
application even if I get a HTTP/1.0 200, the file doesn't gets transferred at all as it seams
the POST request is truncated (from looking at the post boundaries that are missing. The funny
thiongs it's is semas to be size related as it's is working for realy small files from my
client app...
> I'm using the simple code I found for http multipart post over the doc and in other examples
on the web :
> File f = new File(arg2);
> PostMethod filePost = new PostMethod(the_url.toExternalForm());
> Part[] parts = {
>           new FilePart(f.getName(), f)
> };
> filePost.setRequestEntity(
>           new MultipartRequestEntity(parts, filePost.getParams())
> );
> HttpClient client = new org.apache.commons.httpclient.HttpClient();
> HttpClientParams params = new HttpClientParams();
> client.getHttpConnectionManager().getParams().setConnectionTimeout(10000);
> client.setParams(params);
> status = client.executeMethod(filePost);
> I attached a tcpmon snapshot of the 2 different post requests, the one that is working
(from the jsp page) and the one that isn't (from my client app. using HttpClient)!

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message