/* apply_config() needs r in some cases, so allocate server_context early */
ctx = SG(server_context);
if (ctx == NULL) {
+normal:
ctx = SG(server_context) = apr_pcalloc(r->pool, sizeof(*ctx));
/* register a cleanup so we clear out the SG(server_context)
* after each request. Note: We pass in the pointer to the
}
} else {
parent_req = ctx->r;
+ /* check if comming due to ErrorDocument */
+ if (parent_req != HTTP_OK) {
+ parent_req = NULL;
+ goto normal;
+ }
ctx->r = r;
brigade = ctx->brigade;
}