Return-Path: Delivered-To: apmail-felix-commits-archive@www.apache.org Received: (qmail 84961 invoked from network); 9 Jan 2011 18:14:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 9 Jan 2011 18:14:57 -0000 Received: (qmail 62179 invoked by uid 500); 9 Jan 2011 18:14:57 -0000 Delivered-To: apmail-felix-commits-archive@felix.apache.org Received: (qmail 62138 invoked by uid 500); 9 Jan 2011 18:14:56 -0000 Mailing-List: contact commits-help@felix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@felix.apache.org Delivered-To: mailing list commits@felix.apache.org Received: (qmail 62131 invoked by uid 99); 9 Jan 2011 18:14:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Jan 2011 18:14:56 +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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 09 Jan 2011 18:14:56 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 2EF7923888EC; Sun, 9 Jan 2011 18:14:36 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1056994 - /felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java Date: Sun, 09 Jan 2011 18:14:36 -0000 To: commits@felix.apache.org From: fmeschbe@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110109181436.2EF7923888EC@eris.apache.org> Author: fmeschbe Date: Sun Jan 9 18:14:35 2011 New Revision: 1056994 URL: http://svn.apache.org/viewvc?rev=1056994&view=rev Log: FELIX-2772 Do not use HTTP or HTTPS if configured port number is less than or equal to zero even though the FELIX_HTTP[S]_ENABLE flag is true Modified: felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java Modified: felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java URL: http://svn.apache.org/viewvc/felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java?rev=1056994&r1=1056993&r2=1056994&view=diff ============================================================================== --- felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java (original) +++ felix/trunk/http/jetty/src/main/java/org/apache/felix/http/jetty/internal/JettyConfig.java Sun Jan 9 18:14:35 2011 @@ -93,9 +93,14 @@ public final class JettyConfig return this.debug; } + /** + * Returns true if HTTP is configured to be used ( + * {@link #FELIX_HTTP_ENABLE}) and + * the configured HTTP port ({@link #HTTP_PORT}) is higher than zero. + */ public boolean isUseHttp() { - return this.useHttp; + return this.useHttp && getHttpPort() > 0; } public boolean isUseHttpNio() @@ -103,9 +108,14 @@ public final class JettyConfig return this.useHttpNio; } + /** + * Returns true if HTTPS is configured to be used ( + * {@link #FELIX_HTTPS_ENABLE}) and + * the configured HTTP port ({@link #HTTPS_PORT}) is higher than zero. + */ public boolean isUseHttps() { - return this.useHttps; + return this.useHttps && getHttpsPort() > 0; } public boolean isUseHttpsNio()