Commit a2748cee authored by Stefan Fritsch's avatar Stefan Fritsch
Browse files

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
parent e0e8b4cd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -336,6 +336,7 @@
 * 20110619.0 (2.3.13-dev) add async connection infos to process_score in scoreboard,
 *                         add ap_start_lingering_close(),
 *                         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" */
@@ -343,7 +344,7 @@
#ifndef MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR 20110619
#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
+6 −0
Original line number Diff line number Diff line
@@ -1798,6 +1798,12 @@ AP_DECLARE(void) ap_content_type_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 
 * specific character
+2 −9
Original line number Diff line number Diff line
@@ -1051,11 +1051,7 @@ static int init_cache(apr_pool_t *p)

static char *rewrite_mapfunc_toupper(request_rec *r, char *key)
{
    char *p;

    for (p = key; *p; ++p) {
        *p = apr_toupper(*p);
    }
    ap_str_toupper(key);

    return key;
}
@@ -1849,13 +1845,10 @@ static char *lookup_variable(char *var, rewrite_ctx *ctx)

    /* well, do it the hard way */
    else {
        char *p;
        apr_time_exp_t tm;

        /* can't do this above, because of the getenv call */
        for (p = var; *p; ++p) {
            *p = apr_toupper(*p);
        }
        ap_str_toupper(var);

        switch (varlen) {
        case  4:
+0 −9
Original line number Diff line number Diff line
@@ -42,15 +42,6 @@ typedef enum

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
 * set both the POSIX and BS2000 user id's to the unprivileged user.
 */
+0 −9
Original line number Diff line number Diff line
@@ -453,15 +453,6 @@ typedef enum

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
 * set both the POSIX and BS2000 user id's to the unprivileged user.
 */
Loading