Project

General

Profile

Actions

Bug #1643

closed

_pathinfo and _scriptname overwriting

Added by Anonymous over 16 years ago. Updated over 8 years ago.

Status:
Obsolete
Priority:
Normal
Category:
mod_proxy_core
Target version:
ASK QUESTIONS IN Forums:

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

Actions #1

Updated by gstrauss over 8 years ago

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

Updated by gstrauss over 8 years ago

  • Status changed from New to Obsolete
Actions

Also available in: Atom