Project

General

Profile

Bug #1643

_pathinfo and _scriptname overwriting

Added by Anonymous over 11 years ago. Updated over 3 years ago.

Status:
Obsolete
Priority:
Normal
Assignee:
-
Category:
mod_proxy_core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:
Yes

Description

From comments in #1600 (this was not addressed in the submitted patch, nor can I find a separate ticket for this issue):

In a conf file, you must handle _pathinfo before _scriptname because otherwise con->uri.path will be overwritten with whatever value you have set for _scriptname as can be seen here:


#!c
} else if (buffer_is_equal_string(rw->header, CONST_STR_LEN("_scriptname"))) {
        int ret;

        if ((ret = pcre_replace(rw->regex, rw->replace, con->uri.path, p->replace_buf)) < 0) {
                switch (ret) {
                case PCRE_ERROR_NOMATCH:
                /* hmm, ok. no problem */
                break;
                default:
                TRACE("oops, pcre_replace failed with: %d", ret);
                break;
                }
        } else {
                /* we matched, cool. */
                buffer_copy_string_buffer(con->uri.path, p->replace_buf);
        }
}

-- osmaker+lighttpd

History

#1

Updated by gstrauss over 3 years ago

  • Description updated (diff)
  • Assignee deleted (jan)
  • Missing in 1.5.x set to Yes
#2

Updated by gstrauss over 3 years ago

  • Status changed from New to Obsolete

Also available in: Atom