Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 55067 invoked from network); 6 Apr 2006 02:10:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Apr 2006 02:10:32 -0000 Received: (qmail 2242 invoked by uid 500); 6 Apr 2006 02:10:28 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 2153 invoked by uid 500); 6 Apr 2006 02:10:27 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 2142 invoked by uid 99); 6 Apr 2006 02:10:27 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2006 19:10:27 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of chip@force-elite.com designates 72.232.80.58 as permitted sender) Received: from [72.232.80.58] (HELO constant.northnitch.com) (72.232.80.58) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Apr 2006 19:10:26 -0700 Received: from localhost (localhost.layeredtech.com [127.0.0.1]) by constant.northnitch.com (Postfix) with ESMTP id 8D77E5CA7 for ; Wed, 5 Apr 2006 21:10:05 -0500 (CDT) Received: from constant.northnitch.com ([127.0.0.1]) by localhost (constant.northnitch.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 85579-01 for ; Wed, 5 Apr 2006 21:10:05 -0500 (CDT) Received: from [192.168.1.102] (c-67-169-29-182.hsd1.ca.comcast.net [67.169.29.182]) by constant.northnitch.com (Postfix) with ESMTP id D0FDF5C93 for ; Wed, 5 Apr 2006 21:10:04 -0500 (CDT) Message-ID: <44347882.9070103@force-elite.com> Date: Wed, 05 Apr 2006 19:10:10 -0700 From: Paul Querna User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: Listen directive, port specification References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at constant.northnitch.com X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Rian Hunter wrote: > Hi, > > So the Listen directive now takes an optional protocol argument. In the > documentation it states that if the protocol isn't specified then if the > port number is 443, it is set to "https" otherwise "http". > > This seems like a good idea. What about if the port number is 25, > personally I want this to automatically set the protocol to "smtp". Sort > of like our own /etc/services. I can of course see this turning into > default protocol specifiers for multiple port numbers so I anticipate > some type of config file similar to MIMEMagic in the future. Yes, my vision was for it to use something like /etc/services, but that just didn't make sense for the most common case of people putting HTTP on a different port. > But for now, where is the code that set's the protocol to "https" if the > port number is 443? I don't see it in the Listen directive handler. See server/listen.c around line 530: /* TODO: set protocol defaults per-Port, eg 25=smtp */ ap_set_server_protocol(ls, "http"); > Also is there a preferred way for a protocol module to accept a > connection? Right now I have a directive "SmtpProtocol" that dictates > whether mod_smtpd accepts a connection on a server_rec. There is also > ap_get_server_protocol(server_rec *s) that returns the protocol based on > the Listen directive. The second way is similar to the way handlers are > selected. Either method can work. mod_ssl currently will pick up anything with the protocol "https". I personally like using Protocol smtp