[svn:mod_parrot] r439 - in mod_parrot/branches/hll-modules: docs include src
[email protected] Sun, 21 Sep 2008 07:54:49 -0700 (PDT)
| Newsgroups | perl.cvs.mod_parrot |
|---|---|
| Message-ID | <[email protected]> |
Author: jhorwitz
Date: Sun Sep 21 07:54:48 2008
New Revision: 439
Modified:
mod_parrot/branches/hll-modules/docs/apache-conf.txt
mod_parrot/branches/hll-modules/include/modparrot_config.h
mod_parrot/branches/hll-modules/src/mod_parrot.c
mod_parrot/branches/hll-modules/src/modparrot_config.c
Log:
remove support for ParrotAddType and ParrotAddHandler
update docs
Modified: mod_parrot/branches/hll-modules/docs/apache-conf.txt
==============================================================================
--- mod_parrot/branches/hll-modules/docs/apache-conf.txt (original)
+++ mod_parrot/branches/hll-modules/docs/apache-conf.txt Sun Sep 21 07:54:48 2008
@@ -1,10 +1,11 @@
+============================
mod_parrot Apache Directives
============================
ParrotInit
----------
Syntax: ParrotInit path
-Default: parrot's runtime path
+Default: PARROT_RUNTIME/runtime/parrot/library/mod_parrot.pbc
Context: server config
Description: Specify path to mod_parrot.pbc
@@ -20,7 +21,7 @@
Syntax: ParrotLoad path
Default: none
Context: server config (will eventually be allowed in directory config)
-Description: Load PBC, PIR, or high level language code
+Description: Load PBC, PIR
ParrotLoadImmediate
-------------------
@@ -37,39 +38,20 @@
Description: Enable Parrot trace output to the error log. See Parrot docs
for the appropriate trace levels.
-ParrotLanguage
---------------
-Syntax: ParrotLanguage language
-Default: pir
-Context: directory config
-Description: Sets the Parrot language for the containing block. Since several
- languages may be used in a single block, this syntax is subject
- to change.
-
-ParrotAddType
--------------
-Syntax: ParrotAddType hll mime-type [mime-type ...]
-Default: none
-Context: server config
-Description: associate a MIME type with a Parrot HLL
-
-ParrotAddHandler
-----------------
-Syntax: ParrotAddHandler hll handler [handler ...]
-Default: parrot-code
-Context: server config
-Description: associate an Apache handler string with a Parrot HLL
+========================
+PIR HLL Layer Directives
+========================
ParrotHandler
-------------
-Syntax: ParrotHandler [hll,]handler
+Syntax: ParrotHandler handler
Default: none
Context: directory config
Description: Sets the Parrot response handler (hll overrides directory config)
ParrotAuthenHandler
-------------------
-Syntax: ParrotAuthenHandler [hll,]handler
+Syntax: ParrotAuthenHandler handler
Default: none
Context: directory config
Description: Sets the Parrot authentication handler (hll overrides directory
@@ -77,7 +59,7 @@
ParrotAuthzHandler
------------------
-Syntax: ParrotAuthzHandler [hll,]handler
+Syntax: ParrotAuthzHandler handler
Default: none
Context: directory config
Description: Sets the Parrot authorization handler (hll overrides directory
@@ -85,98 +67,98 @@
ParrotAccessHandler
-------------------
-Syntax: ParrotAccessHandler [hll,]handler
+Syntax: ParrotAccessHandler handler
Default: none
Context: directory config
Description: Sets the Parrot access handler (hll overrides directory config)
ParrotOpenLogsHandler
---------------------
-Syntax: ParrotOpenLogsHandler [hll,]handler
+Syntax: ParrotOpenLogsHandler handler
Default: none
Context: server config
Description: Sets the Parrot open_logs handler
ParrotChildInitHandler
----------------------
-Syntax: ParrotChildInitHandler [hll,]handler
+Syntax: ParrotChildInitHandler handler
Default: none
Context: server config
Description: Sets the Parrot child_init handler
ParrotPostConfigHandler
-----------------------
-Syntax: ParrotPostConfigHandler [hll,]handler
+Syntax: ParrotPostConfigHandler handler
Default: none
Context: server config
Description: Sets the Parrot post_config handler
ParrotPreConnectionHandler
--------------------------
-Syntax: ParrotPreConnectionHandler [hll,]handler
+Syntax: ParrotPreConnectionHandler handler
Default: none
Context: server config
Description: Sets the Parrot pre_connection handler
ParrotProcessConnectionHandler
------------------------------
-Syntax: ParrotProcessConnectionHandler [hll,]handler
+Syntax: ParrotProcessConnectionHandler handler
Default: none
Context: server config
Description: Sets the Parrot process_connection handler
ParrotMapToStorageHandler
-------------------------
-Syntax: ParrotMapToStorageHandler [hll,]handler
+Syntax: ParrotMapToStorageHandler handler
Default: none
Context: server config
Description: Sets the Parrot map_to_storage handler
ParrotTransHandler
------------------
-Syntax: ParrotTransHandler [hll,]handler
+Syntax: ParrotTransHandler handler
Default: none
Context: server config
Description: Sets the Parrot trans handler
ParrotPostReadRequestHandler
----------------------------
-Syntax: ParrotPostReadRequestHandler [hll,]handler
+Syntax: ParrotPostReadRequestHandler handler
Default: none
Context: server config
Description: Sets the Parrot post_read_request handler
ParrotHeaderParserHandler
-------------------------
-Syntax: ParrotHeaderParserHandler [hll,]handler
+Syntax: ParrotHeaderParserHandler handler
Default: none
Context: directory config
Description: Sets the Parrot header_parser handler
ParrotTypeHandler
-----------------
-Syntax: ParrotTypeHandler [hll,]handler
+Syntax: ParrotTypeHandler handler
Default: none
Context: directory config
Description: Sets the Parrot type handler
ParrotFixupHandler
------------------
-Syntax: ParrotFixupHandler [hll,]handler
+Syntax: ParrotFixupHandler handler
Default: none
Context: directory config
Description: Sets the Parrot fixup handler
ParrotLogHandler
----------------
-Syntax: ParrotLogHandler [hll,]handler
+Syntax: ParrotLogHandler handler
Default: none
Context: directory config
Description: Sets the Parrot log handler
ParrotCleanupHandler
----------------
-Syntax: ParrotCleanupHandler [hll,]handler
+Syntax: ParrotCleanupHandler handler
Default: none
Context: directory config
Description: Sets the Parrot request cleanup handler
Modified: mod_parrot/branches/hll-modules/include/modparrot_config.h
==============================================================================
--- mod_parrot/branches/hll-modules/include/modparrot_config.h (original)
+++ mod_parrot/branches/hll-modules/include/modparrot_config.h Sun Sep 21 07:54:48 2008
@@ -89,8 +89,6 @@
int option_flags;
char *include_path;
apr_array_header_t *preload;
- apr_table_t *handler_map;
- apr_table_t *type_map;
apr_array_header_t *module_array;
apr_hash_t *module_hash;
};
Modified: mod_parrot/branches/hll-modules/src/mod_parrot.c
==============================================================================
--- mod_parrot/branches/hll-modules/src/mod_parrot.c (original)
+++ mod_parrot/branches/hll-modules/src/mod_parrot.c Sun Sep 21 07:54:48 2008
@@ -235,27 +235,6 @@
return res ? 1 : 0;
}
-static char *get_request_hll(request_rec *r, const char *handler,
- const char *content_type)
-{
- modparrot_srv_config *cfg;
- char *hll;
-
- cfg = ap_get_module_config(r->server->module_config, &parrot_module);
-
- /* check handler name */
- hll = (char *)apr_table_get(cfg->handler_map, handler);
- if (hll) return hll;
-
- /* check mime type */
- if (content_type) {
- hll = (char *)apr_table_get(cfg->type_map, content_type);
- if (hll) return hll;
- }
-
- return NULL;
-}
-
static int modparrot_request_phase_handler(request_rec *r)
{
modparrot_context *ctxp;
@@ -838,20 +817,6 @@
RSRC_CONF,
"set the Parrot include path"
),
- AP_INIT_ITERATE2(
- "ParrotAddType",
- modparrot_cmd_add_type,
- NULL,
- RSRC_CONF,
- "associate a MIME type with a mod_parrot HLL"
- ),
- AP_INIT_ITERATE2(
- "ParrotAddHandler",
- modparrot_cmd_add_handler,
- NULL,
- RSRC_CONF,
- "associate a handler string with a mod_parrot HLL"
- ),
AP_INIT_ITERATE(
"ParrotOptions",
modparrot_cmd_options,
Modified: mod_parrot/branches/hll-modules/src/modparrot_config.c
==============================================================================
--- mod_parrot/branches/hll-modules/src/modparrot_config.c (original)
+++ mod_parrot/branches/hll-modules/src/modparrot_config.c Sun Sep 21 07:54:48 2008
@@ -73,17 +73,12 @@
cfg->init_path = NULL;
cfg->preload = apr_array_make(p, 2, sizeof(char *));
cfg->include_path = NULL;
- cfg->type_map = apr_table_make(p, 2);
- cfg->handler_map = apr_table_make(p, 2);
cfg->module_array = apr_array_make(p, 2, sizeof(module *));
cfg->module_hash = apr_hash_make(p);
/* destroy context pool on cleanup */
apr_pool_cleanup_register(p, s, modparrot_cleanup, apr_pool_cleanup_null);
- /* set default HLL to PIR */
- apr_table_set(cfg->handler_map, MODPARROT_MAGIC, MODPARROT_DEFAULT_HLL);
-
return (void *)cfg;
}
@@ -112,14 +107,6 @@
merged->option_flags &= ~(newcfg->disable_option_flags);
}
- /* merge type and handler maps */
- merged->type_map = apr_table_copy(p, basecfg->type_map);
- apr_table_overlap(merged->type_map, newcfg->type_map,
- APR_OVERLAP_TABLES_SET);
- merged->handler_map = apr_table_copy(p, basecfg->handler_map);
- apr_table_overlap(merged->handler_map, newcfg->handler_map,
- APR_OVERLAP_TABLES_SET);
-
/* modules hash is only set in main server, so just copy */
/* XXX need to enforce this
newcfg->modules = apr_hash_copy(p, basecfg->modules);
@@ -240,24 +227,6 @@
return NULL;
}
-const char *modparrot_cmd_add_type(cmd_parms *cmd, void *mconfig, const char *hll, const char *mtype)
-{
- modparrot_srv_config *cfg;
-
- cfg = GET_SERVER_CONFIG(cmd);
- apr_table_set(cfg->type_map, mtype, hll);
- return NULL;
-}
-
-const char *modparrot_cmd_add_handler(cmd_parms *cmd, void *mconfig, const char *hll, const char *handler)
-{
- modparrot_srv_config *cfg;
-
- cfg = GET_SERVER_CONFIG(cmd);
- apr_table_set(cfg->handler_map, handler, hll);
- return NULL;
-}
-
const char *modparrot_cmd_options(cmd_parms *cmd, void *mconfig, const char *option)
{
modparrot_srv_config *cfg;