Return-Path: Delivered-To: apmail-jakarta-httpclient-dev-archive@www.apache.org Received: (qmail 36379 invoked from network); 7 Feb 2006 10:14:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Feb 2006 10:14:19 -0000 Received: (qmail 7751 invoked by uid 500); 7 Feb 2006 10:14:19 -0000 Delivered-To: apmail-jakarta-httpclient-dev-archive@jakarta.apache.org Received: (qmail 7514 invoked by uid 500); 7 Feb 2006 10:14:17 -0000 Mailing-List: contact httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "HttpClient Project" Reply-To: "HttpClient Project" Delivered-To: mailing list httpclient-dev@jakarta.apache.org Received: (qmail 7501 invoked by uid 99); 7 Feb 2006 10:14:17 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Feb 2006 02:14:17 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [202.157.177.37] (HELO doproq.slackweb.net) (202.157.177.37) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 07 Feb 2006 02:14:17 -0800 Received: (qmail 8894 invoked from network); 7 Feb 2006 19:14:28 +0800 Received: from azwan@slackweb.net by doproq by uid 1004 with qmail-scanner-1.20 (clamscan: 0.65. Clear:RC:1(127.0.0.1):. Processed in 0.13469 secs); 07 Feb 2006 11:14:28 -0000 Received: from unknown (HELO app.slackweb.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2006 19:14:27 +0800 Received: from 60.48.156.121 (SquirrelMail authenticated user azwan@slackweb.net) by app.slackweb.net with HTTP; Tue, 7 Feb 2006 19:14:27 +0800 (MYT) Message-ID: <38356.60.48.156.121.1139310867.squirrel@app.slackweb.net> Date: Tue, 7 Feb 2006 19:14:27 +0800 (MYT) Subject: Http basic auth through proxy From: "Azwan Adli Abdullah" To: httpclient-dev@jakarta.apache.org Reply-To: azwan@slackweb.net User-Agent: SquirrelMail/1.4.4 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on doproq.slackweb.net X-Spam-Level: X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, hits=0.8 required=10.0 tests=PRIORITY_NO_NAME autolearn=no version=2.60 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi All, I'm having problem to post to http server which has basic auth enabled and java client is going through proxy. I got response authentication failure. It seems that no username/password sent to that http server. When i remove the proxy, it is ok. The proxy i'm using is from apache http server 1.3.x, the config is as below: ProxyRequests On Order Deny,Allow Allow from all My code is as below: ======================================================== httpClient = new HttpClient(); if (useProxy) { HostConfiguration hc = httpClient.getHostConfiguration(); hc.setProxy(getFwdProxyHost(), Integer.parseInt(getFwdProxyPort())); } httpClient.getState().setAuthenticationPreemptive(true); Credentials defaultcreds = new UsernamePasswordCredentials(httpUsername, httpPassword); httpClient.getState().setCredentials(realm, hostName, defaultcreds); ============================================================ I'm using commons-httpclient-2.0.2.jar. Is there anyone facing this problem and solved it? Thanks. -- Azwan Adli Abdullah Slackweb.net --------------------------------------------------------------------- To unsubscribe, e-mail: httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: httpclient-dev-help@jakarta.apache.org