You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Thiago Souza (Updated) (JIRA)" <ji...@apache.org> on 2012/02/22 15:35:49 UTC

[jira] [Updated] (HTTPASYNC-14) DefaultHttpAsyncClient does not follows redirects when remote site closes connection

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

Thiago Souza updated HTTPASYNC-14:
----------------------------------

    Comment: was deleted

(was: Hi Oleg, do I need to build beta1 myself or is it available in some snapshot repo?
Thanks!

    )
    
> DefaultHttpAsyncClient does not follows redirects when remote site closes connection
> ------------------------------------------------------------------------------------
>
>                 Key: HTTPASYNC-14
>                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-14
>             Project: HttpComponents HttpAsyncClient
>          Issue Type: Bug
>    Affects Versions: 4.0-alpha3
>         Environment: Windows 7 x64, Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
>            Reporter: Thiago Souza
>            Priority: Blocker
>
> When a site sends a redirect while closing connection the redirect is not followed, the passed FutureCallback receives "cancelled()" and future.get() returns null.
> The following reproduces the error:
> public class Test implements FutureCallback<HttpResponse>
> {
>     public static void main(String[] args) throws Exception
>     {
>         HttpAsyncClient httpclient = new DefaultHttpAsyncClient();
>         httpclient.start();
>         HttpGet request = new HttpGet("http://www.comprafacil.com.br/comprafacil/pages/viewProduct.jsf?VP=5wohvWvi8jgV60Cm%2FVhQr8FTEIJoz9WA&VPP=FREEZER+VERTICAL+246+LTS+CVU30D+CONSUL");
>         System.out.println(httpclient.execute(request, new Test()).get());
>         System.out.println("Done");
>     }
> 	public void completed(HttpResponse result)
> 	{
> 		System.out.println("completed");
> 	}
> 	public void failed(Exception ex)
> 	{
> 		System.out.println("failed");
> 	}
> 	public void cancelled()
> 	{
> 		System.out.println("cancelled");
> 	}
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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