Return-Path: Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@www.apache.org Received: (qmail 25129 invoked from network); 18 May 2004 13:20:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 18 May 2004 13:20:05 -0000 Received: (qmail 30826 invoked by uid 500); 18 May 2004 13:16:31 -0000 Delivered-To: apmail-jakarta-commons-httpclient-dev-archive@jakarta.apache.org Received: (qmail 30711 invoked by uid 500); 18 May 2004 13:16:30 -0000 Mailing-List: contact commons-httpclient-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Commons HttpClient Project" Reply-To: "Commons HttpClient Project" Delivered-To: mailing list commons-httpclient-dev@jakarta.apache.org Received: (qmail 30445 invoked by uid 98); 18 May 2004 13:16:27 -0000 Received: from oleg.kalnichevski@bearingpoint.com by hermes.apache.org by uid 82 with qmail-scanner-1.20 (clamuko: 0.70. Clear:RC:0(57.80.136.22):. Processed in 0.172782 secs); 18 May 2004 13:16:27 -0000 X-Qmail-Scanner-Mail-From: oleg.kalnichevski@bearingpoint.com via hermes.apache.org X-Qmail-Scanner: 1.20 (Clear:RC:0(57.80.136.22):. Processed in 0.172782 secs) Received: from unknown (HELO kccxoex16.corp.kpmgconsulting.com) (57.80.136.22) by hermes.apache.org with SMTP; 18 May 2004 13:16:26 -0000 Received: from kccxoex06.corp.kpmgconsulting.com ([10.98.3.31]) by kccxoex16 with trend_isnt_name_B; Tue, 18 May 2004 13:16:00 -0000 x-mimeole: Produced By Microsoft Exchange V6.0.6487.1 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: Posting XML over authenticated connection using SSL Date: Tue, 18 May 2004 14:15:41 +0100 Message-ID: <825BF35A92B3F0479CC164ECBBE9376E5F0483@kccxoex06.corp.kpmgconsulting.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Posting XML over authenticated connection using SSL Thread-Index: AcQ82Uu8y4uQ5mdARomACnXc+SN3sAAAB2Pg From: "Kalnichevski, Oleg" To: "Commons HttpClient Project" X-Spam-Rating: hermes.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Lee Francis, Now it hit me. =0D When credentials are explicitly set to be used with a given host and/or= realm only, there'll never be used for preemptive authentication for= security reasons. The credentials will be used to respond to a direct= authorization challenge originating from the specified host/realm. client.getState().setCredentials(realm, host, upc); You have got to provide default credentials in order for HttpClient to be= able to send credentials preemptively client.getState().setCredentials(null, null, upc); This should do the trick Oleg -----Original Message----- From: Lee Francis Wilhelmsen [mailto:leefw@start.no] Sent: Tuesday, May 18, 2004 15:03 To: Commons HttpClient Project Subject: RE: Posting XML over authenticated connection using SSL > Since you appear to be passing a custom HttpState object to the= HttpClient#executeMethod these lines of code have no effect of what so= ever on the method's execution >=0D > client.getState().setAuthenticationPreemptive(true); > client.getState().setCredentials(realm, host, upc); > > Try this instead >=0D > httpState.setAuthenticationPreemptive(true); > httpState.setCredentials(realm, host, upc); > status =3D client.executeMethod(hostConfiguration, method, httpState); >=0D > HTH >=0D > Oleg Sorry, it seems I 've made a mistake when showing you my example code in=0D my prevous mail. I'm calling client.executeMethod(method); and not client.executeMethod(hostConfiguration, method, httpState); in my code. Don't understand why the Authorization header isn't being sent in the=0D first request as expected when setting setAuthenticationPreemptive(true) Any ideas? Regards Lee Francis --------------------------------------------------------------------- To unsubscribe, e-mail:= commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail:= commons-httpclient-dev-help@jakarta.apache.org ***************************************************************************= ************************ The information in this email is confidential and may be legally= privileged. Access to this email by anyone other than the intended= addressee is unauthorized. If you are not the intended recipient of this= message, any review, disclosure, copying, distribution, retention, or any= action taken or omitted to be taken in reliance on it is prohibited and= may be unlawful. If you are not the intended recipient, please reply to= or forward a copy of this message to the sender and delete the message,= any attachments, and any copies thereof from your system. ***************************************************************************= ************************ --------------------------------------------------------------------- To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org