Author: jhorwitz
Date: Fri Dec 14 08:26:16 2007
New Revision: 272
Modified:
mod_parrot/trunk/src/mod_parrot.c
Log:
set HLL handler to r->handler if no HLL handler is specified. this can happen
if we're called via a type mapping.
Modified: mod_parrot/trunk/src/mod_parrot.c
==============================================================================
--- mod_parrot/trunk/src/mod_parrot.c (original)
+++ mod_parrot/trunk/src/mod_parrot.c Fri Dec 14 08:26:16 2007
@@ -167,7 +167,7 @@
modparrot_srv_config *cfg;
modparrot_context *ctxp;
int handler_status;
- char *sub, *hll;
+ char *sub, *hll, *hll_handler;
if (!r->handler) return DECLINED;
@@ -192,6 +192,9 @@
}
}
+ /* set HLL handler */
+ hll_handler = dircfg->handler ? dircfg->handler->id : (char *)r->handler;
+
/* set default content type */
r->content_type = "text/html";
@@ -211,10 +214,10 @@
/* call HLL handler */
sub = "_handler";
- if (!modparrot_hll_handler(ctxp->interp, hll, sub, dircfg->handler->id,
+ if (!modparrot_hll_handler(ctxp->interp, hll, sub, hll_handler,
&handler_status)) {
MPLOG_ERRORF(r->server,
- "no subroutine found for handler '%s'", dircfg->handler->id);
+ "no subroutine found for handler '%s'", hll_handler);
release_ctx(ctxp);
return HTTP_INTERNAL_SERVER_ERROR;
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.