Changes with Apache 2.0.51
+ *) Enable special ErrorDocument value 'default' which restores the
+ canned server response for the scope of the directive
+ [Geoffrey Young, Andre Malo]
+
*) work around MSIE Digest auth bug - if AuthDigestEnableQueryStringHack
is set in r->subprocess_env allow mismatched query strings to pass.
PR 27758. [Paul Querna, Geoffrey Young]
AP_DECLARE_DATA ap_filter_rec_t *ap_net_time_filter_handle;
AP_DECLARE_DATA ap_filter_rec_t *ap_core_input_filter_handle;
+/* magic pointer for ErrorDocument xxx "default" */
+static char errordocument_default;
+
static void *create_core_dir_config(apr_pool_t *a, char *dir)
{
core_dir_config *conf;
return NULL;
}
+ if (dirconf->response_code_strings[error_index] == &errordocument_default) {
+ return NULL;
+ }
+
return dirconf->response_code_strings[error_index];
}
RESPONSE_CODES);
}
- /* hack. Prefix a " if it is a msg; as that is what
- * http_protocol.c relies on to distinguish between
- * a msg and a (local) path.
- */
- conf->response_code_strings[index_number] = (what == MSG) ?
- apr_pstrcat(cmd->pool, "\"",msg,NULL) :
- apr_pstrdup(cmd->pool, msg);
+ if (strcmp(msg, "default") == 0) {
+ /* special case: ErrorDocument 404 default restores the
+ * canned server error response
+ */
+ conf->response_code_strings[index_number] = &errordocument_default;
+ }
+ else {
+ /* hack. Prefix a " if it is a msg; as that is what
+ * http_protocol.c relies on to distinguish between
+ * a msg and a (local) path.
+ */
+ conf->response_code_strings[index_number] = (what == MSG) ?
+ apr_pstrcat(cmd->pool, "\"",msg,NULL) :
+ apr_pstrdup(cmd->pool, msg);
+ }
}
return NULL;