[CalendarServer-changes] [3644] CalendarServer/trunk/calendarserver/tap/caldav.py

source_changes at macosforge.org source_changes at macosforge.org
Thu Feb 5 17:22:24 PST 2009


Revision: 3644
          http://trac.macosforge.org/projects/calendarserver/changeset/3644
Author:   darla at apple.com
Date:     2009-02-05 17:22:24 -0800 (Thu, 05 Feb 2009)
Log Message:
-----------
Always using config.SSLPort for RedirectHTTPToHTTPS, not just for slave processes.

Modified Paths:
--------------
    CalendarServer/trunk/calendarserver/tap/caldav.py

Modified: CalendarServer/trunk/calendarserver/tap/caldav.py
===================================================================
--- CalendarServer/trunk/calendarserver/tap/caldav.py	2009-02-05 21:40:38 UTC (rev 3643)
+++ CalendarServer/trunk/calendarserver/tap/caldav.py	2009-02-06 01:22:24 UTC (rev 3644)
@@ -664,7 +664,6 @@
             elif config.SSLPort != 0:
                 config.BindSSLPorts = [config.SSLPort]
 
-            successfulSSLPorts = []
             for port in config.BindSSLPorts:
                 self.log_info("Adding SSL server at %s:%s"
                               % (bindAddress, port))
@@ -687,18 +686,12 @@
                         backlog=config.ListenBacklog,
                     )
                     httpsService.setServiceParent(service)
-                    successfulSSLPorts.append(int(port))
 
             for port in config.BindHTTPPorts:
 
-                if config.RedirectHTTPToHTTPS and successfulSSLPorts:
-                    # Redirect non-SSL ports to the first ssl port
-                    # Or for slave processes, use the main SSL port (since the slave's ports
-                    # aren't accessible to clients).  <rdar://6541865>
-                    if config.ProcessType == "Slave":
-                        RedirectRequest.port = config.SSLPort
-                    else:
-                        RedirectRequest.port = successfulSSLPorts[0]
+                if config.RedirectHTTPToHTTPS:
+                    # Redirect non-SSL ports to the configured SSL port.
+                    RedirectRequest.port = config.SSLPort
                     self.log_info("Redirecting %s:%s to %s" %
                         (bindAddress, port, RedirectRequest.port))
                     TCPServer(int(port), HTTPFactory(RedirectRequest),
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20090205/44cb6092/attachment.html>


More information about the calendarserver-changes mailing list