martin      98/02/27 02:18:42

  Modified:    src/modules/proxy mod_proxy.c mod_proxy.h proxy_util.c
  Log:
  Add pool to interfaces of proxy_is_XXX functions (needed for future expansion)
  
  Revision  Changes    Path
  1.39      +4 -3      apache-1.3/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -u -r1.38 -r1.39
  --- mod_proxy.c       1998/02/23 08:04:10     1.38
  +++ mod_proxy.c       1998/02/27 10:18:38     1.39
  @@ -530,20 +530,20 @@
            fprintf(stderr, "Parsed mask %s\n", inet_ntoa(New->mask));
   #endif
        }
  -     else if (proxy_is_domainname(New)) {
  +     else if (proxy_is_domainname(New, parms->pool)) {
            str_tolower(New->name);
   #if DEBUGGING
            fprintf(stderr, "Parsed domain %s\n", New->name);
   #endif
        }
  -     else if (proxy_is_hostname(New)) {
  +     else if (proxy_is_hostname(New, parms->pool)) {
            str_tolower(New->name);
   #if DEBUGGING
            fprintf(stderr, "Parsed host %s\n", New->name);
   #endif
        }
        else {
  -         proxy_is_word(New);
  +         proxy_is_word(New, parms->pool);
   #if DEBUGGING
            fprintf(stderr, "Parsed word %s\n", New->name);
   #endif
  @@ -708,6 +708,7 @@
        new->name = arg;
        /* Don't do name lookups on things that aren't dotted */
        if (strchr(arg, '.') != NULL && proxy_host2addr(new->name, &hp) == NULL)
  +         /*@@@FIXME: This copies only the first of (possibly many) IP addrs 
*/
            memcpy(&new->addr, hp.h_addr, sizeof(struct in_addr));
        else
            new->addr.s_addr = 0;
  
  
  
  1.29      +4 -4      apache-1.3/src/modules/proxy/mod_proxy.h
  
  Index: mod_proxy.h
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/mod_proxy.h,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -u -r1.28 -r1.29
  --- mod_proxy.h       1998/02/23 08:04:10     1.28
  +++ mod_proxy.h       1998/02/27 10:18:39     1.29
  @@ -286,9 +286,9 @@
   BUFF *proxy_cache_error(struct cache_req *r);
   int proxyerror(request_rec *r, const char *message);
   const char *proxy_host2addr(const char *host, struct hostent *reqhp);
  -int proxy_is_ipaddr(struct dirconn_entry *This);
  -int proxy_is_domainname(struct dirconn_entry *This);
  -int proxy_is_hostname(struct dirconn_entry *This);
  -int proxy_is_word(struct dirconn_entry *This);
  +int proxy_is_ipaddr(struct dirconn_entry *This, pool *p);
  +int proxy_is_domainname(struct dirconn_entry *This, pool *p);
  +int proxy_is_hostname(struct dirconn_entry *This, pool *p);
  +int proxy_is_word(struct dirconn_entry *This, pool *p);
   int proxy_doconnect(int sock, struct sockaddr_in *addr, request_rec *r);
   int proxy_garbage_init(server_rec *, pool *);
  
  
  
  1.44      +8 -4      apache-1.3/src/modules/proxy/proxy_util.c
  
  Index: proxy_util.c
  ===================================================================
  RCS file: /home/cvs/apache-1.3/src/modules/proxy/proxy_util.c,v
  retrieving revision 1.43
  retrieving revision 1.44
  diff -u -u -r1.43 -r1.44
  --- proxy_util.c      1998/02/27 10:10:20     1.43
  +++ proxy_util.c      1998/02/27 10:18:40     1.44
  @@ -867,7 +867,7 @@
   }
   
   /* Return TRUE if addr represents an IP address (or an IP network address) */
  -int proxy_is_ipaddr(struct dirconn_entry *This)
  +int proxy_is_ipaddr(struct dirconn_entry *This, pool *p)
   {
       const char *addr = This->name;
       long ip_addr[4];
  @@ -1054,7 +1054,7 @@
   }
   
   /* Return TRUE if addr represents a domain name */
  -int proxy_is_domainname(struct dirconn_entry *This)
  +int proxy_is_domainname(struct dirconn_entry *This, pool *p)
   {
       char *addr = This->name;
       int i;
  @@ -1066,10 +1066,12 @@
       /* rfc1035 says DNS names must consist of "[-a-zA-Z0-9]" and '.' */
       for (i = 0; isalnum(addr[i]) || addr[i] == '-' || addr[i] == '.'; ++i);
   
  +#if 0
       if (addr[i] == ':') {
        fprintf(stderr, "@@@@ handle optional port in proxy_is_domainname()\n");
        /* @@@@ handle optional port */
       }
  +#endif
   
       if (addr[i] != '\0')
        return 0;
  @@ -1104,7 +1106,7 @@
   }
   
   /* Return TRUE if addr represents a host name */
  -int proxy_is_hostname(struct dirconn_entry *This)
  +int proxy_is_hostname(struct dirconn_entry *This, pool *p)
   {
       char *addr = This->name;
       int i;
  @@ -1116,10 +1118,12 @@
       /* rfc1035 says DNS names must consist of "[-a-zA-Z0-9]" and '.' */
       for (i = 0; isalnum(addr[i]) || addr[i] == '-' || addr[i] == '.'; ++i);
   
  +#if 0
       if (addr[i] == ':') {
        fprintf(stderr, "@@@@ handle optional port in proxy_is_hostname()\n");
        /* @@@@ handle optional port */
       }
  +#endif
   
       if (addr[i] != '\0' || proxy_host2addr(addr, &This->hostlist) != NULL)
        return 0;
  @@ -1159,7 +1163,7 @@
   }
   
   /* Return TRUE if addr is to be matched as a word */
  -int proxy_is_word(struct dirconn_entry *This)
  +int proxy_is_word(struct dirconn_entry *This, pool *p)
   {
       This->matcher = proxy_match_word;
       return 1;
  
  
  

Reply via email to