diff options
author | Stefan Fritsch <sf@apache.org> | 2011-07-16 22:36:11 +0200 |
---|---|---|
committer | Stefan Fritsch <sf@apache.org> | 2011-07-16 22:36:11 +0200 |
commit | 255b79ce73dae6177c63ee6fadd49bc90086e2a6 (patch) | |
tree | 2625e8d84d7eee511dd33829596dffc354d6d92b /server/util_script.c | |
parent | Typo. (diff) | |
download | apache2-255b79ce73dae6177c63ee6fadd49bc90086e2a6.tar.xz apache2-255b79ce73dae6177c63ee6fadd49bc90086e2a6.zip |
improve readability of 'malformed header from script' message and simplify code
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1147487 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server/util_script.c')
-rw-r--r-- | server/util_script.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/server/util_script.c b/server/util_script.c index 00c2cf51c7..03926943d4 100644 --- a/server/util_script.c +++ b/server/util_script.c @@ -49,9 +49,6 @@ * where there don't have to be). */ -#define MALFORMED_MESSAGE "malformed header from script. Bad header=" -#define MALFORMED_HEADER_LENGTH_TO_SHOW 30 - /* we know core's module_index is 0 */ #undef APLOG_MODULE_INDEX #define APLOG_MODULE_INDEX AP_CORE_MODULE_INDEX @@ -531,12 +528,6 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, } #endif /*APR_CHARSET_EBCDIC*/ if (!(l = strchr(w, ':'))) { - char malformed[(sizeof MALFORMED_MESSAGE) + 1 - + MALFORMED_HEADER_LENGTH_TO_SHOW]; - - strcpy(malformed, MALFORMED_MESSAGE); - strncat(malformed, w, MALFORMED_HEADER_LENGTH_TO_SHOW); - if (!buffer) { /* Soak up all the script output - may save an outright kill */ while ((*getsfunc) (w, MAX_STRING_LEN - 1, getsfunc_data)) { @@ -545,8 +536,8 @@ AP_DECLARE(int) ap_scan_script_header_err_core(request_rec *r, char *buffer, } ap_log_rerror(APLOG_MARK, APLOG_ERR|APLOG_TOCLIENT, 0, r, - "%s: %s", malformed, - apr_filepath_name_get(r->filename)); + "malformed header from script: %s; Bad header: %.30s", + apr_filepath_name_get(r->filename), w); return HTTP_INTERNAL_SERVER_ERROR; } |