hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brad O'Hearne <br...@neurofire.com>
Subject Re: Trying to cancel PostMethod
Date Thu, 12 Feb 2004 04:31:23 GMT
I might be able to help you, depending on what you are doing in the 
POST.  I just had to do this very thing for a file upload POST.  The 
way I accomplished this was to extend the 
org.apache.commons.httpclient.methods.multipart.FilePartSource class 
and return my own InputStream, that checked for a cancel status every 
time an I/O read was done.    If you are sending large amounts of data 
across the wire, a cancel could be accomplished in such a manner.  
However, if you have a very small POST, there's probably no point in 
canceling.  The data is going to cross the wire so fast, a user 
wouldn't be able to cancel it in time.

BradO

On Feb 11, 2004, at 2:02 PM, carlos1.rivera@ps.ge.com wrote:

> I have an issue with an HttpClient where it is executing a PostMethod 
> and I
> would like to cancel this method.  I have tried to use recycle() and
> releaseConnection(), but these don't seem to work.  Any suggestions on 
> how I
> should handle this issue?  Currently using RC3
>
> Thank You
>
> Carlos Javier Rivera Vazquez
> Staff Engineer
> GE Power Systems
> Network Reliability Services
> 1990 West NASA Blvd
> Melbourne, FL 32904
> __________________________________________________
>
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message