]> granicus.if.org Git - apache/commitdiff
Make it clear that '_' is a possible char and accepted
authorJim Jagielski <jim@apache.org>
Wed, 19 Jan 2011 13:08:08 +0000 (13:08 +0000)
committerJim Jagielski <jim@apache.org>
Wed, 19 Jan 2011 13:08:08 +0000 (13:08 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1060802 13f79535-47bb-0310-9956-ffa450edef68

include/ap_mmn.h
include/httpd.h
modules/proxy/mod_proxy_balancer.c
server/util.c

index 4add24d42ef672494fd8e5b9dd82e000a359f826..c08c1782afe26344361401130b61f529c6846434 100644 (file)
  * 20110117.0 (2.3.11-dev) Merge <If> sections in separate step (ap_if_walk).
  *                         Add core_dir_config->sec_if. Add ap_add_if_conf().
  *                         Add pool argument to ap_add_file_conf().
- * 20110117.1 (2.3.11-dev) Add ap_pstr2alnum() and ap_str2alnum()
+ * 20110117.1 (2.3.11-dev) Add ap_pstr2_alnum() and ap_str2_alnum()
  */
 
 #define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
index e85620d0927276a9f01e9b8749982811df5083c8..5268c57aac1d3d6a1fd66e31c86189d047585a6d 100644 (file)
@@ -1829,8 +1829,8 @@ AP_DECLARE(apr_status_t) ap_timeout_parameter_parse(
 AP_DECLARE(int) ap_request_has_body(request_rec *r);
     
 /**
- * Cleanup a string.
- * We only allow alphanumeric chars. Non-printable
+ * Cleanup a string (mainly to be filesystem safe)
+ * We only allow '_' and alphanumeric chars. Non-printable
  * map to 'x' and all others map to '_'
  *
  * @param  p pool to use to allocate dest
@@ -1838,18 +1838,18 @@ AP_DECLARE(int) ap_request_has_body(request_rec *r);
  * @param  dest cleaned up, allocated string
  * @return Status value indicating whether the cleaning was successful or not.
  */
-AP_DECLARE(apr_status_t) ap_pstr2alnum(apr_pool_t *p, const char *src, char **dest);
+AP_DECLARE(apr_status_t) ap_pstr2_alnum(apr_pool_t *p, const char *src, char **dest);
 
 /**
- * Cleanup a string.
- * We only allow alphanumeric chars. Non-printable
+ * Cleanup a string (mainly to be filesystem safe)
+ * We only allow '_' and alphanumeric chars. Non-printable
  * map to 'x' and all others map to '_'
  *
  * @param  src string to clean up
  * @param  dest cleaned up, pre-allocated string
  * @return Status value indicating whether the cleaning was successful or not.
  */
-AP_DECLARE(apr_status_t) ap_str2alnum(const char *src, char *dest);
+AP_DECLARE(apr_status_t) ap_str2_alnum(const char *src, char *dest);
 
 /* Misc system hackery */
 /**
index 276ae48b6dedead554928c2a7d2b4ce5aecc20e1..0923253ed285ef116279c76b3ba4ef7bee80ae3b 100644 (file)
@@ -736,7 +736,7 @@ static int balancer_post_config(apr_pool_t *pconf, apr_pool_t *plog,
             ap_slotmem_instance_t *new = NULL;
 
             balancer->max_workers = balancer->workers->nelts + balancer->growth;
-            ap_pstr2alnum(pconf, balancer->name, &balancer->sname);
+            ap_pstr2_alnum(pconf, balancer->name, &balancer->sname);
 
             /* Create global mutex */
             rv = ap_global_mutex_create(&(balancer->mutex), NULL, balancer_mutex_type,
index d78a075b532caacc5d423bb1ae1fab964b34e516..97f41610e8a1adf9f4de3777c28dbb86c8e50247 100644 (file)
@@ -2256,7 +2256,7 @@ AP_DECLARE_NONSTD(apr_status_t) ap_pool_cleanup_set_null(void *data_)
     return APR_SUCCESS;
 }
 
-AP_DECLARE(apr_status_t) ap_str2alnum(const char *src, char *dest) {
+AP_DECLARE(apr_status_t) ap_str2_alnum(const char *src, char *dest) {
     
     for ( ; *src; src++, dest++)
     {
@@ -2272,7 +2272,7 @@ AP_DECLARE(apr_status_t) ap_str2alnum(const char *src, char *dest) {
     
 }
 
-AP_DECLARE(apr_status_t) ap_pstr2alnum(apr_pool_t *p, const char *src, char **dest)
+AP_DECLARE(apr_status_t) ap_pstr2_alnum(apr_pool_t *p, const char *src, char **dest)
 {
     *dest = apr_palloc(p, strlen(src)+1);
     if (!*dest)