You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by ca...@ps.ge.com on 2004/02/11 20:02:59 UTC

Trying to cancel PostMethod

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


Re: Trying to cancel PostMethod

Posted by Brad O'Hearne <br...@neurofire.com>.
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


Re: Trying to cancel PostMethod

Posted by Ortwin Glück <or...@nose.ch>.
Carlos,

this is feature request #20288
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=20288

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

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