httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dgau...@hyperreal.org
Subject cvs commit: apache-1.2/src/modules/proxy mod_proxy.c
Date Sun, 01 Feb 1998 02:47:46 GMT
dgaudet     98/01/31 18:47:46

  Modified:    src      CHANGES http_config.c http_protocol.c mod_cgi.c
                        mod_dir.c mod_rewrite.c util.c
               src/modules/proxy mod_proxy.c
  Log:
  be sensitive to the case!
  
  Revision  Changes    Path
  1.290     +3 -0      apache-1.2/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.2/src/CHANGES,v
  retrieving revision 1.289
  retrieving revision 1.290
  diff -u -r1.289 -r1.290
  --- CHANGES	1998/02/01 02:33:36	1.289
  +++ CHANGES	1998/02/01 02:47:37	1.290
  @@ -1,5 +1,8 @@
   Changes with Apache 1.2.6
   
  +  *) Fixed some case-sensitivity issues according to RFC2068.
  +     [Dean Gaudet]
  +
     *) Set r->allowed properly in mod_asis.c, mod_dir.c, mod_info.c,
        and mod_include.c.  [Dean Gaudet]
   
  
  
  
  1.51      +1 -1      apache-1.2/src/http_config.c
  
  Index: http_config.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.2/src/http_config.c,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -r1.50 -r1.51
  --- http_config.c	1998/01/30 09:13:53	1.50
  +++ http_config.c	1998/02/01 02:47:38	1.51
  @@ -883,7 +883,7 @@
       if (strcmp(w, "*") == 0) {
   	my_addr = htonl(INADDR_ANY);
   	is_an_ip_addr = 1;
  -    } else if( strcmp(w, "_default_") == 0
  +    } else if( strcasecmp(w, "_default_") == 0
   	    || strcmp(w, "255.255.255.255") == 0 ) {
   	my_addr = DEFAULT_VHOST_ADDR;
   	is_an_ip_addr = 1;
  
  
  
  1.130     +1 -1      apache-1.2/src/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.2/src/http_protocol.c,v
  retrieving revision 1.129
  retrieving revision 1.130
  diff -u -r1.129 -r1.130
  --- http_protocol.c	1998/02/01 02:22:28	1.129
  +++ http_protocol.c	1998/02/01 02:47:39	1.130
  @@ -129,7 +129,7 @@
       if (!(range = table_get(r->headers_in, "Range")))
             range = table_get(r->headers_in, "Request-Range");
   
  -    if (!range || strncmp(range, "bytes=", 6)) {
  +    if (!range || strncasecmp(range, "bytes=", 6)) {
   	table_set (r->headers_out, "Accept-Ranges", "bytes");
   	return 0;
       }
  
  
  
  1.41      +1 -1      apache-1.2/src/mod_cgi.c
  
  Index: mod_cgi.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.2/src/mod_cgi.c,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- mod_cgi.c	1998/01/30 09:14:03	1.40
  +++ mod_cgi.c	1998/02/01 02:47:40	1.41
  @@ -84,7 +84,7 @@
   int is_scriptaliased (request_rec *r)
   {
       char *t = table_get (r->notes, "alias-forced-type");
  -    return t && (!strcmp (t, "cgi-script"));
  +    return t && (!strcasecmp (t, "cgi-script"));
   }
   
   /* Configuration stuff */
  
  
  
  1.29      +1 -1      apache-1.2/src/mod_dir.c
  
  Index: mod_dir.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.2/src/mod_dir.c,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- mod_dir.c	1998/02/01 02:33:38	1.28
  +++ mod_dir.c	1998/02/01 02:47:40	1.29
  @@ -481,7 +481,7 @@
       if (r->status != HTTP_OK) {
   	return NULL;
       }
  -    if (r->content_type && !strcmp(r->content_type,"text/html") &&
!r->content_encoding) {
  +    if (r->content_type && !strcasecmp(r->content_type,"text/html") &&
!r->content_encoding) {
           if(!(thefile = pfopen(r->pool, r->filename,"r")))
               return NULL;
           n = fread(titlebuf,sizeof(char),MAX_STRING_LEN - 1,thefile);
  
  
  
  1.30      +19 -19    apache-1.2/src/mod_rewrite.c
  
  Index: mod_rewrite.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.2/src/mod_rewrite.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- mod_rewrite.c	1998/01/30 09:14:08	1.29
  +++ mod_rewrite.c	1998/02/01 02:47:41	1.30
  @@ -947,13 +947,13 @@
               return OK; 
           }
           else if (  (strlen(r->filename) > 7 &&
  -                    strncmp(r->filename, "http://", 7) == 0)
  +                    strncasecmp(r->filename, "http://", 7) == 0)
                   || (strlen(r->filename) > 8 &&
  -                    strncmp(r->filename, "https://", 8) == 0)
  +                    strncasecmp(r->filename, "https://", 8) == 0)
                   || (strlen(r->filename) > 9 &&
  -                    strncmp(r->filename, "gopher://", 9) == 0)
  +                    strncasecmp(r->filename, "gopher://", 9) == 0)
                   || (strlen(r->filename) > 6 &&
  -                    strncmp(r->filename, "ftp://", 6) == 0)    ) {
  +                    strncasecmp(r->filename, "ftp://", 6) == 0)    ) {
               /* it was finally rewritten to a remote URL */
   
               /* skip 'scheme:' */
  @@ -1179,13 +1179,13 @@
               return OK; 
           }
           else if (  (strlen(r->filename) > 7 &&
  -                    strncmp(r->filename, "http://", 7) == 0)
  +                    strncasecmp(r->filename, "http://", 7) == 0)
                   || (strlen(r->filename) > 8 &&
  -                    strncmp(r->filename, "https://", 8) == 0)
  +                    strncasecmp(r->filename, "https://", 8) == 0)
                   || (strlen(r->filename) > 9 &&
  -                    strncmp(r->filename, "gopher://", 9) == 0)
  +                    strncasecmp(r->filename, "gopher://", 9) == 0)
                   || (strlen(r->filename) > 6 &&
  -                    strncmp(r->filename, "ftp://", 6) == 0)    ) {
  +                    strncasecmp(r->filename, "ftp://", 6) == 0)    ) {
               /* it was finally rewritten to a remote URL */
   
               /* because we are in a per-dir context
  @@ -1565,10 +1565,10 @@
           /* if this is an implicit redirect in a per-dir rule */
           i = strlen(output);
           if (perdir != NULL
  -            && (   (i > 7 && strncmp(output, "http://", 7) == 0)
  -                || (i > 8 && strncmp(output, "https://", 8) == 0)
  -                || (i > 9 && strncmp(output, "gopher://", 9) == 0)
  -                || (i > 6 && strncmp(output, "ftp://", 6) == 0)   ) ) {
  +            && (   (i > 7 && strncasecmp(output, "http://", 7) == 0)
  +                || (i > 8 && strncasecmp(output, "https://", 8) == 0)
  +                || (i > 9 && strncasecmp(output, "gopher://", 9) == 0)
  +                || (i > 6 && strncasecmp(output, "ftp://", 6) == 0)   ) ) {
               if (p->flags & RULEFLAG_NOTMATCH) {
                   strncpy(newuri, output, sizeof(newuri)-1);
                   EOS_PARANOIA(newuri);
  @@ -1651,13 +1651,13 @@
           if (flags & RULEFLAG_FORCEREDIRECT) {
               r->status = p->forced_responsecode;
               if (  !(strlen(r->filename) > 7 &&
  -                    strncmp(r->filename, "http://", 7) == 0)
  +                    strncasecmp(r->filename, "http://", 7) == 0)
                  && !(strlen(r->filename) > 8 &&
  -                    strncmp(r->filename, "https://", 8) == 0)
  +                    strncasecmp(r->filename, "https://", 8) == 0)
                  && !(strlen(r->filename) > 9 &&
  -                    strncmp(r->filename, "gopher://", 9) == 0)
  +                    strncasecmp(r->filename, "gopher://", 9) == 0)
                  && !(strlen(r->filename) > 6 &&
  -                    strncmp(r->filename, "ftp://", 6) == 0)    ) {
  +                    strncasecmp(r->filename, "ftp://", 6) == 0)    ) {
   
   #ifdef APACHE_SSL
                   if ((!r->connection->client->ssl && r->server->port
== DEFAULT_PORT) ||
  @@ -1869,11 +1869,11 @@
   
   #ifdef APACHE_SSL
       if (   (!r->connection->client->ssl &&
  -            strncmp(r->filename, "http://", 7) == 0)
  +            strncasecmp(r->filename, "http://", 7) == 0)
           || (r->connection->client->ssl &&
  -            strncmp(r->filename, "https://", 8) == 0)) {
  +            strncasecmp(r->filename, "https://", 8) == 0)) {
   #else
  -    if (strncmp(r->filename, "http://", 7) == 0) {
  +    if (strncasecmp(r->filename, "http://", 7) == 0) {
   #endif
           /* there was really a rewrite to a remote path */
   
  
  
  
  1.54      +1 -1      apache-1.2/src/util.c
  
  Index: util.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.2/src/util.c,v
  retrieving revision 1.53
  retrieving revision 1.54
  diff -u -r1.53 -r1.54
  --- util.c	1998/01/30 09:14:12	1.53
  +++ util.c	1998/02/01 02:47:42	1.54
  @@ -1212,7 +1212,7 @@
       if(ind(p->h_name,'.') == -1) {
           for(x=0;p->h_aliases[x];++x) {
               if((ind(p->h_aliases[x],'.') != -1) && 
  -               (!strncmp(p->h_aliases[x],p->h_name,strlen(p->h_name))))
  +               (!strncasecmp(p->h_aliases[x],p->h_name,strlen(p->h_name))))
                   return pstrdup(a, p->h_aliases[x]);
           }
           return NULL;
  
  
  
  1.13      +6 -6      apache-1.2/src/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /export/home/cvs/apache-1.2/src/modules/proxy/mod_proxy.c,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- mod_proxy.c	1997/04/28 20:54:40	1.12
  +++ mod_proxy.c	1998/02/01 02:47:45	1.13
  @@ -216,12 +216,12 @@
       {
   	p = strchr(ents[i].scheme, ':');  /* is it a partial URL? */
   	if (strcmp(ents[i].scheme, "*") == 0 || 
  -	    (p == NULL && strcmp(scheme, ents[i].scheme) == 0) ||
  +	    (p == NULL && strcasecmp(scheme, ents[i].scheme) == 0) ||
   	    (p != NULL &&
  -	       strncmp(url, ents[i].scheme, strlen(ents[i].scheme)) == 0))
  +	       strncasecmp(url, ents[i].scheme, strlen(ents[i].scheme)) == 0))
   	{
   /* we only know how to handle communication to a proxy via http */
  -	    if (strcmp(ents[i].protocol, "http") == 0)
  +	    if (strcasecmp(ents[i].protocol, "http") == 0)
   		rc = proxy_http_handler(r, cr, url, ents[i].hostname,
   		    ents[i].port);
   	    else rc = DECLINED;
  @@ -239,9 +239,9 @@
       /* handle the scheme */
       if (r->method_number == M_CONNECT)
   	return proxy_connect_handler(r, cr, url);
  -    if (strcmp(scheme, "http") == 0)
  +    if (strcasecmp(scheme, "http") == 0)
   	return proxy_http_handler(r, cr, url, NULL, 0);
  -    if (strcmp(scheme, "ftp") == 0)
  +    if (strcasecmp(scheme, "ftp") == 0)
   	return proxy_ftp_handler(r, cr, url);
       else return NOT_IMPLEMENTED;
   }
  @@ -301,7 +301,7 @@
       {
   	int i;
   	for (i=0; defports[i].scheme != NULL; i++)
  -	    if (strcmp(defports[i].scheme, r) == 0) break;
  +	    if (strcasecmp(defports[i].scheme, r) == 0) break;
   	port = defports[i].port;
       }
   
  
  
  

Mime
View raw message