mirror of
https://github.com/apache/httpd.git
synced 2025-08-13 14:40:20 +00:00
We already have ap_str_tolower(), so also add ap_str_toupper() function and use
it where possible. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1138617 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@ -336,6 +336,7 @@
|
|||||||
* 20110619.0 (2.3.13-dev) add async connection infos to process_score in scoreboard,
|
* 20110619.0 (2.3.13-dev) add async connection infos to process_score in scoreboard,
|
||||||
* add ap_start_lingering_close(),
|
* add ap_start_lingering_close(),
|
||||||
* add conn_state_e:CONN_STATE_LINGER_NORMAL and CONN_STATE_LINGER_SHORT
|
* add conn_state_e:CONN_STATE_LINGER_NORMAL and CONN_STATE_LINGER_SHORT
|
||||||
|
* 20110619.1 (2.3.13-dev) add ap_str_toupper()
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
|
#define MODULE_MAGIC_COOKIE 0x41503234UL /* "AP24" */
|
||||||
@ -343,7 +344,7 @@
|
|||||||
#ifndef MODULE_MAGIC_NUMBER_MAJOR
|
#ifndef MODULE_MAGIC_NUMBER_MAJOR
|
||||||
#define MODULE_MAGIC_NUMBER_MAJOR 20110619
|
#define MODULE_MAGIC_NUMBER_MAJOR 20110619
|
||||||
#endif
|
#endif
|
||||||
#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
|
#define MODULE_MAGIC_NUMBER_MINOR 1 /* 0...n */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
|
* Determine if the server's current MODULE_MAGIC_NUMBER is at least a
|
||||||
|
@ -1798,6 +1798,12 @@ AP_DECLARE(void) ap_content_type_tolower(char *s);
|
|||||||
*/
|
*/
|
||||||
AP_DECLARE(void) ap_str_tolower(char *s);
|
AP_DECLARE(void) ap_str_tolower(char *s);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* convert a string to all uppercase
|
||||||
|
* @param s The string to convert to uppercase
|
||||||
|
*/
|
||||||
|
AP_DECLARE(void) ap_str_toupper(char *s);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search a string from left to right for the first occurrence of a
|
* Search a string from left to right for the first occurrence of a
|
||||||
* specific character
|
* specific character
|
||||||
|
@ -1051,11 +1051,7 @@ static int init_cache(apr_pool_t *p)
|
|||||||
|
|
||||||
static char *rewrite_mapfunc_toupper(request_rec *r, char *key)
|
static char *rewrite_mapfunc_toupper(request_rec *r, char *key)
|
||||||
{
|
{
|
||||||
char *p;
|
ap_str_toupper(key);
|
||||||
|
|
||||||
for (p = key; *p; ++p) {
|
|
||||||
*p = apr_toupper(*p);
|
|
||||||
}
|
|
||||||
|
|
||||||
return key;
|
return key;
|
||||||
}
|
}
|
||||||
@ -1849,13 +1845,10 @@ static char *lookup_variable(char *var, rewrite_ctx *ctx)
|
|||||||
|
|
||||||
/* well, do it the hard way */
|
/* well, do it the hard way */
|
||||||
else {
|
else {
|
||||||
char *p;
|
|
||||||
apr_time_exp_t tm;
|
apr_time_exp_t tm;
|
||||||
|
|
||||||
/* can't do this above, because of the getenv call */
|
/* can't do this above, because of the getenv call */
|
||||||
for (p = var; *p; ++p) {
|
ap_str_toupper(var);
|
||||||
*p = apr_toupper(*p);
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (varlen) {
|
switch (varlen) {
|
||||||
case 4:
|
case 4:
|
||||||
|
@ -42,15 +42,6 @@ typedef enum
|
|||||||
|
|
||||||
static bs2_ForkType forktype = bs2_unknown;
|
static bs2_ForkType forktype = bs2_unknown;
|
||||||
|
|
||||||
|
|
||||||
static void ap_str_toupper(char *str)
|
|
||||||
{
|
|
||||||
while (*str) {
|
|
||||||
*str = apr_toupper(*str);
|
|
||||||
++str;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Determine the method for forking off a child in such a way as to
|
/* Determine the method for forking off a child in such a way as to
|
||||||
* set both the POSIX and BS2000 user id's to the unprivileged user.
|
* set both the POSIX and BS2000 user id's to the unprivileged user.
|
||||||
*/
|
*/
|
||||||
|
@ -453,15 +453,6 @@ typedef enum
|
|||||||
|
|
||||||
static bs2_ForkType forktype = bs2_unknown;
|
static bs2_ForkType forktype = bs2_unknown;
|
||||||
|
|
||||||
|
|
||||||
static void ap_str_toupper(char *str)
|
|
||||||
{
|
|
||||||
while (*str) {
|
|
||||||
*str = apr_toupper(*str);
|
|
||||||
++str;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Determine the method for forking off a child in such a way as to
|
/* Determine the method for forking off a child in such a way as to
|
||||||
* set both the POSIX and BS2000 user id's to the unprivileged user.
|
* set both the POSIX and BS2000 user id's to the unprivileged user.
|
||||||
*/
|
*/
|
||||||
|
@ -1889,6 +1889,14 @@ AP_DECLARE(void) ap_str_tolower(char *str)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AP_DECLARE(void) ap_str_toupper(char *str)
|
||||||
|
{
|
||||||
|
while (*str) {
|
||||||
|
*str = apr_toupper(*str);
|
||||||
|
++str;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We must return a FQDN
|
* We must return a FQDN
|
||||||
*/
|
*/
|
||||||
|
@ -831,13 +831,8 @@ static const char *tolower_func(ap_expr_eval_ctx_t *ctx, const void *data,
|
|||||||
static const char *toupper_func(ap_expr_eval_ctx_t *ctx, const void *data,
|
static const char *toupper_func(ap_expr_eval_ctx_t *ctx, const void *data,
|
||||||
const char *arg)
|
const char *arg)
|
||||||
{
|
{
|
||||||
char *p;
|
|
||||||
char *result = apr_pstrdup(ctx->p, arg);
|
char *result = apr_pstrdup(ctx->p, arg);
|
||||||
|
ap_str_toupper(result);
|
||||||
for (p = result; *p; ++p) {
|
|
||||||
*p = apr_toupper(*p);
|
|
||||||
}
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user