Return-Path: X-Original-To: apmail-hc-dev-archive@www.apache.org Delivered-To: apmail-hc-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F10399DD0 for ; Fri, 13 Jan 2012 18:55:04 +0000 (UTC) Received: (qmail 68771 invoked by uid 500); 13 Jan 2012 18:55:04 -0000 Delivered-To: apmail-hc-dev-archive@hc.apache.org Received: (qmail 68622 invoked by uid 500); 13 Jan 2012 18:55:03 -0000 Mailing-List: contact dev-help@hc.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "HttpComponents Project" Delivered-To: mailing list dev@hc.apache.org Received: (qmail 68598 invoked by uid 99); 13 Jan 2012 18:55:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2012 18:55:02 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jan 2012 18:55:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 8CB2D14AC6E for ; Fri, 13 Jan 2012 18:54:39 +0000 (UTC) Date: Fri, 13 Jan 2012 18:54:39 +0000 (UTC) From: "Oleg Kalnichevski (Resolved) (JIRA)" To: dev@hc.apache.org Message-ID: <230392068.38562.1326480879578.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <163105665.35777.1326399519637.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Resolved] (HTTPASYNC-11) Default Async HTTP Client Fails to get response for an Digest Authenticated HTTP 1.0 style connection MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HTTPASYNC-11?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Oleg Kalnichevski resolved HTTPASYNC-11. ---------------------------------------- Resolution: Fixed I committed a fix for the bug to SVN trunk. Could you please retest your application with the latest SVN snapshot and re-open the issue if the problem still persists. Oleg > Default Async HTTP Client Fails to get response for an Digest Authenticated HTTP 1.0 style connection > ----------------------------------------------------------------------------------------------------- > > 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 > Fix For: 4.0-alpha4 > > Attachments: nullresponse > > > 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(); > 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 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="@127.0.0.1", qop="auth", nonce="44", opaque="deadbeef" > Transfer-Encoding: chunked > 4b > {"status":{"code":401,"commandResult":1,"msg":"Unauthorized.","query":"/"}} > 0 > 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