View | Details | Raw Unified | Return to bug 44803
Collapse All | Expand All

(-)modules/proxy/mod_proxy_ajp.c (-2 / +8 lines)
Lines 72-79 Link Here
72
        search = r->args;
72
        search = r->args;
73
73
74
    /* process path */
74
    /* process path */
75
    path = ap_proxy_canonenc(r->pool, url, strlen(url), enc_path, 0,
75
    if (apr_table_get(r->notes, "proxy-nocanon")) {
76
                             r->proxyreq);
76
        path = url;   /* this is the raw path */
77
    }
78
    else {
79
       path = ap_proxy_canonenc(r->pool, url, strlen(url),
80
                                enc_path, 0, r->proxyreq);
81
    }
82
77
    if (path == NULL)
83
    if (path == NULL)
78
        return HTTP_BAD_REQUEST;
84
        return HTTP_BAD_REQUEST;
79
85
(-)modules/proxy/mod_proxy.c (-3 / +10 lines)
Lines 523-528 Link Here
523
    ap_regmatch_t reg1[AP_MAX_REG_MATCH];
523
    ap_regmatch_t reg1[AP_MAX_REG_MATCH];
524
    char *found = NULL;
524
    char *found = NULL;
525
    int mismatch = 0;
525
    int mismatch = 0;
526
    char *up_uri_wout_query;
527
    char *qm;
526
528
527
    if (r->proxyreq) {
529
    if (r->proxyreq) {
528
        /* someone has already set up the proxy, it was possibly ourselves
530
        /* someone has already set up the proxy, it was possibly ourselves
Lines 536-544 Link Here
536
     * an issue because this is a hybrid proxy/origin server.
538
     * an issue because this is a hybrid proxy/origin server.
537
     */
539
     */
538
540
541
    up_uri_wout_query = apr_pstrdup(r->pool, r->unparsed_uri);
542
    if ((qm = strchr(up_uri_wout_query, '?')) != NULL) {
543
        *qm = '\0';
544
    }
545
539
    for (i = 0; i < conf->aliases->nelts; i++) {
546
    for (i = 0; i < conf->aliases->nelts; i++) {
540
        unsigned int nocanon = ent[i].flags & PROXYPASS_NOCANON;
547
        unsigned int nocanon = ent[i].flags & PROXYPASS_NOCANON;
541
        const char *use_uri = nocanon ? r->unparsed_uri : r->uri;
548
        const char *use_uri = nocanon ? up_uri_wout_query : r->uri;
542
        if ((dconf->interpolate_env == 1)
549
        if ((dconf->interpolate_env == 1)
543
            && (ent[i].flags & PROXYPASS_INTERPOLATE)) {
550
            && (ent[i].flags & PROXYPASS_INTERPOLATE)) {
544
            fake = proxy_interpolate(r, ent[i].fake);
551
            fake = proxy_interpolate(r, ent[i].fake);
Lines 554-560 Link Here
554
                    return DECLINED;
561
                    return DECLINED;
555
                }
562
                }
556
                /* test that we haven't reduced the URI */
563
                /* test that we haven't reduced the URI */
557
                if (nocanon && ap_regexec(ent[i].regex, r->unparsed_uri,
564
                if (nocanon && ap_regexec(ent[i].regex, up_uri_wout_query,
558
                                          AP_MAX_REG_MATCH, reg1, 0)) {
565
                                          AP_MAX_REG_MATCH, reg1, 0)) {
559
                    mismatch = 1;
566
                    mismatch = 1;
560
                    use_uri = r->uri;
567
                    use_uri = r->uri;
Lines 591-597 Link Here
591
                    return DECLINED;
598
                    return DECLINED;
592
                }
599
                }
593
                if (nocanon
600
                if (nocanon
594
                    && len != alias_match(r->unparsed_uri, ent[i].fake)) {
601
                    && len != alias_match(up_uri_wout_query, ent[i].fake)) {
595
                    mismatch = 1;
602
                    mismatch = 1;
596
                    use_uri = r->uri;
603
                    use_uri = r->uri;
597
                }
604
                }

Return to bug 44803