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

(-)modules/generators/mod_cgi.c (-3 / +8 lines)
Lines 167-178 Link Here
167
    apr_file_t *f = NULL;
167
    apr_file_t *f = NULL;
168
    apr_finfo_t finfo;
168
    apr_finfo_t finfo;
169
    char time_str[APR_CTIME_LEN];
169
    char time_str[APR_CTIME_LEN];
170
    int log_flags = rv ? APLOG_ERR : APLOG_ERR;
171
170
172
    /* Intentional no APLOGNO */
171
    /* Intentional no APLOGNO */
173
    /* Callee provides APLOGNO in error text */
172
    /* Callee provides APLOGNO in error text */
174
    ap_log_rerror(APLOG_MARK, log_flags, rv, r,
173
    ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
175
                  "%s%s: %s", logno ? logno : "", error, r->filename);
174
                  "%sstderr from %s: %s", logno ? logno : "", r->filename, error);
176
175
177
    /* XXX Very expensive mainline case! Open, then getfileinfo! */
176
    /* XXX Very expensive mainline case! Open, then getfileinfo! */
178
    if (!conf->logname ||
177
    if (!conf->logname ||
Lines 209-216 Link Here
209
208
210
    while ((rv = apr_file_gets(argsbuffer, HUGE_STRING_LEN,
209
    while ((rv = apr_file_gets(argsbuffer, HUGE_STRING_LEN,
211
                               script_err)) == APR_SUCCESS) {
210
                               script_err)) == APR_SUCCESS) {
211
212
        newline = strchr(argsbuffer, '\n');
212
        newline = strchr(argsbuffer, '\n');
213
        if (newline) {
213
        if (newline) {
214
            char *prev = newline - 1;
215
            if (prev >= argsbuffer && *prev == '\r') {
216
                newline = prev;
217
            }
218
214
            *newline = '\0';
219
            *newline = '\0';
215
        }
220
        }
216
        log_scripterror(r, conf, r->status, 0, APLOGNO(01215), argsbuffer);
221
        log_scripterror(r, conf, r->status, 0, APLOGNO(01215), argsbuffer);

Return to bug 61980