diff options
| author | Stefan Fritsch <sf@sfritsch.de> | 2015-04-28 22:06:31 +0200 |
|---|---|---|
| committer | Stefan Fritsch <sf@sfritsch.de> | 2015-04-28 22:06:31 +0200 |
| commit | 080d5e16db802902200a9ce5b6c40f8f1fdc1f73 (patch) | |
| tree | 69845ca856fe6817f103544e88541d80411fe9a8 /modules/generators | |
| parent | cb35beef2a938b80c9e4b5d6a408eca437aa74db (diff) | |
| download | apache2-080d5e16db802902200a9ce5b6c40f8f1fdc1f73.tar.gz | |
Imported Upstream version 2.4.12
Diffstat (limited to 'modules/generators')
| -rw-r--r-- | modules/generators/mod_autoindex.c | 4 | ||||
| -rw-r--r-- | modules/generators/mod_cgi.c | 18 |
2 files changed, 11 insertions, 11 deletions
diff --git a/modules/generators/mod_autoindex.c b/modules/generators/mod_autoindex.c index 3d36c77b..5e86e407 100644 --- a/modules/generators/mod_autoindex.c +++ b/modules/generators/mod_autoindex.c @@ -1416,7 +1416,7 @@ static char *terminate_description(autoindex_config_rec *d, char *desc, apr_int32_t autoindex_opts, int desc_width) { int maxsize = desc_width; - register int x; + int x; /* * If there's no DescriptionWidth in effect, default to the old @@ -1782,7 +1782,7 @@ static void output_directories(struct ent **ar, int n, } } else { - ap_rputs("</td><td> ", r); + ap_rvputs(r, "</td><td", (d->style_sheet != NULL) ? " class=\"indexcoldesc\">" : ">", " ", NULL); } } ap_rputs("</td></tr>\n", r); diff --git a/modules/generators/mod_cgi.c b/modules/generators/mod_cgi.c index 7808262f..beb02f27 100644 --- a/modules/generators/mod_cgi.c +++ b/modules/generators/mod_cgi.c @@ -162,7 +162,7 @@ AP_INIT_TAKE1("ScriptLogBuffer", set_scriptlog_buffer, NULL, RSRC_CONF, }; static int log_scripterror(request_rec *r, cgi_server_conf * conf, int ret, - apr_status_t rv, char *error) + apr_status_t rv, char *logno, char *error) { apr_file_t *f = NULL; apr_finfo_t finfo; @@ -170,7 +170,7 @@ static int log_scripterror(request_rec *r, cgi_server_conf * conf, int ret, int log_flags = rv ? APLOG_ERR : APLOG_ERR; ap_log_rerror(APLOG_MARK, log_flags, rv, r, - "%s: %s", error, r->filename); + "%s%s: %s", logno ? logno : "", error, r->filename); /* XXX Very expensive mainline case! Open, then getfileinfo! */ if (!conf->logname || @@ -203,6 +203,7 @@ static apr_status_t log_script_err(request_rec *r, apr_file_t *script_err) char argsbuffer[HUGE_STRING_LEN]; char *newline; apr_status_t rv; + cgi_server_conf *conf = ap_get_module_config(r->server->module_config, &cgi_module); while ((rv = apr_file_gets(argsbuffer, HUGE_STRING_LEN, script_err)) == APR_SUCCESS) { @@ -210,8 +211,7 @@ static apr_status_t log_script_err(request_rec *r, apr_file_t *script_err) if (newline) { *newline = '\0'; } - ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01215) - "%s", argsbuffer); + log_scripterror(r, conf, r->status, 0, APLOGNO(01215), argsbuffer); } return rv; @@ -774,24 +774,24 @@ static int cgi_handler(request_rec *r) conf = ap_get_module_config(r->server->module_config, &cgi_module); if (!(ap_allow_options(r) & OPT_EXECCGI) && !is_scriptaliased(r)) - return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, + return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(02809), "Options ExecCGI is off in this directory"); if (nph && is_included) - return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, + return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(02810), "attempt to include NPH CGI script"); if (r->finfo.filetype == APR_NOFILE) - return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, + return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, APLOGNO(02811), "script not found or unable to stat"); if (r->finfo.filetype == APR_DIR) - return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, + return log_scripterror(r, conf, HTTP_FORBIDDEN, 0, APLOGNO(02812), "attempt to invoke directory as script"); if ((r->used_path_info == AP_REQ_REJECT_PATH_INFO) && r->path_info && *r->path_info) { /* default to accept */ - return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, + return log_scripterror(r, conf, HTTP_NOT_FOUND, 0, APLOGNO(02813), "AcceptPathInfo off disallows user's path"); } /* |
