hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phillip Wang (Created) (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPASYNC-11) Default Async HTTP Client Fails to get response for an Digest Authenticated HTTP 1.0 style connection
Date Thu, 12 Jan 2012 20:18:39 GMT
Default Async HTTP Client Fails to get response for an Digest Authenticated HTTP 1.0 style

                 Key: HTTPASYNC-11
                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-11
             Project: HttpComponents HttpAsyncClient
          Issue Type: Bug
    Affects Versions: 4.0-alpha3
         Environment: Ubuntu 10.4.3, Java 6
            Reporter: Phillip Wang

I'm trying to use the HTTP Async client v4.0 alpha 3 to communicate with a HTTP v1.0-style
server with Basic Digest authentication.  I started with the basic example "Asynchronous HTTP
exchange", and updated the first couple lines to this: 

        DefaultHttpAsyncClient httpclient = new DefaultHttpAsyncClient(); 
                new AuthScope("localhost", 8080), 
                new UsernamePasswordCredentials("super", "super1")); 

The server actually returns in the response HTTP 1.1 but includes "Connection: close" in the
response header.  Right after the response is done sending, the server closes the connection.
 This is a wireshark capture of the transaction: 

GET / HTTP/1.1
Host: localhost:8080
Connection: Keep-Alive
User-Agent: Apache-HttpAsyncClient/4.0-alpha3 (java 1.5)

HTTP/1.1 401 Unauthorized
Content-Type: application/json
Connection: close
WWW-Authenticate: Digest realm="@", qop="auth", nonce="44", opaque="deadbeef"
Transfer-Encoding: chunked


When I run the modified example, the future.get() call returns with null, and the program
errors out on a null exception (due to the response.getStatusLine()). 

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

View raw message