rse         98/05/27 07:01:39

  Modified:    src      CHANGES
               src/include compat.h http_config.h httpd.h
               src/main http_core.c http_protocol.c util.c
               src/modules/proxy mod_proxy.c
               src/modules/standard mod_rewrite.c
  Log:
  Renamed three more functions to common ap_ prefix which we missed at the
  Big Symbol Renaming because they're #defines and not real C functions:
  
       is_default_port()       ap_is_default_port()
       default_port()    ==>   ap_default_port()
       http_method()           ap_http_method().
  
  Submitted by: Ralf S. Engelschall (Hint by Dean Gaudet)
  Reviewed by: Brian Behlendorf
  
  Revision  Changes    Path
  1.863     +5 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.862
  retrieving revision 1.863
  diff -u -r1.862 -r1.863
  --- CHANGES   1998/05/26 00:54:06     1.862
  +++ CHANGES   1998/05/27 14:01:29     1.863
  @@ -1,4 +1,9 @@
   Changes with Apache 1.3b8
  +  
  +  *) Renamed three more functions to common ap_ prefix which we missed at the
  +     Big Symbol Renaming because they're #defines and not real C functions:
  +     is_default_port(), default_port(), http_method().
  +     [Ralf S. Engelschall]
   
     *) A zero-length name after a $ in an SSI document should cause
        just the $ to be in the expansion.  This was broken during the
  
  
  
  1.8       +3 -0      apache-1.3/src/include/compat.h
  
  Index: compat.h
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/include/compat.h,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- compat.h  1998/05/06 12:23:40     1.7
  +++ compat.h  1998/05/27 14:01:30     1.8
  @@ -101,6 +101,7 @@
   #define daemons_min_free               ap_daemons_min_free
   #define daemons_to_start               ap_daemons_to_start
   #define day_snames                     ap_day_snames
  +#define default_port                   ap_default_port
   #define default_port_for_request       ap_default_port_for_request
   #define default_port_for_scheme        ap_default_port_for_scheme
   #define default_type                   ap_default_type
  @@ -160,6 +161,7 @@
   #define hard_timeout                   ap_hard_timeout
   #define header_parse                   ap_header_parse
   #define ht_time                        ap_ht_time
  +#define http_method                    ap_http_method
   #define ind                            ap_ind
   #define index_of_response              ap_index_of_response
   #define init_alloc                     ap_init_alloc
  @@ -169,6 +171,7 @@
   #define internal_redirect              ap_internal_redirect
   #define internal_redirect_handler      ap_internal_redirect_handler
   #define invoke_handler                 ap_invoke_handler
  +#define is_default_port                ap_is_default_port
   #define is_directory                   ap_is_directory
   #define is_fnmatch                     ap_is_fnmatch
   #define is_initial_req                 ap_is_initial_req
  
  
  
  1.87      +1 -1      apache-1.3/src/include/http_config.h
  
  Index: http_config.h
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/include/http_config.h,v
  retrieving revision 1.86
  retrieving revision 1.87
  diff -u -r1.86 -r1.87
  --- http_config.h     1998/05/19 18:00:59     1.86
  +++ http_config.h     1998/05/27 14:01:31     1.87
  @@ -275,7 +275,7 @@
    * handle it back-compatibly, or at least signal an error).
    */
   
  -#define MODULE_MAGIC_NUMBER 19980519
  +#define MODULE_MAGIC_NUMBER 19980527
   #define STANDARD_MODULE_STUFF MODULE_MAGIC_NUMBER, -1, __FILE__, NULL, NULL
   
   /* Generic accessors for other modules to get at their own module-specific
  
  
  
  1.215     +3 -3      apache-1.3/src/include/httpd.h
  
  Index: httpd.h
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/include/httpd.h,v
  retrieving revision 1.214
  retrieving revision 1.215
  diff -u -r1.214 -r1.215
  --- httpd.h   1998/05/22 00:37:29     1.214
  +++ httpd.h   1998/05/27 14:01:31     1.215
  @@ -128,9 +128,9 @@
   
   #define DEFAULT_HTTP_PORT    80
   #define DEFAULT_HTTPS_PORT   443
  -#define is_default_port(port,r)      ((port) == default_port(r))
  -#define http_method(r)       "http"
  -#define      default_port(r) DEFAULT_HTTP_PORT
  +#define ap_is_default_port(port,r)   ((port) == ap_default_port(r))
  +#define ap_http_method(r)    "http"
  +#define ap_default_port(r)   DEFAULT_HTTP_PORT
   
   /* --------- Default user name and group name running standalone ---------- 
*/
   /* --- These may be specified as numbers by placing a # before a number --- 
*/
  
  
  
  1.202     +6 -6      apache-1.3/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_core.c,v
  retrieving revision 1.201
  retrieving revision 1.202
  diff -u -r1.201 -r1.202
  --- http_core.c       1998/05/25 23:37:45     1.201
  +++ http_core.c       1998/05/27 14:01:33     1.202
  @@ -607,7 +607,7 @@
       core_dir_config *d =
         (core_dir_config *)ap_get_module_config(r->per_dir_config, 
&core_module);
       
  -    port = r->server->port ? r->server->port : default_port(r);
  +    port = r->server->port ? r->server->port : ap_default_port(r);
   
       if (d->use_canonical_name & 1) {
        return port;
  @@ -624,7 +624,7 @@
         (core_dir_config *)ap_get_module_config(r->per_dir_config, 
&core_module);
   
       if (d->use_canonical_name & 1) {
  -     port = r->server->port ? r->server->port : default_port(r);
  +     port = r->server->port ? r->server->port : ap_default_port(r);
        host = r->server->server_hostname;
       }
       else {
  @@ -633,14 +633,14 @@
           else if (r->server->port)
               port = r->server->port;
           else
  -            port = default_port(r);
  +            port = ap_default_port(r);
   
        host = r->hostname ? r->hostname : r->server->server_hostname;
       }
  -    if (is_default_port(port, r)) {
  -     return ap_pstrcat(p, http_method(r), "://", host, uri, NULL);
  +    if (ap_is_default_port(port, r)) {
  +     return ap_pstrcat(p, ap_http_method(r), "://", host, uri, NULL);
       }
  -    return ap_psprintf(p, "%s://%s:%u%s", http_method(r), host, port, uri);
  +    return ap_psprintf(p, "%s://%s:%u%s", ap_http_method(r), host, port, 
uri);
   }
   
   /*****************************************************************
  
  
  
  1.216     +1 -1      apache-1.3/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/http_protocol.c,v
  retrieving revision 1.215
  retrieving revision 1.216
  diff -u -r1.215 -r1.216
  --- http_protocol.c   1998/05/25 22:55:39     1.215
  +++ http_protocol.c   1998/05/27 14:01:33     1.216
  @@ -590,7 +590,7 @@
       if (is_HTTP_SUCCESS(status)) {
        /* if it has a scheme we may need to do absoluteURI vhost stuff */
        if (r->parsed_uri.scheme
  -         && !strcasecmp(r->parsed_uri.scheme, http_method(r))) {
  +         && !strcasecmp(r->parsed_uri.scheme, ap_http_method(r))) {
            r->hostname = r->parsed_uri.hostname;
        } else if (r->method_number == M_CONNECT) {
            r->hostname = r->parsed_uri.hostname;
  
  
  
  1.116     +1 -1      apache-1.3/src/main/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/main/util.c,v
  retrieving revision 1.115
  retrieving revision 1.116
  diff -u -r1.115 -r1.116
  --- util.c    1998/05/09 14:27:27     1.115
  +++ util.c    1998/05/27 14:01:35     1.116
  @@ -1137,7 +1137,7 @@
   API_EXPORT(char *) ap_construct_server(pool *p, const char *hostname,
                                    unsigned port, const request_rec *r)
   {
  -    if (is_default_port(port, r))
  +    if (ap_is_default_port(port, r))
        return ap_pstrdup(p, hostname);
       else {
        return ap_psprintf(p, "%s:%u", hostname, port);
  
  
  
  1.52      +2 -2      apache-1.3/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- mod_proxy.c       1998/04/11 12:00:39     1.51
  +++ mod_proxy.c       1998/05/27 14:01:37     1.52
  @@ -146,9 +146,9 @@
       if (conf->req && r->parsed_uri.scheme) {
        /* but it might be something vhosted */
          if (!(r->parsed_uri.hostname
  -         && !strcasecmp(r->parsed_uri.scheme, http_method(r))
  +         && !strcasecmp(r->parsed_uri.scheme, ap_http_method(r))
            && ap_matches_request_vhost(r, r->parsed_uri.hostname,
  -               r->parsed_uri.port_str ? r->parsed_uri.port : 
default_port(r)))) {
  +               r->parsed_uri.port_str ? r->parsed_uri.port : 
ap_default_port(r)))) {
            r->proxyreq = 1;
            r->uri = r->unparsed_uri;
            r->filename = ap_pstrcat(r->pool, "proxy:", r->uri, NULL);
  
  
  
  1.107     +8 -8      apache-1.3/src/modules/standard/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/modules/standard/mod_rewrite.c,v
  retrieving revision 1.106
  retrieving revision 1.107
  diff -u -r1.106 -r1.107
  --- mod_rewrite.c     1998/05/21 10:48:35     1.106
  +++ mod_rewrite.c     1998/05/27 14:01:38     1.107
  @@ -1002,7 +1002,7 @@
       /* add the canonical URI of this URL */
       thisserver = ap_get_server_name(r);
       port = ap_get_server_port(r);
  -    if (is_default_port(port, r))
  +    if (ap_is_default_port(port, r))
           thisport = "";
       else {
           ap_snprintf(buf, sizeof(buf), ":%u", port);
  @@ -1011,7 +1011,7 @@
       thisurl = ap_table_get(r->subprocess_env, ENVVAR_SCRIPT_URL);
   
       /* set the variable */
  -    var = ap_pstrcat(r->pool, http_method(r), "://", thisserver, thisport,
  +    var = ap_pstrcat(r->pool, ap_http_method(r), "://", thisserver, thisport,
                     thisurl, NULL);
       ap_table_setn(r->subprocess_env, ENVVAR_SCRIPT_URI, var);
   
  @@ -2220,7 +2220,7 @@
           olduri = ap_pstrdup(r->pool, r->filename); /* save for logging */
   
           /* cut the hostname and port out of the URI */
  -        ap_cpystrn(buf, r->filename+strlen(http_method(r))+3, sizeof(buf));
  +        ap_cpystrn(buf, r->filename+strlen(ap_http_method(r))+3, 
sizeof(buf));
           hostp = buf;
           for (cp = hostp; *cp != '\0' && *cp != '/' && *cp != ':'; cp++)
               ;
  @@ -2245,7 +2245,7 @@
               ap_cpystrn(host, hostp, sizeof(host));
               *cp = '/';
               /* set port */
  -            port = default_port(r);
  +            port = ap_default_port(r);
               /* set remaining url */
               url = cp;
           }
  @@ -2253,7 +2253,7 @@
               /* set host */
               ap_cpystrn(host, hostp, sizeof(host));
               /* set port */
  -            port = default_port(r);
  +            port = ap_default_port(r);
               /* set remaining url */
               url = "/";
           }
  @@ -2292,7 +2292,7 @@
             
           thisserver = ap_get_server_name(r);
           port = ap_get_server_port(r);
  -        if (is_default_port(port,r))
  +        if (ap_is_default_port(port,r))
               thisport = "";
           else {
               ap_snprintf(buf, sizeof(buf), ":%u", port);
  @@ -2301,11 +2301,11 @@
   
           if (r->filename[0] == '/')
               r->filename = ap_psprintf(r->pool, "%s://%s%s%s",
  -                        http_method(r), thisserver,
  +                        ap_http_method(r), thisserver,
                           thisport, r->filename);
           else
               r->filename = ap_psprintf(r->pool, "%s://%s%s/%s",
  -                        http_method(r), thisserver,
  +                        ap_http_method(r), thisserver,
                           thisport, r->filename);
       }
       return;
  
  
  

Reply via email to