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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to