Hi,

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 "
http://hc.apache.org/httpcomponents-asyncclient-dev/httpasyncclient/examples/org/apache/http/examples/nio/client/AsyncClientHttpExchange.java
Asynchronous HTTP exchange ", and updated the first couple lines to this:

        DefaultHttpAsyncClient httpclient = new DefaultHttpAsyncClient();
        httpclient.getCredentialsProvider().setCredentials(
                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 snapshot of
initial 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="@127.0.0.1", qop="auth", nonce="31",
opaque="deadbeef"

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()).

My question is: Is my modification to the example valid for what I'm trying
to do?  Can one of the guru tell me whether there is a problem with my
example code, or if there is a problem with the http async client library
code?  If there's a problem in the http async client library code, where
might I go digging to fix it?  Thanks!

p.w.
-- 
View this message in context: 
http://old.nabble.com/HTTP-Async-Client-Digest-Authentication-over-HTTP-1.0-style-connection-tp33128907p33128907.html
Sent from the HttpClient-User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to