Return-Path: Delivered-To: apmail-incubator-chemistry-dev-archive@minotaur.apache.org Received: (qmail 52810 invoked from network); 30 Jun 2009 15:36:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Jun 2009 15:36:02 -0000 Received: (qmail 15743 invoked by uid 500); 30 Jun 2009 15:36:12 -0000 Delivered-To: apmail-incubator-chemistry-dev-archive@incubator.apache.org Received: (qmail 15696 invoked by uid 500); 30 Jun 2009 15:36:12 -0000 Mailing-List: contact chemistry-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chemistry-dev@incubator.apache.org Delivered-To: mailing list chemistry-dev@incubator.apache.org Received: (qmail 15686 invoked by uid 99); 30 Jun 2009 15:36:12 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2009 15:36:12 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 30 Jun 2009 15:36:09 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id DCDF3234C052 for ; Tue, 30 Jun 2009 08:35:48 -0700 (PDT) Message-ID: <1577133461.1246376148903.JavaMail.jira@brutus> Date: Tue, 30 Jun 2009 08:35:48 -0700 (PDT) From: "Ugo Cei (JIRA)" To: chemistry-dev@incubator.apache.org Subject: [jira] Updated: (CMIS-21) HttpClientConnector sets credentials in constructor In-Reply-To: <1646439954.1246376148814.JavaMail.jira@brutus> 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/CMIS-21?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ugo Cei updated CMIS-21: ------------------------ Status: Open (was: Patch Available) > HttpClientConnector sets credentials in constructor > --------------------------------------------------- > > Key: CMIS-21 > URL: https://issues.apache.org/jira/browse/CMIS-21 > Project: Chemistry > Issue Type: Bug > Components: atompub, client > Reporter: Ugo Cei > Priority: Critical > Attachments: patch.txt > > > The constructor for the HttpClientConnector takes a ContentManager as argument and sets up preemptive authentication using the CredentialsProvider stored in the ContentManager. > The problem is that, at this point, the CredentialsProvider is null as we haven't yet had a chance to call ContentManager.login, thus the CredentialsProvider will be null. The solution is to differ the setting up of preemptive auth to when ContentManager.login is called. > The attached patch does exactly this. It's a bit of a quick fix and uses a couple instanceof operations which I don't like much, so you might want to review it and make it better. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.