Return-Path: Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 88229 invoked from network); 15 Jul 2003 22:52:52 -0000 Received: from bay7-dav38.bay7.hotmail.com (HELO hotmail.com) (64.4.10.95) by daedalus.apache.org with SMTP; 15 Jul 2003 22:52:52 -0000 Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Tue, 15 Jul 2003 15:53:00 -0700 Received: from 24.43.13.222 by bay7-dav38.bay7.hotmail.com with DAV; Tue, 15 Jul 2003 22:53:00 +0000 X-Originating-IP: [24.43.13.222] X-Originating-Email: [bgclarke16@hotmail.com] From: "Brad Clarke" To: "Commons-user" Subject: RE: HTTPClient basic authentication against LinkSys router Date: Tue, 15 Jul 2003 18:54:32 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Message-ID: X-OriginalArrivalTime: 15 Jul 2003 22:53:00.0197 (UTC) FILETIME=[D724FD50:01C34B23] X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Adrian, This is a bit hacked up. I didn't get a response back to the e-mail account I sent the original message from, so I grabbed it from the mail archive. Here is the wire trace as requested. 2003/07/15 18:47:05:128 EDT [DEBUG] HttpClient - -Java version: 1.4.2 2003/07/15 18:47:05:138 EDT [DEBUG] HttpClient - -Java vendor: Sun Microsystems Inc. 2003/07/15 18:47:05:138 EDT [DEBUG] HttpClient - -Java class path: D:\j2sdk1.4.2\jre\lib\rt.jar;D:\j2sdk1.4.2\lib\tools.jar;H:\Development\Java \commons-httpclient-2.0-beta2\commons-httpclient-2.0-beta2.jar;H:\Developmen t\Java\commons-logging-1.0.3\commons-logging.jar;H:\Development\Java\LSRoute r2\classes 2003/07/15 18:47:05:138 EDT [DEBUG] HttpClient - -Operating system name: Windows 2000 2003/07/15 18:47:05:138 EDT [DEBUG] HttpClient - -Operating system architecture: x86 2003/07/15 18:47:05:138 EDT [DEBUG] HttpClient - -Operating system version: 5.0 2003/07/15 18:47:06:000 EDT [DEBUG] HttpClient - -SUN 1.42: SUN (DSA key/parameter generation; DSA signing; SHA-1, MD5 digests; SecureRandom; X.509 certificates; JKS keystore; PKIX CertPathValidator; PKIX CertPathBuilder; LDAP, Collection CertStores) 2003/07/15 18:47:06:010 EDT [DEBUG] HttpClient - -SunJSSE 1.42: Sun JSSE provider(implements RSA Signatures, PKCS12, SunX509 key/trust factories, SSLv3, TLSv1) 2003/07/15 18:47:06:010 EDT [DEBUG] HttpClient - -SunRsaSign 1.42: SUN's provider for RSA signatures 2003/07/15 18:47:06:010 EDT [DEBUG] HttpClient - -SunJCE 1.42: SunJCE Provider (implements DES, Triple DES, AES, Blowfish, PBE, Diffie-Hellman, HMAC-MD5, HMAC-SHA1) 2003/07/15 18:47:06:010 EDT [DEBUG] HttpClient - -SunJGSS 1.0: Sun (Kerberos v5) 2003/07/15 18:47:06:510 EDT [DEBUG] HttpConnection - -Creating connection for 192.168.1.1 using protocol http:80 2003/07/15 18:47:06:510 EDT [DEBUG] HttpConnection - -HttpConnection.setSoTimeout(0) 2003/07/15 18:47:06:711 EDT [DEBUG] HttpMethodBase - -Execute loop try 1 2003/07/15 18:47:06:721 EDT [DEBUG] wire - ->> "GET /Status.htm HTTP/1.1[\r][\n]" 2003/07/15 18:47:06:731 EDT [DEBUG] HttpMethodBase - -Adding Host request header 2003/07/15 18:47:06:881 EDT [DEBUG] wire - ->> "User-Agent: Jakarta Commons-HttpClient/2.0beta2[\r][\n]" 2003/07/15 18:47:06:891 EDT [DEBUG] wire - ->> "Host: 192.168.1.1[\r][\n]" 2003/07/15 18:47:06:891 EDT [DEBUG] wire - ->> "[\r][\n]" 2003/07/15 18:47:06:901 EDT [DEBUG] wire - -<< "HTTP/1.1 401 Authorization Required[\r][\n]" 2003/07/15 18:47:06:921 EDT [DEBUG] wire - -<< "WWW-Authenticate: Basic realm="Linksys BEFSR41/BEFSR11/BEFSRU31"[\r][\n]" 2003/07/15 18:47:06:921 EDT [DEBUG] wire - -<< "Content-type: text/html[\r][\n]" 2003/07/15 18:47:06:921 EDT [DEBUG] wire - -<< "Expires: Thu, 13 Dec 1969 10:29:00 GMT[\r][\n]" 2003/07/15 18:47:06:921 EDT [DEBUG] wire - -<< "Connection: close[\r][\n]"Status = 401 2003/07/15 18:47:07:091 EDT [DEBUG] wire - -<< "Pragma: no-cache[\r][\n]" 2003/07/15 18:47:07:091 EDT [DEBUG] HttpMethodBase - -Authorization required 2003/07/15 18:47:07:231 EDT [DEBUG] HttpAuthenticator - -Using 'Linksys BEFSR41/BEFSR11/BEFSRU31' authentication realm 2003/07/15 18:47:07:231 EDT [WARN] HttpMethodBase - -No credentials available for the basicauthentication realm 'Linksys BEFSR41/BEFSR11/BEFSRU31' 2003/07/15 18:47:07:241 EDT [DEBUG] HttpMethodBase - -Buffering response body Response Data = 401 Authorization Required

401 Authorization Required

This server could not verify that you are authorized to access. Either you supplied the wrong credentials(e.g., bad password), or your browser doesn't understand how to supply the credentials required.2003/07/15 18:47:07:342 EDT [DEBUG] wire - -<< "401 Authorization Required

401 Authorization Required

This server could not verify that you are authorized to access. Either you supplied the wrong credentials(e.g., bad password), or your browser doesn't understand how to supply the credentials required.[0x0]" 2003/07/15 18:47:07:342 EDT [DEBUG] HttpMethodBase - -Should close connection as content-length is missing. 2003/07/15 18:47:07:352 EDT [DEBUG] HttpMethodBase - -Default charset used: ISO-8859-1 The "192.168.1.1" part for some reason isn't matching the server name correctly - I don't know why. To find out why, I'll need a debug log with wire trace on and debug level set. See http://jakarta.apache.org/commons/httpclient/logging.html for instructions. It's very unlikely to be an incompatibility with the Linksys router by the looks of it - rather something screwy going on with what hostname is being used. The wire log should reveal all. :) Regards, Adrian Sutton, Software Engineer Ephox Corporation www.ephox.com