Commit fb0052c0 authored by Bill Stoddard's avatar Bill Stoddard
Browse files

ifndef AP_UNSAFE_ERROR_LOG_UNESCAPED the stderr to errorlog stuff

for those who don't want to escape (as in server/log.c)


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/APACHE_2_0_BRANCH@104940 13f79535-47bb-0310-9956-ffa450edef68
parent 7ab91d76
Loading
Loading
Loading
Loading
+1 −8
Changes for STATUS: 1 added line, 8 removed lines.
Original line number Diff line number Diff line
APACHE 2.0 STATUS:                                              -*-text-*-
Last modified at [$Date: 2004/09/02 20:09:28 $]
Last modified at [$Date: 2004/09/02 22:06:22 $]

Release:

@@ -98,13 +98,6 @@ PATCHES TO BACKPORT FROM 2.1
             native chars here and it will be converted later? (I'm not sure)
         (2) I'd put out (null) only if val is NULL, not if it's empty.

    *) Escape errfn strings before sending them to the log file (and
       analogus patch to mod_cgid)
       http://cvs.apache.org/viewcvs.cgi/httpd-2.0/modules/generators/mod_cgi.c?r1=1.167&r2=1.168
       +1: stoddard, trawick, jorton
       nd: I'd like to add 1.169
       trawick: 1.169 is fine with me

    *) Add -l option to rotatelogs to let it use local time rather than
       UTC.  PR 24417.  [Ken Coar, Uli Zappe <uli ritual.org>]
         support/rotatelogs.c: r1.33, r1.34, r1.35
+9 −1
Changes for modules/generators/mod_cgi.c: 9 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -348,11 +348,19 @@ static void cgi_child_errfn(apr_pool_t *pool, apr_status_t err,
    char errbuf[200];

    apr_file_open_stderr(&stderr_log, pool);
    /* Escape the logged string because it may be something that
     * came in over the network.
     */
    apr_file_printf(stderr_log,
                    "(%d)%s: %s\n",
                    err,
                    apr_strerror(err, errbuf, sizeof(errbuf)),
                    description);
#ifdef AP_UNSAFE_ERROR_LOG_UNESCAPED
                    description
#else
                    ap_escape_logitem(pool, description)
#endif
                    );
}

static apr_status_t run_cgi_child(apr_file_t **script_out,
+7 −1
Changes for modules/generators/mod_cgid.c: 7 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -559,7 +559,13 @@ static void cgid_child_errfn(apr_pool_t *pool, apr_status_t err,
     * have r->headers_in and possibly other storage referenced by
     * ap_log_rerror()
     */
    ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, "%s", description);
    ap_log_error(APLOG_MARK, APLOG_ERR, err, r->server, "%s", 
#ifdef AP_UNSAFE_ERROR_LOG_UNESCAPED
                 description
#else
                 ap_escape_logitem(pool, description)
#endif
                 );
}

static int cgid_server(void *data)