You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ji...@apache.org on 2005/11/10 16:16:24 UTC

svn commit: r332307 [2/5] - in /httpd/httpd/branches/2.2.x: modules/aaa/ modules/arch/netware/ modules/arch/win32/ modules/cache/ modules/dav/fs/ modules/dav/main/ modules/debug/ modules/experimental/ modules/filters/ modules/generators/ modules/http/ ...

Modified: httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c?rev=332307&r1=332306&r2=332307&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c (original)
+++ httpd/httpd/branches/2.2.x/modules/ldap/util_ldap.c Thu Nov 10 07:15:41 2005
@@ -308,15 +308,15 @@
             result->rc = ldapssl_set_verify_mode(LDAPSSL_VERIFY_NONE);
         }
 #elif defined(LDAP_OPT_X_TLS_REQUIRE_CERT)
-		/* This is not a per-connection setting so just pass NULL for the
-		   Ldap connection handle */
+                /* This is not a per-connection setting so just pass NULL for the
+                   Ldap connection handle */
         if (st->verify_svr_cert) {
-			int i = LDAP_OPT_X_TLS_DEMAND;
-			result->rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &i);
+                        int i = LDAP_OPT_X_TLS_DEMAND;
+                        result->rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &i);
         }
         else {
-			int i = LDAP_OPT_X_TLS_NEVER;
-			result->rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &i);
+                        int i = LDAP_OPT_X_TLS_NEVER;
+                        result->rc = ldap_set_option(NULL, LDAP_OPT_X_TLS_REQUIRE_CERT, &i);
         }
 #endif
 #endif
@@ -634,20 +634,20 @@
 
 start_over:
     if (failures++ > 10) {
-	/* too many failures */
+        /* too many failures */
         return result;
     }
 
     /* make a server connection */
     if (LDAP_SUCCESS != (result = uldap_connection_open(r, ldc))) {
-	/* connect to server failed */
+        /* connect to server failed */
         return result;
     }
 
     /* search for reqdn */
     if ((result = ldap_search_ext_s(ldc->ldap, (char *)reqdn, LDAP_SCOPE_BASE,
-				    "(objectclass=*)", NULL, 1, 
-				    NULL, NULL, NULL, -1, &res)) 
+                                    "(objectclass=*)", NULL, 1, 
+                                    NULL, NULL, NULL, -1, &res)) 
             == LDAP_SERVER_DOWN) 
     {
         ldc->reason = "DN Comparison ldap_search_ext_s() "
@@ -923,9 +923,9 @@
 
     /* try do the search */
     if ((result = ldap_search_ext_s(ldc->ldap,
-				    (char *)basedn, scope, 
-				    (char *)filter, attrs, 0, 
-				    NULL, NULL, NULL, -1, &res)) 
+                                    (char *)basedn, scope, 
+                                    (char *)filter, attrs, 0, 
+                                    NULL, NULL, NULL, -1, &res)) 
             == LDAP_SERVER_DOWN) 
     {
         ldc->reason = "ldap_search_ext_s() for user failed with server down";
@@ -1163,9 +1163,9 @@
 
     /* try do the search */
     if ((result = ldap_search_ext_s(ldc->ldap,
-				    (char *)basedn, scope,
+                                    (char *)basedn, scope,
                                     (char *)filter, attrs, 0, 
-				    NULL, NULL, NULL, -1, &res)) 
+                                    NULL, NULL, NULL, -1, &res)) 
             == LDAP_SERVER_DOWN) 
     {
         ldc->reason = "ldap_search_ext_s() for user failed with server down";
@@ -1294,7 +1294,7 @@
 {
     util_ldap_state_t *st = 
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, 
-						  &ldap_module);
+                                                  &ldap_module);
 
     st->cache_bytes = atol(bytes);
 
@@ -1332,7 +1332,7 @@
 {
     util_ldap_state_t *st = 
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, 
-						  &ldap_module);
+                                                  &ldap_module);
 
     st->search_cache_ttl = atol(ttl) * 1000000;
 
@@ -1348,7 +1348,7 @@
 {
     util_ldap_state_t *st = 
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, 
-						  &ldap_module);
+                                                  &ldap_module);
 
 
     st->search_cache_size = atol(size);
@@ -1368,7 +1368,7 @@
 {
     util_ldap_state_t *st = 
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, 
-						  &ldap_module);
+                                                  &ldap_module);
 
     st->compare_cache_ttl = atol(ttl) * 1000000;
 
@@ -1384,7 +1384,7 @@
 {
     util_ldap_state_t *st = 
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, 
-						  &ldap_module);
+                                                  &ldap_module);
 
     st->compare_cache_size = atol(size);
     if (st->compare_cache_size < 0) {
@@ -1698,7 +1698,7 @@
 {
     util_ldap_state_t *st = 
         (util_ldap_state_t *)ap_get_module_config(cmd->server->module_config, 
-						  &ldap_module);
+                                                  &ldap_module);
     const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
 
     if (err != NULL) {

Modified: httpd/httpd/branches/2.2.x/modules/ldap/util_ldap_cache.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/ldap/util_ldap_cache.c?rev=332307&r1=332306&r2=332307&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/ldap/util_ldap_cache.c (original)
+++ httpd/httpd/branches/2.2.x/modules/ldap/util_ldap_cache.c Thu Nov 10 07:15:41 2005
@@ -247,8 +247,8 @@
     util_compare_node_t *nb = b;
 
     return (strcmp(na->dn, nb->dn) == 0 &&
-	    strcmp(na->attrib, nb->attrib) == 0 &&
-	    strcmp(na->value, nb->value) == 0);
+            strcmp(na->attrib, nb->attrib) == 0 &&
+            strcmp(na->value, nb->value) == 0);
 }
 
 void *util_ldap_compare_node_copy(util_ald_cache_t *cache, void *c)

Modified: httpd/httpd/branches/2.2.x/modules/mappers/mod_actions.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/mappers/mod_actions.c?rev=332307&r1=332306&r2=332307&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/mappers/mod_actions.c (original)
+++ httpd/httpd/branches/2.2.x/modules/mappers/mod_actions.c Thu Nov 10 07:15:41 2005
@@ -78,7 +78,7 @@
     int i;
 
     new->action_types = apr_table_overlay(p, add->action_types,
-				       base->action_types);
+                                       base->action_types);
 
     for (i = 0; i < METHODS; ++i) {
         new->scripted[i] = add->scripted[i] ? add->scripted[i]
@@ -173,7 +173,7 @@
 
     /* Check for looping, which can happen if the CGI script isn't */
     if (script && r->prev && r->prev->prev)
-	return DECLINED;
+        return DECLINED;
 
     /* Second, check for actions (which override the method scripts) */
     action = r->handler ? r->handler :
@@ -195,7 +195,7 @@
     }
 
     if (script == NULL)
-	return DECLINED;
+        return DECLINED;
 
     ap_internal_redirect_handler(apr_pstrcat(r->pool, script,
                                              ap_escape_uri(r->pool, r->uri),

Modified: httpd/httpd/branches/2.2.x/modules/mappers/mod_imagemap.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/mappers/mod_imagemap.c?rev=332307&r1=332306&r2=332307&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/mappers/mod_imagemap.c (original)
+++ httpd/httpd/branches/2.2.x/modules/mappers/mod_imagemap.c Thu Nov 10 07:15:41 2005
@@ -181,8 +181,8 @@
     double x = point[X], y = point[Y];
 
     for (numverts = 0; pgon[numverts][X] != -1 && numverts < MAXVERTS;
-	numverts++) {
-	/* just counting the vertexes */
+        numverts++) {
+        /* just counting the vertexes */
     }
 
     for (i = 0; i < numverts; i++) {
@@ -193,12 +193,12 @@
         double d=(y - y1) * (x2 - x1) - (x - x1) * (y2 - y1);
 
         if ((y1 >= y) != (y2 >= y)) {
-	    crossings +=y2 - y1 >= 0 ? d >= 0 : d <= 0;
-	}
+            crossings +=y2 - y1 >= 0 ? d >= 0 : d <= 0;
+        }
         if (!d && fmin(x1,x2) <= x && x <= fmax(x1,x2)
-	    && fmin(y1,y2) <= y && y <= fmax(y1,y2)) {
-	    return 1;
-	}
+            && fmin(y1,y2) <= y && y <= fmax(y1,y2)) {
+            return 1;
+        }
     }
     return crossings & 0x01;
 }
@@ -270,13 +270,13 @@
         while (*start_of_y && !apr_isdigit(*start_of_y)) {
             start_of_y++;       /* jump to the first digit, but not
                                    past the end */
-	}
+        }
 
         y_coord = strtod(start_of_y, &endptr);
 
         if (endptr > start_of_y) {
             return (y_coord);
-	}
+        }
     }
 
     return (-1);                /* if no conversion was made, or
@@ -304,16 +304,16 @@
 
     if (*strp == '"') {       	/* if that character is a double quote */
         strp++;               	/* step over it */
-	*quoted_part = strp;  	/* note where the quoted part begins */
+        *quoted_part = strp;  	/* note where the quoted part begins */
 
         while (*strp && *strp != '"') {
-	    ++strp;		/* skip the quoted portion */
+            ++strp;		/* skip the quoted portion */
         }
 
         *strp = '\0';    	/* end the string with a NUL */
 
         strp++;               	/* step over the last double quote */
-	*string = strp;
+        *string = strp;
     }
 }
 
@@ -331,7 +331,7 @@
     char *my_base;
 
     if (!strcasecmp(value, "map") || !strcasecmp(value, "menu")) {
-	return ap_construct_url(r->pool, r->uri, r);
+        return ap_construct_url(r->pool, r->uri, r);
     }
 
     if (!strcasecmp(value, "nocontent") || !strcasecmp(value, "error")) {
@@ -342,11 +342,11 @@
     if (!strcasecmp(value, "referer")) {
         referer = apr_table_get(r->headers_in, "Referer");
         if (referer && *referer) {
-	    return apr_pstrdup(r->pool, referer);
+            return apr_pstrdup(r->pool, referer);
         }
         else {
-	    /* XXX:  This used to do *value = '\0'; ... which is totally bogus
-	     * because it hammers the passed in value, which can be a string
+            /* XXX:  This used to do *value = '\0'; ... which is totally bogus
+             * because it hammers the passed in value, which can be a string
              * constant, or part of a config, or whatever.  Total garbage.
              * This works around that without changing the rest of this
              * code much
@@ -358,21 +358,21 @@
 
     string_pos_const = value;
     while (apr_isalpha(*string_pos_const)) {
-	string_pos_const++;           /* go along the URL from the map
+        string_pos_const++;           /* go along the URL from the map
                                          until a non-letter */
     }
     if (*string_pos_const == ':') {
-	/* if letters and then a colon (like http:) */
-	/* it's an absolute URL, so use it! */
-	return apr_pstrdup(r->pool, value);
+        /* if letters and then a colon (like http:) */
+        /* it's an absolute URL, so use it! */
+        return apr_pstrdup(r->pool, value);
     }
 
     if (!base || !*base) {
         if (value && *value) {
-	    return apr_pstrdup(r->pool, value); /* no base: use what is given */
+            return apr_pstrdup(r->pool, value); /* no base: use what is given */
         }
-	/* no base, no value: pick a simple default */
-	return ap_construct_url(r->pool, "/", r);
+        /* no base, no value: pick a simple default */
+        return ap_construct_url(r->pool, "/", r);
     }
 
     /* must be a relative URL to be combined with base */
@@ -427,11 +427,11 @@
 
                 if ((string_pos = strrchr(directory, '/'))) {
                     *string_pos = '\0';
-		}
+                }
                 clen = strlen(directory);
                 if (clen == 0) {
                     break;
-		}
+                }
             }
 
             value += 2;         /* jump over the '..' that we found in the
@@ -448,13 +448,13 @@
                                    to do.  This way, we leave the starting
                                    '/' on value after the last '..', but get
                                    rid of it otherwise */
-	}
+        }
 
     }                           /* by this point, value does not start
                                    with '..' */
 
     if (value && *value) {
-	return apr_pstrcat(r->pool, my_base, value, NULL);
+        return apr_pstrcat(r->pool, my_base, value, NULL);
     }
     return my_base;
 }
@@ -609,12 +609,12 @@
     base = imap_url(r, NULL, imap_base);         /* set base according
                                                     to default */
     if (!base) {
-	return HTTP_INTERNAL_SERVER_ERROR;
+        return HTTP_INTERNAL_SERVER_ERROR;
     }
     mapdflt = imap_url(r, NULL, imap_default);   /* and default to
                                                     global default */
     if (!mapdflt) {
-	return HTTP_INTERNAL_SERVER_ERROR;
+        return HTTP_INTERNAL_SERVER_ERROR;
     }
 
     testpoint[X] = get_x_coord(r->args);
@@ -629,7 +629,7 @@
         if (strncasecmp(imap_menu, "none", 2)) {
             showmenu = 1;       /* show the menu _unless_ ImapMenu is
                                    'none' or 'no' */
-	}
+        }
     }
 
     if (showmenu) {             /* send start of imagemap menu if
@@ -653,51 +653,51 @@
         }                       /* blank lines and comments are ignored
                                    if we aren't printing a menu */
 
-	/* find the first two space delimited fields, recall that
-	 * ap_cfg_getline has removed leading/trailing whitespace.
-	 *
-	 * note that we're tokenizing as we go... if we were to use the
-	 * ap_getword() class of functions we would end up allocating extra
-	 * memory for every line of the map file
-	 */
+        /* find the first two space delimited fields, recall that
+         * ap_cfg_getline has removed leading/trailing whitespace.
+         *
+         * note that we're tokenizing as we go... if we were to use the
+         * ap_getword() class of functions we would end up allocating extra
+         * memory for every line of the map file
+         */
         string_pos = input;
-	if (!*string_pos) {		/* need at least two fields */
-	    goto need_2_fields;
-	}
-
-	directive = string_pos;
-	while (*string_pos && !apr_isspace(*string_pos)) {	/* past directive */
-	    ++string_pos;
-	}
-	if (!*string_pos) {		/* need at least two fields */
-	    goto need_2_fields;
-	}
-	*string_pos++ = '\0';
-
-	if (!*string_pos) {		/* need at least two fields */
-	    goto need_2_fields;
-	}
-	while(*string_pos && apr_isspace(*string_pos)) { /* past whitespace */
-	    ++string_pos;
-	}
-
-	value = string_pos;
-	while (*string_pos && !apr_isspace(*string_pos)) {	/* past value */
-	    ++string_pos;
-	}
-	if (apr_isspace(*string_pos)) {
-	    *string_pos++ = '\0';
-	}
-	else {
-	    /* end of input, don't advance past it */
-	    *string_pos = '\0';
-	}
+        if (!*string_pos) {		/* need at least two fields */
+            goto need_2_fields;
+        }
+
+        directive = string_pos;
+        while (*string_pos && !apr_isspace(*string_pos)) {	/* past directive */
+            ++string_pos;
+        }
+        if (!*string_pos) {		/* need at least two fields */
+            goto need_2_fields;
+        }
+        *string_pos++ = '\0';
+
+        if (!*string_pos) {		/* need at least two fields */
+            goto need_2_fields;
+        }
+        while(*string_pos && apr_isspace(*string_pos)) { /* past whitespace */
+            ++string_pos;
+        }
+
+        value = string_pos;
+        while (*string_pos && !apr_isspace(*string_pos)) {	/* past value */
+            ++string_pos;
+        }
+        if (apr_isspace(*string_pos)) {
+            *string_pos++ = '\0';
+        }
+        else {
+            /* end of input, don't advance past it */
+            *string_pos = '\0';
+        }
 
         if (!strncasecmp(directive, "base", 4)) {       /* base, base_uri */
             base = imap_url(r, NULL, value);
-	    if (!base) {
-		goto menu_bail;
-	    }
+            if (!base) {
+                goto menu_bail;
+            }
             continue;           /* base is never printed to a menu */
         }
 
@@ -705,14 +705,14 @@
 
         if (!strcasecmp(directive, "default")) {        /* default */
             mapdflt = imap_url(r, NULL, value);
-	    if (!mapdflt) {
-		goto menu_bail;
-	    }
+            if (!mapdflt) {
+                goto menu_bail;
+            }
             if (showmenu) {     /* print the default if there's a menu */
                 redirect = imap_url(r, base, mapdflt);
-		if (!redirect) {
-		    goto menu_bail;
-		}
+                if (!redirect) {
+                    goto menu_bail;
+                }
                 menu_default(r, imap_menu, redirect,
                              href_text ? href_text : mapdflt);
             }
@@ -726,17 +726,17 @@
             /* Now skip what we just read... we can't use ANSIism %n */
             while (apr_isspace(*string_pos)) {      /* past whitespace */
                 string_pos++;
-	    }
+            }
             while (apr_isdigit(*string_pos)) {      /* and the 1st number */
                 string_pos++;
-	    }
+            }
             string_pos++;       /* skip the ',' */
             while (apr_isspace(*string_pos)) {      /* past any more whitespace */
                 string_pos++;
-	    }
+            }
             while (apr_isdigit(*string_pos)) {      /* 2nd number */
                 string_pos++;
-	    }
+            }
             vertex++;
         }                       /* so long as there are more vertices to
                                    read, and we have room, read them in.
@@ -746,14 +746,14 @@
         pointarray[vertex][X] = -1;     /* signals the end of vertices */
 
         if (showmenu) {
-	    if (!href_text) {
-		read_quoted(&string_pos, &href_text);     /* href text could
+            if (!href_text) {
+                read_quoted(&string_pos, &href_text);     /* href text could
                                                              be here instead */
-	    }
+            }
             redirect = imap_url(r, base, value);
-	    if (!redirect) {
-		goto menu_bail;
-	    }
+            if (!redirect) {
+                goto menu_bail;
+            }
             menu_directive(r, imap_menu, redirect,
                            href_text ? href_text : value);
             continue;
@@ -764,16 +764,16 @@
             continue;           /* don't try the following tests if testpoints
                                    are invalid, or if there are no
                                    coordinates */
-	}
+        }
 
         if (!strcasecmp(directive, "poly")) {   /* poly */
 
             if (pointinpoly(testpoint, pointarray)) {
-		ap_cfg_closefile(imap);
+                ap_cfg_closefile(imap);
                 redirect = imap_url(r, base, value);
-		if (!redirect) {
-		    return HTTP_INTERNAL_SERVER_ERROR;
-		}
+                if (!redirect) {
+                    return HTTP_INTERNAL_SERVER_ERROR;
+                }
                 return (imap_reply(r, redirect));
             }
             continue;
@@ -782,11 +782,11 @@
         if (!strcasecmp(directive, "circle")) {         /* circle */
 
             if (pointincircle(testpoint, pointarray)) {
-		ap_cfg_closefile(imap);
+                ap_cfg_closefile(imap);
                 redirect = imap_url(r, base, value);
-		if (!redirect) {
-		    return HTTP_INTERNAL_SERVER_ERROR;
-		}
+                if (!redirect) {
+                    return HTTP_INTERNAL_SERVER_ERROR;
+                }
                 return (imap_reply(r, redirect));
             }
             continue;
@@ -795,11 +795,11 @@
         if (!strcasecmp(directive, "rect")) {   /* rect */
 
             if (pointinrect(testpoint, pointarray)) {
-		ap_cfg_closefile(imap);
+                ap_cfg_closefile(imap);
                 redirect = imap_url(r, base, value);
-		if (!redirect) {
-		    return HTTP_INTERNAL_SERVER_ERROR;
-		}
+                if (!redirect) {
+                    return HTTP_INTERNAL_SERVER_ERROR;
+                }
                 return (imap_reply(r, redirect));
             }
             continue;
@@ -808,7 +808,7 @@
         if (!strcasecmp(directive, "point")) {  /* point */
 
             if (is_closer(testpoint, pointarray, &closest_yet)) {
-		closest = apr_pstrdup(r->pool, value);
+                closest = apr_pstrdup(r->pool, value);
             }
 
             continue;
@@ -826,18 +826,18 @@
 
     if (closest) {             /* if a 'point' directive has been seen */
         redirect = imap_url(r, base, closest);
-	if (!redirect) {
-	    return HTTP_INTERNAL_SERVER_ERROR;
-	}
+        if (!redirect) {
+            return HTTP_INTERNAL_SERVER_ERROR;
+        }
         return (imap_reply(r, redirect));
     }
 
     if (mapdflt) {             /* a default should be defined, even if
                                   only 'nocontent' */
         redirect = imap_url(r, base, mapdflt);
-	if (!redirect) {
-	    return HTTP_INTERNAL_SERVER_ERROR;
-	}
+        if (!redirect) {
+            return HTTP_INTERNAL_SERVER_ERROR;
+        }
         return (imap_reply(r, redirect));
     }
 
@@ -846,18 +846,18 @@
 
 need_2_fields:
     ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r,
-		"map file %s, line %d syntax error: requires at "
+                "map file %s, line %d syntax error: requires at "
                 "least two fields", r->uri, imap->line_number);
     /* fall through */
 menu_bail:
     ap_cfg_closefile(imap);
     if (showmenu) {
-	/* There's not much else we can do ... we've already sent the headers
-	 * to the client.
-	 */
-	ap_rputs("\n\n[an internal server error occured]\n", r);
-	menu_footer(r);
-	return OK;
+        /* There's not much else we can do ... we've already sent the headers
+         * to the client.
+         */
+        ap_rputs("\n\n[an internal server error occured]\n", r);
+        menu_footer(r);
+        return OK;
     }
     return HTTP_INTERNAL_SERVER_ERROR;
 }
@@ -869,8 +869,8 @@
      * imagemaps
      */
     if (r->method_number != M_GET || (strcmp(r->handler,IMAP_MAGIC_TYPE)
-				      && strcmp(r->handler, "imap-file"))) {
-	return DECLINED;
+                                      && strcmp(r->handler, "imap-file"))) {
+        return DECLINED;
     }
     else {
         return imap_handler_internal(r);

Modified: httpd/httpd/branches/2.2.x/modules/mappers/mod_so.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/mappers/mod_so.c?rev=332307&r1=332306&r2=332307&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/mappers/mod_so.c (original)
+++ httpd/httpd/branches/2.2.x/modules/mappers/mod_so.c Thu Nov 10 07:15:41 2005
@@ -179,7 +179,7 @@
      * Check both dynamically-loaded modules and statically-linked modules.
      */
     sconf = (so_server_conf *)ap_get_module_config(cmd->server->module_config, 
-	                                        &so_module);
+                                                &so_module);
     modie = (ap_module_symbol_t *)sconf->loaded_modules->elts;
     for (i = 0; i < sconf->loaded_modules->nelts; i++) {
         modi = &modie[i];
@@ -239,12 +239,12 @@
         char my_error[256];
 
         return apr_pstrcat(cmd->pool, "Cannot load ", szModuleFile,
-			  " into server: ",
-			  apr_dso_error(modhandle, my_error, sizeof(my_error)),
-			  NULL);
+                          " into server: ",
+                          apr_dso_error(modhandle, my_error, sizeof(my_error)),
+                          NULL);
     }
     ap_log_perror(APLOG_MARK, APLOG_DEBUG, 0, cmd->pool,
-		 "loaded module %s", modname);
+                 "loaded module %s", modname);
 
     /*
      * Retrieve the pointer to the module structure through the module name:
@@ -254,10 +254,10 @@
     if (apr_dso_sym(&modsym, modhandle, modname) != APR_SUCCESS) {
         char my_error[256];
 
-	return apr_pstrcat(cmd->pool, "Can't locate API module structure `",
-			  modname, "' in file ", szModuleFile, ": ", 
-			  apr_dso_error(modhandle, my_error, sizeof(my_error)),
-			  NULL);
+        return apr_pstrcat(cmd->pool, "Can't locate API module structure `",
+                          modname, "' in file ", szModuleFile, ": ", 
+                          apr_dso_error(modhandle, my_error, sizeof(my_error)),
+                          NULL);
     }
     modp = (module*) modsym;
     modp->dynamic_load_handle = (apr_dso_handle_t *)modhandle;
@@ -316,14 +316,14 @@
     if (apr_dso_load(&handle, file, cmd->pool) != APR_SUCCESS) {
         char my_error[256];
 
-	return apr_pstrcat(cmd->pool, "Cannot load ", filename, 
-			  " into server: ", 
-			  apr_dso_error(handle, my_error, sizeof(my_error)),
-			  NULL);
+        return apr_pstrcat(cmd->pool, "Cannot load ", filename, 
+                          " into server: ", 
+                          apr_dso_error(handle, my_error, sizeof(my_error)),
+                          NULL);
     }
     
     ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, NULL,
-		 "loaded file %s", filename);
+                 "loaded file %s", filename);
 
     return NULL;
 }
@@ -395,7 +395,7 @@
 }
 
 static const char *load_module(cmd_parms *cmd, void *dummy, 
-	                       const char *modname, const char *filename)
+                               const char *modname, const char *filename)
 {
     ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0, cmd->pool, 
                  "WARNING: LoadModule not supported on this platform");

Modified: httpd/httpd/branches/2.2.x/modules/mappers/mod_speling.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/mappers/mod_speling.c?rev=332307&r1=332306&r2=332307&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/mappers/mod_speling.c (original)
+++ httpd/httpd/branches/2.2.x/modules/mappers/mod_speling.c Thu Nov 10 07:15:41 2005
@@ -164,22 +164,22 @@
     for (; apr_tolower(*s) == apr_tolower(*t); t++, s++) {
         if (*t == '\0') {
             return SP_MISCAPITALIZED;   /* exact match (sans case) */
-	}
+        }
     }
     if (*s) {
         if (*t) {
             if (s[1] && t[1] && apr_tolower(*s) == apr_tolower(t[1])
-		&& apr_tolower(*t) == apr_tolower(s[1])
-		&& strcasecmp(s + 2, t + 2) == 0) {
+                && apr_tolower(*t) == apr_tolower(s[1])
+                && strcasecmp(s + 2, t + 2) == 0) {
                 return SP_TRANSPOSITION;        /* transposition */
-	    }
+            }
             if (strcasecmp(s + 1, t + 1) == 0) {
                 return SP_SIMPLETYPO;   /* 1 char mismatch */
-	    }
+            }
         }
         if (strcasecmp(s + 1, t) == 0) {
             return SP_EXTRACHAR;        /* extra character */
-	}
+        }
     }
     if (*t && strcasecmp(s, t + 1) == 0) {
         return SP_MISSINGCHAR;  /* missing character */
@@ -296,7 +296,7 @@
         else if (strcasecmp(bad, dirent.name) == 0) {
             misspelled_file *sp_new;
 
-	    sp_new = (misspelled_file *) apr_array_push(candidates);
+            sp_new = (misspelled_file *) apr_array_push(candidates);
             sp_new->name = apr_pstrdup(r->pool, dirent.name);
             sp_new->quality = SP_MISCAPITALIZED;
         }
@@ -308,17 +308,17 @@
         else if ((q = spdist(bad, dirent.name)) != SP_VERYDIFFERENT) {
             misspelled_file *sp_new;
 
-	    sp_new = (misspelled_file *) apr_array_push(candidates);
+            sp_new = (misspelled_file *) apr_array_push(candidates);
             sp_new->name = apr_pstrdup(r->pool, dirent.name);
             sp_new->quality = q;
         }
 
         /*
-	 * The spdist() should have found the majority of the misspelled
-	 * requests.  It is of questionable use to continue looking for
-	 * files with the same base name, but potentially of totally wrong
-	 * type (index.html <-> index.db).
-	 * I would propose to not set the WANT_BASENAME_MATCH define.
+         * The spdist() should have found the majority of the misspelled
+         * requests.  It is of questionable use to continue looking for
+         * files with the same base name, but potentially of totally wrong
+         * type (index.html <-> index.db).
+         * I would propose to not set the WANT_BASENAME_MATCH define.
          *      08-Aug-1997 <Ma...@Mch.SNI.De>
          *
          * However, Alexei replied giving some reasons to add it anyway:
@@ -326,12 +326,12 @@
          * > extension-stripping-and-matching stuff is a good idea:
          * >
          * > If you're using MultiViews, and have a file named foobar.html,
-	 * > which you refer to as "foobar", and someone tried to access
-	 * > "Foobar", mod_speling won't find it, because it won't find
-	 * > anything matching that spelling. With the extension-munging,
-	 * > it would locate "foobar.html". Not perfect, but I ran into
-	 * > that problem when I first wrote the module.
-	 */
+         * > which you refer to as "foobar", and someone tried to access
+         * > "Foobar", mod_speling won't find it, because it won't find
+         * > anything matching that spelling. With the extension-munging,
+         * > it would locate "foobar.html". Not perfect, but I ran into
+         * > that problem when I first wrote the module.
+         */
         else {
 #ifdef WANT_BASENAME_MATCH
             /*
@@ -348,13 +348,13 @@
             int entloc = ap_ind(dirent.name, '.');
             if (entloc == -1) {
                 entloc = strlen(dirent.name);
-	    }
+            }
 
             if ((dotloc == entloc)
                 && !strncasecmp(bad, dirent.name, dotloc)) {
                 misspelled_file *sp_new;
 
-		sp_new = (misspelled_file *) apr_array_push(candidates);
+                sp_new = (misspelled_file *) apr_array_push(candidates);
                 sp_new->name = apr_pstrdup(r->pool, dirent.name);
                 sp_new->quality = SP_VERYDIFFERENT;
             }
@@ -366,7 +366,7 @@
     if (candidates->nelts != 0) {
         /* Wow... we found us a mispelling. Construct a fixed url */
         char *nuri;
-	const char *ref;
+        const char *ref;
         misspelled_file *variant = (misspelled_file *) candidates->elts;
         int i;
 
@@ -379,27 +379,27 @@
          * Conditions for immediate redirection: 
          *     a) the first candidate was not found by stripping the suffix 
          * AND b) there exists only one candidate OR the best match is not
-	 *        ambiguous
+         *        ambiguous
          * then return a redirection right away.
          */
         if (variant[0].quality != SP_VERYDIFFERENT
-	    && (candidates->nelts == 1
-		|| variant[0].quality != variant[1].quality)) {
+            && (candidates->nelts == 1
+                || variant[0].quality != variant[1].quality)) {
 
             nuri = ap_escape_uri(r->pool, apr_pstrcat(r->pool, url,
-						     variant[0].name,
-						     r->path_info, NULL));
-	    if (r->parsed_uri.query)
-		nuri = apr_pstrcat(r->pool, nuri, "?", r->parsed_uri.query, NULL);
+                                                     variant[0].name,
+                                                     r->path_info, NULL));
+            if (r->parsed_uri.query)
+                nuri = apr_pstrcat(r->pool, nuri, "?", r->parsed_uri.query, NULL);
 
             apr_table_setn(r->headers_out, "Location",
-			  ap_construct_url(r->pool, nuri, r));
+                          ap_construct_url(r->pool, nuri, r));
 
             ap_log_rerror(APLOG_MARK, APLOG_INFO, APR_SUCCESS,
-			  r, 
-			  ref ? "Fixed spelling: %s to %s from %s"
-			      : "Fixed spelling: %s to %s",
-			  r->uri, nuri, ref);
+                          r, 
+                          ref ? "Fixed spelling: %s to %s from %s"
+                              : "Fixed spelling: %s to %s",
+                          r->uri, nuri, ref);
 
             return HTTP_MOVED_PERMANENTLY;
         }
@@ -410,9 +410,9 @@
         else {
             apr_pool_t *p;
             apr_table_t *notes;
-	    apr_pool_t *sub_pool;
-	    apr_array_header_t *t;
-	    apr_array_header_t *v;
+            apr_pool_t *sub_pool;
+            apr_array_header_t *t;
+            apr_array_header_t *v;
 
 
             if (r->main == NULL) {
@@ -424,49 +424,49 @@
                 notes = r->main->notes;
             }
 
-	    if (apr_pool_create(&sub_pool, p) != APR_SUCCESS)
-		return DECLINED;
+            if (apr_pool_create(&sub_pool, p) != APR_SUCCESS)
+                return DECLINED;
 
-	    t = apr_array_make(sub_pool, candidates->nelts * 8 + 8,
-			      sizeof(char *));
-	    v = apr_array_make(sub_pool, candidates->nelts * 5,
-			      sizeof(char *));
+            t = apr_array_make(sub_pool, candidates->nelts * 8 + 8,
+                              sizeof(char *));
+            v = apr_array_make(sub_pool, candidates->nelts * 5,
+                              sizeof(char *));
 
             /* Generate the response text. */
 
-	    *(const char **)apr_array_push(t) =
-			  "The document name you requested (<code>";
-	    *(const char **)apr_array_push(t) = ap_escape_html(sub_pool, r->uri);
-	    *(const char **)apr_array_push(t) =
-			   "</code>) could not be found on this server.\n"
-			   "However, we found documents with names similar "
-			   "to the one you requested.<p>"
-			   "Available documents:\n<ul>\n";
+            *(const char **)apr_array_push(t) =
+                          "The document name you requested (<code>";
+            *(const char **)apr_array_push(t) = ap_escape_html(sub_pool, r->uri);
+            *(const char **)apr_array_push(t) =
+                           "</code>) could not be found on this server.\n"
+                           "However, we found documents with names similar "
+                           "to the one you requested.<p>"
+                           "Available documents:\n<ul>\n";
 
             for (i = 0; i < candidates->nelts; ++i) {
-		char *vuri;
-		const char *reason;
+                char *vuri;
+                const char *reason;
 
-		reason = sp_reason_str[(int) (variant[i].quality)];
+                reason = sp_reason_str[(int) (variant[i].quality)];
                 /* The format isn't very neat... */
-		vuri = apr_pstrcat(sub_pool, url, variant[i].name, r->path_info,
-				  (r->parsed_uri.query != NULL) ? "?" : "",
-				  (r->parsed_uri.query != NULL)
-				      ? r->parsed_uri.query : "",
-				  NULL);
-		*(const char **)apr_array_push(v) = "\"";
-		*(const char **)apr_array_push(v) = ap_escape_uri(sub_pool, vuri);
-		*(const char **)apr_array_push(v) = "\";\"";
-		*(const char **)apr_array_push(v) = reason;
-		*(const char **)apr_array_push(v) = "\"";
-
-		*(const char **)apr_array_push(t) = "<li><a href=\"";
-		*(const char **)apr_array_push(t) = ap_escape_uri(sub_pool, vuri);
-		*(const char **)apr_array_push(t) = "\">";
-		*(const char **)apr_array_push(t) = ap_escape_html(sub_pool, vuri);
-		*(const char **)apr_array_push(t) = "</a> (";
-		*(const char **)apr_array_push(t) = reason;
-		*(const char **)apr_array_push(t) = ")\n";
+                vuri = apr_pstrcat(sub_pool, url, variant[i].name, r->path_info,
+                                  (r->parsed_uri.query != NULL) ? "?" : "",
+                                  (r->parsed_uri.query != NULL)
+                                      ? r->parsed_uri.query : "",
+                                  NULL);
+                *(const char **)apr_array_push(v) = "\"";
+                *(const char **)apr_array_push(v) = ap_escape_uri(sub_pool, vuri);
+                *(const char **)apr_array_push(v) = "\";\"";
+                *(const char **)apr_array_push(v) = reason;
+                *(const char **)apr_array_push(v) = "\"";
+
+                *(const char **)apr_array_push(t) = "<li><a href=\"";
+                *(const char **)apr_array_push(t) = ap_escape_uri(sub_pool, vuri);
+                *(const char **)apr_array_push(t) = "\">";
+                *(const char **)apr_array_push(t) = ap_escape_html(sub_pool, vuri);
+                *(const char **)apr_array_push(t) = "</a> (";
+                *(const char **)apr_array_push(t) = reason;
+                *(const char **)apr_array_push(t) = ")\n";
 
                 /*
                  * when we have printed the "close matches" and there are
@@ -478,36 +478,36 @@
                 if (i > 0 && i < candidates->nelts - 1
                     && variant[i].quality != SP_VERYDIFFERENT
                     && variant[i + 1].quality == SP_VERYDIFFERENT) {
-		    *(const char **)apr_array_push(t) = 
-				   "</ul>\nFurthermore, the following related "
-				   "documents were found:\n<ul>\n";
+                    *(const char **)apr_array_push(t) = 
+                                   "</ul>\nFurthermore, the following related "
+                                   "documents were found:\n<ul>\n";
                 }
             }
-	    *(const char **)apr_array_push(t) = "</ul>\n";
+            *(const char **)apr_array_push(t) = "</ul>\n";
 
             /* If we know there was a referring page, add a note: */
             if (ref != NULL) {
                 *(const char **)apr_array_push(t) =
-			       "Please consider informing the owner of the "
-			       "<a href=\"";
-		*(const char **)apr_array_push(t) = ap_escape_uri(sub_pool, ref);
+                               "Please consider informing the owner of the "
+                               "<a href=\"";
+                *(const char **)apr_array_push(t) = ap_escape_uri(sub_pool, ref);
                 *(const char **)apr_array_push(t) = "\">referring page</a> "
-			       "about the broken link.\n";
-	    }
+                               "about the broken link.\n";
+            }
 
 
             /* Pass our apr_table_t to http_protocol.c (see mod_negotiation): */
             apr_table_setn(notes, "variant-list", apr_array_pstrcat(p, t, 0));
 
-	    apr_table_mergen(r->subprocess_env, "VARIANTS",
-			    apr_array_pstrcat(p, v, ','));
-	  
-	    apr_pool_destroy(sub_pool);
+            apr_table_mergen(r->subprocess_env, "VARIANTS",
+                            apr_array_pstrcat(p, v, ','));
+          
+            apr_pool_destroy(sub_pool);
 
             ap_log_rerror(APLOG_MARK, APLOG_INFO, 0, r,
-			 ref ? "Spelling fix: %s: %d candidates from %s"
-			     : "Spelling fix: %s: %d candidates",
-			 r->uri, candidates->nelts, ref);
+                         ref ? "Spelling fix: %s: %d candidates from %s"
+                             : "Spelling fix: %s: %d candidates",
+                         r->uri, candidates->nelts, ref);
 
             return HTTP_MULTIPLE_CHOICES;
         }

Modified: httpd/httpd/branches/2.2.x/modules/mappers/mod_vhost_alias.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/mappers/mod_vhost_alias.c?rev=332307&r1=332306&r2=332307&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/mappers/mod_vhost_alias.c (original)
+++ httpd/httpd/branches/2.2.x/modules/mappers/mod_vhost_alias.c Thu Nov 10 07:15:41 2005
@@ -89,20 +89,20 @@
 
     conf = (mva_sconf_t *) apr_pcalloc(p, sizeof(*conf));
     if (child->doc_root_mode == VHOST_ALIAS_UNSET) {
-	conf->doc_root_mode = parent->doc_root_mode;
-	conf->doc_root = parent->doc_root;
+        conf->doc_root_mode = parent->doc_root_mode;
+        conf->doc_root = parent->doc_root;
     }
     else {
-	conf->doc_root_mode = child->doc_root_mode;
-	conf->doc_root = child->doc_root;
+        conf->doc_root_mode = child->doc_root_mode;
+        conf->doc_root = child->doc_root;
     }
     if (child->cgi_root_mode == VHOST_ALIAS_UNSET) {
-	conf->cgi_root_mode = parent->cgi_root_mode;
-	conf->cgi_root = parent->cgi_root;
+        conf->cgi_root_mode = parent->cgi_root_mode;
+        conf->cgi_root = parent->cgi_root;
     }
     else {
-	conf->cgi_root_mode = child->cgi_root_mode;
-	conf->cgi_root = child->cgi_root;
+        conf->cgi_root_mode = child->cgi_root_mode;
+        conf->cgi_root = child->cgi_root;
     }
     return conf;
 }
@@ -125,87 +125,87 @@
     const char *p;
   
     conf = (mva_sconf_t *) ap_get_module_config(cmd->server->module_config,
-						&vhost_alias_module);
+                                                &vhost_alias_module);
     /* there ought to be a better way of doing this */
     if (&vhost_alias_set_doc_root_ip == cmd->info) {
-	mode = VHOST_ALIAS_IP;
-	pmap = &conf->doc_root;
-	pmode = &conf->doc_root_mode;
+        mode = VHOST_ALIAS_IP;
+        pmap = &conf->doc_root;
+        pmode = &conf->doc_root_mode;
     }
     else if (&vhost_alias_set_cgi_root_ip == cmd->info) {
-	mode = VHOST_ALIAS_IP;
-	pmap = &conf->cgi_root;
-	pmode = &conf->cgi_root_mode;
+        mode = VHOST_ALIAS_IP;
+        pmap = &conf->cgi_root;
+        pmode = &conf->cgi_root_mode;
     }
     else if (&vhost_alias_set_doc_root_name == cmd->info) {
-	mode = VHOST_ALIAS_NAME;
-	pmap = &conf->doc_root;
-	pmode = &conf->doc_root_mode;
+        mode = VHOST_ALIAS_NAME;
+        pmap = &conf->doc_root;
+        pmode = &conf->doc_root_mode;
     }
     else if (&vhost_alias_set_cgi_root_name == cmd->info) {
-	mode = VHOST_ALIAS_NAME;
-	pmap = &conf->cgi_root;
-	pmode = &conf->cgi_root_mode;
+        mode = VHOST_ALIAS_NAME;
+        pmap = &conf->cgi_root;
+        pmode = &conf->cgi_root_mode;
     }
     else {
-	return "INTERNAL ERROR: unknown command info";
+        return "INTERNAL ERROR: unknown command info";
     }
 
     if (!ap_os_is_path_absolute(cmd->pool, map)) {
-	if (strcasecmp(map, "none")) {
-	    return "format string must be an absolute path, or 'none'";
-	}
-	*pmap = NULL;
-	*pmode = VHOST_ALIAS_NONE;
-	return NULL;
+        if (strcasecmp(map, "none")) {
+            return "format string must be an absolute path, or 'none'";
+        }
+        *pmap = NULL;
+        *pmode = VHOST_ALIAS_NONE;
+        return NULL;
     }
 
     /* sanity check */
     p = map;
     while (*p != '\0') {
-	if (*p++ != '%') {
-	    continue;
-	}
-	/* we just found a '%' */
-	if (*p == 'p' || *p == '%') {
-	    ++p;
-	    continue;
-	}
-	/* optional dash */
-	if (*p == '-') {
-	    ++p;
-	}
-	/* digit N */
-	if (apr_isdigit(*p)) {
-	    ++p;
-	}
-	else {
-	    return "syntax error in format string";
-	}
-	/* optional plus */
-	if (*p == '+') {
-	    ++p;
-	}
-	/* do we end here? */
-	if (*p != '.') {
-	    continue;
-	}
-	++p;
-	/* optional dash */
-	if (*p == '-') {
-	    ++p;
-	}
-	/* digit M */
-	if (apr_isdigit(*p)) {
-	    ++p;
-	}
-	else {
-	    return "syntax error in format string";
-	}
-	/* optional plus */
-	if (*p == '+') {
-	    ++p;
-	}
+        if (*p++ != '%') {
+            continue;
+        }
+        /* we just found a '%' */
+        if (*p == 'p' || *p == '%') {
+            ++p;
+            continue;
+        }
+        /* optional dash */
+        if (*p == '-') {
+            ++p;
+        }
+        /* digit N */
+        if (apr_isdigit(*p)) {
+            ++p;
+        }
+        else {
+            return "syntax error in format string";
+        }
+        /* optional plus */
+        if (*p == '+') {
+            ++p;
+        }
+        /* do we end here? */
+        if (*p != '.') {
+            continue;
+        }
+        ++p;
+        /* optional dash */
+        if (*p == '-') {
+            ++p;
+        }
+        /* digit M */
+        if (apr_isdigit(*p)) {
+            ++p;
+        }
+        else {
+            return "syntax error in format string";
+        }
+        /* optional plus */
+        if (*p == '+') {
+            ++p;
+        }
     }
     *pmap = map;
     *pmode = mode;
@@ -235,23 +235,23 @@
  * but C is too feeble to support them.
  */
 static APR_INLINE void vhost_alias_checkspace(request_rec *r, char *buf,
-					     char **pdest, int size)
+                                             char **pdest, int size)
 {
     /* XXX: what if size > HUGE_STRING_LEN? */
     if (*pdest + size > buf + HUGE_STRING_LEN) {
-	**pdest = '\0';
-	if (r->filename) {
-	    r->filename = apr_pstrcat(r->pool, r->filename, buf, NULL);
-	}
-	else {
-	    r->filename = apr_pstrdup(r->pool, buf);
-	}
-	*pdest = buf;
+        **pdest = '\0';
+        if (r->filename) {
+            r->filename = apr_pstrcat(r->pool, r->filename, buf, NULL);
+        }
+        else {
+            r->filename = apr_pstrdup(r->pool, buf);
+        }
+        *pdest = buf;
     }
 }
 
 static void vhost_alias_interpolate(request_rec *r, const char *name,
-				    const char *map, const char *uri)
+                                    const char *map, const char *uri)
 {
     /* 0..9 9..0 */
     enum { MAXDOTS = 19 };
@@ -269,9 +269,9 @@
     ndots = 0;
     dots[ndots++] = name-1; /* slightly naughty */
     for (p = name; *p; ++p){
-	if (*p == '.' && ndots < MAXDOTS) {
-	    dots[ndots++] = p;
-	}
+        if (*p == '.' && ndots < MAXDOTS) {
+            dots[ndots++] = p;
+        }
     }
     dots[ndots] = p;
 
@@ -280,103 +280,103 @@
     dest = buf;
     last = '\0';
     while (*map) {
-	if (*map != '%') {
-	    /* normal characters */
-	    vhost_alias_checkspace(r, buf, &dest, 1);
-	    last = *dest++ = *map++;
-	    continue;
-	}
-	/* we are in a format specifier */
-	++map;
-	/* can't be a slash */
-	last = '\0';
-	/* %% -> % */
-	if (*map == '%') {
-	    ++map;
-	    vhost_alias_checkspace(r, buf, &dest, 1);
-	    *dest++ = '%';
-	    continue;
-	}
-	/* port number */
-	if (*map == 'p') {
-	    ++map;
-	    /* no. of decimal digits in a short plus one */
-	    vhost_alias_checkspace(r, buf, &dest, 7);
-	    dest += apr_snprintf(dest, 7, "%d", ap_get_server_port(r));
-	    continue;
-	}
-	/* deal with %-N+.-M+ -- syntax is already checked */
-	N = M = 0;   /* value */
-	Np = Mp = 0; /* is there a plus? */
-	Nd = Md = 0; /* is there a dash? */
-	if (*map == '-') ++map, Nd = 1;
-	N = *map++ - '0';
-	if (*map == '+') ++map, Np = 1;
-	if (*map == '.') {
-	    ++map;
-	    if (*map == '-') {
-		++map, Md = 1;
-	    }
-	    M = *map++ - '0';
-	    if (*map == '+') {
-		++map, Mp = 1;
-	    }
-	}
-	/* note that N and M are one-based indices, not zero-based */
-	start = dots[0]+1; /* ptr to the first character */
-	end = dots[ndots]; /* ptr to the character after the last one */
-	if (N != 0) {
-	    if (N > ndots) {
-		start = "_";
-		end = start+1;
-	    }
-	    else if (!Nd) {
-		start = dots[N-1]+1;
-		if (!Np) {
-		    end = dots[N];
-		}
-	    }
-	    else {
-		if (!Np) {
-		    start = dots[ndots-N]+1;
-		}
-		end = dots[ndots-N+1];
-	    }
-	}
-	if (M != 0) {
-	    if (M > end - start) {
-		start = "_";
-		end = start+1;
-	    }
-	    else if (!Md) {
-		start = start+M-1;
-		if (!Mp) {
-		    end = start+1;
-		}
-	    }
-	    else {
-		if (!Mp) {
-		    start = end-M;
-		}
-		end = end-M+1;
-	    }
-	}
-	vhost_alias_checkspace(r, buf, &dest, end - start);
-	for (p = start; p < end; ++p) {
-	    *dest++ = apr_tolower(*p);
-	}
+        if (*map != '%') {
+            /* normal characters */
+            vhost_alias_checkspace(r, buf, &dest, 1);
+            last = *dest++ = *map++;
+            continue;
+        }
+        /* we are in a format specifier */
+        ++map;
+        /* can't be a slash */
+        last = '\0';
+        /* %% -> % */
+        if (*map == '%') {
+            ++map;
+            vhost_alias_checkspace(r, buf, &dest, 1);
+            *dest++ = '%';
+            continue;
+        }
+        /* port number */
+        if (*map == 'p') {
+            ++map;
+            /* no. of decimal digits in a short plus one */
+            vhost_alias_checkspace(r, buf, &dest, 7);
+            dest += apr_snprintf(dest, 7, "%d", ap_get_server_port(r));
+            continue;
+        }
+        /* deal with %-N+.-M+ -- syntax is already checked */
+        N = M = 0;   /* value */
+        Np = Mp = 0; /* is there a plus? */
+        Nd = Md = 0; /* is there a dash? */
+        if (*map == '-') ++map, Nd = 1;
+        N = *map++ - '0';
+        if (*map == '+') ++map, Np = 1;
+        if (*map == '.') {
+            ++map;
+            if (*map == '-') {
+                ++map, Md = 1;
+            }
+            M = *map++ - '0';
+            if (*map == '+') {
+                ++map, Mp = 1;
+            }
+        }
+        /* note that N and M are one-based indices, not zero-based */
+        start = dots[0]+1; /* ptr to the first character */
+        end = dots[ndots]; /* ptr to the character after the last one */
+        if (N != 0) {
+            if (N > ndots) {
+                start = "_";
+                end = start+1;
+            }
+            else if (!Nd) {
+                start = dots[N-1]+1;
+                if (!Np) {
+                    end = dots[N];
+                }
+            }
+            else {
+                if (!Np) {
+                    start = dots[ndots-N]+1;
+                }
+                end = dots[ndots-N+1];
+            }
+        }
+        if (M != 0) {
+            if (M > end - start) {
+                start = "_";
+                end = start+1;
+            }
+            else if (!Md) {
+                start = start+M-1;
+                if (!Mp) {
+                    end = start+1;
+                }
+            }
+            else {
+                if (!Mp) {
+                    start = end-M;
+                }
+                end = end-M+1;
+            }
+        }
+        vhost_alias_checkspace(r, buf, &dest, end - start);
+        for (p = start; p < end; ++p) {
+            *dest++ = apr_tolower(*p);
+        }
     }
     *dest = '\0';
     /* no double slashes */
     if (last == '/') {
-	++uri;
+        ++uri;
     }
 
     if (r->filename) {
-	r->filename = apr_pstrcat(r->pool, r->filename, buf, uri, NULL);
+        r->filename = apr_pstrcat(r->pool, r->filename, buf, uri, NULL);
     }
     else {
-	r->filename = apr_pstrcat(r->pool, buf, uri, NULL);
+        r->filename = apr_pstrcat(r->pool, buf, uri, NULL);
     }
 }
 
@@ -388,36 +388,36 @@
     const char *cgi;
   
     conf = (mva_sconf_t *) ap_get_module_config(r->server->module_config,
-					      &vhost_alias_module);
+                                              &vhost_alias_module);
     cgi = NULL;
     if (conf->cgi_root) {
-	cgi = strstr(r->uri, "cgi-bin/");
-	if (cgi && (cgi != r->uri + strspn(r->uri, "/"))) {
-	    cgi = NULL;
-	}
+        cgi = strstr(r->uri, "cgi-bin/");
+        if (cgi && (cgi != r->uri + strspn(r->uri, "/"))) {
+            cgi = NULL;
+        }
     }
     if (cgi) {
-	mode = conf->cgi_root_mode;
-	map = conf->cgi_root;
-	uri = cgi + strlen("cgi-bin");
+        mode = conf->cgi_root_mode;
+        map = conf->cgi_root;
+        uri = cgi + strlen("cgi-bin");
     }
     else if (r->uri[0] == '/') {
-	mode = conf->doc_root_mode;
-	map = conf->doc_root;
-	uri = r->uri;
+        mode = conf->doc_root_mode;
+        map = conf->doc_root;
+        uri = r->uri;
     }
     else {
-	return DECLINED;
+        return DECLINED;
     }
   
     if (mode == VHOST_ALIAS_NAME) {
-	name = ap_get_server_name(r);
+        name = ap_get_server_name(r);
     }
     else if (mode == VHOST_ALIAS_IP) {
-	name = r->connection->local_ip;
+        name = r->connection->local_ip;
     }
     else {
-	return DECLINED;
+        return DECLINED;
     }
 
     /* ### There is an optimization available here to determine the
@@ -429,9 +429,9 @@
     vhost_alias_interpolate(r, name, map, uri);
 
     if (cgi) {
-	/* see is_scriptaliased() in mod_cgi */
-	r->handler = "cgi-script";
-	apr_table_setn(r->notes, "alias-forced-type", r->handler);
+        /* see is_scriptaliased() in mod_cgi */
+        r->handler = "cgi-script";
+        apr_table_setn(r->notes, "alias-forced-type", r->handler);
     }
 
     return OK;

Modified: httpd/httpd/branches/2.2.x/modules/metadata/mod_expires.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/metadata/mod_expires.c?rev=332307&r1=332306&r2=332307&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/metadata/mod_expires.c (original)
+++ httpd/httpd/branches/2.2.x/modules/metadata/mod_expires.c Thu Nov 10 07:15:41 2005
@@ -375,7 +375,7 @@
         new->expiresdefault = add->expiresdefault;
     }
     else {
-	new->expiresdefault = base->expiresdefault;
+        new->expiresdefault = base->expiresdefault;
     }
     new->wildcards = add->wildcards;
     new->expiresbytype = apr_table_overlay(p, add->expiresbytype,
@@ -399,13 +399,13 @@
 
     switch (code[0]) {
     case 'M':
-	if (r->finfo.filetype == 0) { 
-	    /* file doesn't exist on disk, so we can't do anything based on
-	     * modification time.  Note that this does _not_ log an error.
-	     */
-	    return DECLINED;
-	}
-	base = r->finfo.mtime;
+        if (r->finfo.filetype == 0) { 
+            /* file doesn't exist on disk, so we can't do anything based on
+             * modification time.  Note that this does _not_ log an error.
+             */
+            return DECLINED;
+        }
+        base = r->finfo.mtime;
         additional_sec = atoi(&code[1]);
         additional = apr_time_from_sec(additional_sec);
         break;

Modified: httpd/httpd/branches/2.2.x/modules/metadata/mod_headers.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/metadata/mod_headers.c?rev=332307&r1=332306&r2=332307&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/metadata/mod_headers.c (original)
+++ httpd/httpd/branches/2.2.x/modules/metadata/mod_headers.c Thu Nov 10 07:15:41 2005
@@ -534,11 +534,11 @@
         header_entry *hdr = &((header_entry *) (fixup->elts))[i];
         const char *envar = hdr->condition_var;
 
-	/* ignore early headers in late calls */
+        /* ignore early headers in late calls */
         if (!early && (envar == condition_early)) {
             continue;
         }
-	/* ignore late headers in early calls */
+        /* ignore late headers in early calls */
         else if (early && (envar != condition_early)) {
             continue;
         }