Commit 38a56d86 authored by Graham Leggett's avatar Graham Leggett
Browse files

mod_proxy: Remove ap_proxy_liststr(), it duplicates ap_find_token().


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1209797 13f79535-47bb-0310-9956-ffa450edef68
parent 8c5ffe03
Loading
Loading
Loading
Loading
+0 −1
Changes for modules/proxy/mod_proxy.h: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -538,7 +538,6 @@ PROXY_DECLARE(char *)ap_proxy_canonenc(apr_pool_t *p, const char *x, int len, en
PROXY_DECLARE(char *)ap_proxy_canon_netloc(apr_pool_t *p, char **const urlp, char **userp,
                                           char **passwordp, char **hostp, apr_port_t *port);
PROXY_DECLARE(const char *)ap_proxy_date_canon(apr_pool_t *p, const char *x);
PROXY_DECLARE(int) ap_proxy_liststr(const char *list, const char *val);
PROXY_DECLARE(int) ap_proxy_hex2sec(const char *x);
PROXY_DECLARE(void) ap_proxy_sec2hex(int t, char *y);
PROXY_DECLARE(int) ap_proxyerror(request_rec *r, int statuscode, const char *message);
+2 −3
Changes for modules/proxy/mod_proxy_http.c: 2 added lines, 3 removed lines.
Original line number Diff line number Diff line
@@ -1646,9 +1646,8 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
             */
            te = apr_table_get(r->headers_out, "Transfer-Encoding");
            /* strip connection listed hop-by-hop headers from response */
            backend->close += ap_proxy_liststr(apr_table_get(r->headers_out,
                                                             "Connection"),
                                              "close");
            backend->close += ap_find_token(p,
                    apr_table_get(r->headers_out, "Connection"), "close");
            ap_proxy_clear_connection(p, r->headers_out);
            if ((buf = apr_table_get(r->headers_out, "Content-Type"))) {
                ap_set_content_type(r, apr_pstrdup(p, buf));
+0 −37
Changes for modules/proxy/proxy_util.c: 0 added lines, 37 removed lines.
Original line number Diff line number Diff line
@@ -413,43 +413,6 @@ PROXY_DECLARE(request_rec *)ap_proxy_make_fake_req(conn_rec *c, request_rec *r)
    return rp;
}


/*
 * list is a comma-separated list of case-insensitive tokens, with
 * optional whitespace around the tokens.
 * The return returns 1 if the token val is found in the list, or 0
 * otherwise.
 */
PROXY_DECLARE(int) ap_proxy_liststr(const char *list, const char *val)
{
    int len, i;
    const char *p;

    len = strlen(val);

    while (list != NULL) {
        p = ap_strchr_c(list, ',');
        if (p != NULL) {
            i = p - list;
            do {
                p++;
            } while (apr_isspace(*p));
        }
        else {
            i = strlen(list);
        }

        while (i > 0 && apr_isspace(list[i - 1])) {
            i--;
        }
        if (i == len && strncasecmp(list, val, len) == 0) {
            return 1;
        }
        list = p;
    }
    return 0;
}

/*
 * Converts 8 hex digits to a time integer
 */