httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@covalent.net>
Subject Re: [PATCH] fix problem if Port is unset!
Date Sat, 07 Feb 1998 21:16:17 GMT
Sorry for delay on this. I was looking at just this thing last night.
Looks to me that Lars' patch is the best solution here. I'll commit
this if it hasn't made it there yet.


Dean Gaudet <dgaudet@arctic.org> wrote:
> Randy's "generalize default_port manipulations" patch on feb 2nd is the
> cause of this bug.  Randy I can't figure out why your patch does this:
> 
>   Index: http_config.c
>   ===================================================================
>   RCS file: /export/home/cvs/apache-1.3/src/main/http_config.c,v
>   retrieving revision 1.94
>   retrieving revision 1.95
>   diff -u -r1.94 -r1.95
>   --- http_config.c     1998/01/21 22:11:01     1.94
>   +++ http_config.c     1998/02/02 22:33:31     1.95
>   @@ -1225,7 +1225,7 @@
>    {
>        server_rec *s = (server_rec *) pcalloc(p, sizeof(server_rec));
> 
>   -    s->port = DEFAULT_PORT;
>   +    s->port = 0;
>        s->server_admin = DEFAULT_ADMIN;
>        s->server_hostname = NULL;
>        s->error_fname = DEFAULT_ERRORLOG;
> 
> 
> 
> Nothing appears to actually test if s->port == 0.  They all test against
> DEFAULT_PORT.  I'm thinking that the above hunk is an SSLism that should
> be backed out.  I'm guessing the SSL is_default_port() function
> understands a 0 port.
> 
> In any event it looks like mod_rewrite may have some latent
> UseCanonicalName/default_port bugs... I'll look later.  Not showstoppers. 
> 
> Dean
> 
> On Sat, 7 Feb 1998, Lars Eilebrecht wrote:
> 
> > Hi,
> > 
> > recent code changes (UseCanonicalName?) broke all configs where
> > "Port" is unset.
> > I noticed it, because I'm typically using "Listen 80" in my configs
> > and leave "Port" undefined, because "Port 80" is the default.
> > This results in directory-redirects with a port set to "0".
> > 
> > The UseCanonicalName code uses "r->server->port", but this is
> > set to "0" in http_config.c. Is there are reason for setting
> > it to zero? My attached patch uses "default_port(s)" instead
> > which seems to work for me.
> > 
> > This problem should be fixed before 1.3b4 is released...
> > 
> > 
> > ciao...
> > -- 
> > Lars Eilebrecht                        - "What you see is all you get."
> > sfx@unix-ag.org                                       (Brian Kernighan)
> > http://www.si.unix-ag.org/~sfx/
> > 
> > 

Mime
View raw message