You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <Ke...@Golux.Com> on 1998/09/09 16:04:08 UTC
[PATCH] adding *ERROR_NOTES by default
Rather than special-casing the setting of *ERROR_NOTES all over
the source, does anyone have any objection to doing it in a
more central location? E.g., in ap_log_rerror()?
The attached patch will set the [potential] text of the *ERROR_NOTES
envariable to the message destined for the error log -- unless
there's already something set. This allows things that *don't*
want the specifics available to ErrorDocuments to override this
default with something like ap_table_setn(r->notes, "error-notes", "").
#ken P-)}
Ken Coar <http://Web.Golux.Com/coar/>
Apache Group member <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>
Index: http_log.c
===================================================================
RCS file: /export/home/cvs/apache-1.3/src/main/http_log.c,v
retrieving revision 1.64
diff -u -r1.64 http_log.c
--- http_log.c 1998/08/10 16:17:54 1.64
+++ http_log.c 1998/09/09 13:54:22
@@ -440,6 +440,12 @@
va_start(args, fmt);
log_error_core(file, line, level, r->server, r, fmt, args);
+ if (ap_table_get(r->notes, "error-notes") != NULL) {
+ char errstr[MAX_STRING_LEN];
+
+ ap_snprintf(errstr, sizeof(errstr), fmt, args);
+ ap_table_set(r->notes, "error-notes", errstr);
+ }
va_end(args);
}