Branch: Tag:

2000-09-20

2000-09-20 22:24:16 by Per Hedbor <ph@opera.com>

Somewhat more sensible order to default port / actual protocol detection.

Rev: server/etc/modules/Variable.pmod/module.pmod:1.19

1: - // $Id: module.pmod,v 1.18 2000/09/19 12:28:50 per Exp $ + // $Id: module.pmod,v 1.19 2000/09/20 22:24:16 per Exp $      #include <module.h>   #include <roxen.h>
1175:    warning += "Added / to the end of "+port+"\n";    path = "/";    } -  int pno; -  if( sscanf( host, "%s:%d", host, pno ) == 2) -  if( roxenp()->protocols[ lower_case( protocol ) ] -  && (pno == roxenp()->protocols[ lower_case( protocol ) ]->default_port )) -  warning += "Removed the " -  "default port number ("+pno+") from "+port+"\n"; -  else -  host = host+":"+pno; -  +     if( nofhttp && protocol == "fhttp" )    {    warning += "Changed " + protocol + " to http\n";
1209:    }   #endif    } +  int pno; +  if( sscanf( host, "%s:%d", host, pno ) == 2) +  if( roxenp()->protocols[ lower_case( protocol ) ] +  && (pno == roxenp()->protocols[ lower_case( protocol ) ]->default_port )) +  warning += "Removed the " +  "default port number ("+pno+") from "+port+"\n"; +  else +  host = host+":"+pno;    -  +     port = protocol+"://"+host+path;       if( !roxenp()->protocols[ protocol ] )