本文整理汇总了C++中AP_INIT_TAKE1函数的典型用法代码示例。如果您正苦于以下问题:C++ AP_INIT_TAKE1函数的具体用法?C++ AP_INIT_TAKE1怎么用?C++ AP_INIT_TAKE1使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了AP_INIT_TAKE1函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: compose_and_set_redirect
*/
// If 'redirect' is foo/bar, then redirect to it. If it is
// foo/bar/%s, then replace the %s with r->uri.
static void compose_and_set_redirect(request_rec *r, const char* redirect) {
char* composed_redirect = NULL;
if (ap_strstr_c(redirect, "%s")) {
composed_redirect = apr_psprintf(r->pool, redirect, r->uri);
}
apr_table_setn(r->headers_out, "Location", composed_redirect ? composed_redirect : redirect);
}
static const command_rec cookie_auth_cmds[] =
{
AP_INIT_TAKE1("AuthCookieName", ap_set_string_slot,
(void *)APR_OFFSETOF(cookie_auth_config_rec, cookie_auth_cookie),
OR_AUTHCFG, "auth cookie name"),
AP_INIT_TAKE1("AuthCookieEnv", ap_set_string_slot,
(void *)APR_OFFSETOF(cookie_auth_config_rec, cookie_auth_env),
OR_AUTHCFG, "environment variable name for optional auxiliary auth info"),
AP_INIT_TAKE1("AuthCookieEnvRedirect", ap_set_string_slot,
(void *)APR_OFFSETOF(cookie_auth_config_rec, cookie_auth_env_redirect),
OR_AUTHCFG, "path to redirect to if optional auxiliary auth info is missing in cookie"),
AP_INIT_TAKE1("AuthCookieUnauthRedirect", ap_set_string_slot,
(void *)APR_OFFSETOF(cookie_auth_config_rec, cookie_auth_unauth_redirect),
OR_AUTHCFG, "path to redirect to if authentication cookie is not set"),
AP_INIT_TAKE1("AuthCookieEncrypt", ap_set_string_slot,
(void *)APR_OFFSETOF(cookie_auth_config_rec, cookie_auth_encrypt),
OR_AUTHCFG, "secret key used to DES-encrypt the cookie"),
AP_INIT_FLAG("AuthCookieOverride", ap_set_flag_slot,
(void *)APR_OFFSETOF(cookie_auth_config_rec, cookie_auth_override),
开发者ID:akhiljain1986,项目名称:mod_auth_cookie,代码行数:31,代码来源:mod_auth_cookie.c
示例2: apr_table_setn
apr_table_setn(r->subprocess_env, sconf->mobile_env, "true");
}
}
} else {
// ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, r->server , "No entry found for UA: %s", user_agent);
}
return DECLINED;
}
static const command_rec wurfl_cmds[] =
{
AP_INIT_FLAG("WurflEnable", cmd_wurflengine, NULL, RSRC_CONF,
"On or off to enable the whole WURFL module"),
AP_INIT_TAKE1("WurflDBFile", cmd_wurfldb, NULL, RSRC_CONF,
"the filename of the WURFL-DB xml file"),
AP_INIT_TAKE1("WurflMobileEnv", cmd_wurflmobileenv, NULL, RSRC_CONF,
"ENV to set for mobile user agents"),
AP_INIT_TAKE1("WurflTabletEnv", cmd_wurfltabletenv, NULL, RSRC_CONF,
"ENV to set for tablet user agents"),
{ NULL }
};
static void register_hooks(apr_pool_t *p)
{
ap_hook_header_parser(wurfl_match_headers, NULL, NULL, APR_HOOK_MIDDLE);
}
module AP_MODULE_DECLARE_DATA wurfl_module = {
STANDARD20_MODULE_STUFF,
开发者ID:gklingler,项目名称:mod-wurfl,代码行数:32,代码来源:mod_wurfl.c
示例3: AP_INIT_FLAG
* @internal
*
* Declares all configuration directives.
*/
static const command_rec ironbee_cmds[] = {
AP_INIT_FLAG(
"IronBeeEnable",
ironbee_cmd_ibenable,
(void*)APR_OFFSETOF(ironbee_config_t, enabled),
RSRC_CONF,
"enable ironbee module"
),
AP_INIT_TAKE1(
"IronBeeConfig",
ironbee_cmd_ibconfig,
(void*)APR_OFFSETOF(ironbee_config_t, config),
RSRC_CONF,
"specify ironbee configuration file"
),
AP_INIT_TAKE1(
"IronBeeBufferSize",
ironbee_cmd_sz,
(void*)APR_OFFSETOF(ironbee_config_t, buf_size),
RSRC_CONF,
"specify buffer size (bytes)"
),
AP_INIT_TAKE1(
"IronBeeBufferFlushSize",
ironbee_cmd_sz,
(void*)APR_OFFSETOF(ironbee_config_t, flush_size),
RSRC_CONF,
开发者ID:igalic,项目名称:ironbee,代码行数:31,代码来源:mod_ironbee.c
示例4: register_hooks
"suffixed with 'b', 'k', 'm' or 'g'.";
}
dcfg->max_line_length = (apr_size_t)max;
dcfg->max_line_length_set = 1;
return NULL;
}
#define PROTO_FLAGS AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH
static void register_hooks(apr_pool_t *pool)
{
ap_register_output_filter(substitute_filter_name, substitute_filter,
NULL, AP_FTYPE_RESOURCE);
}
static const command_rec substitute_cmds[] = {
AP_INIT_TAKE1("Substitute", set_pattern, NULL, OR_FILEINFO,
"Pattern to filter the response content (s/foo/bar/[inf])"),
AP_INIT_TAKE1("SubstituteMaxLineLength", set_max_line_length, NULL, OR_FILEINFO,
"Maximum line length"),
AP_INIT_FLAG("SubstituteInheritBefore", ap_set_flag_slot,
(void *)APR_OFFSETOF(subst_dir_conf, inherit_before), OR_FILEINFO,
"Apply inherited patterns before those of the current context"),
{NULL}
};
AP_DECLARE_MODULE(substitute) = {
STANDARD20_MODULE_STUFF,
create_substitute_dcfg, /* dir config creater */
merge_substitute_dcfg, /* dir merger --- default is to override */
NULL, /* server config */
NULL, /* merge server config */
substitute_cmds, /* command table */
开发者ID:SBKarr,项目名称:apache-httpd-serenity,代码行数:32,代码来源:mod_substitute.c
示例5: strtol
debuglevel = strtol(arg, NULL, 10);
return NULL;
}
#endif
/* module info */
static const command_rec aclr_cmds[] =
{
AP_INIT_FLAG("AccelRedirectSet", set_aclr_state,
NULL, ACCESS_CONF|RSRC_CONF,
"Turn X-Accel-Redirect support On or Off (default Off)"),
AP_INIT_TAKE1("AccelRedirectSize", set_redirect_min_size,
NULL, ACCESS_CONF|RSRC_CONF,
"Minimum size of file for redirect"),
AP_INIT_FLAG("AccelRedirectOutsideDocRoot", set_aclr_outside_of_docroot,
NULL, RSRC_CONF,
"Allow redirect outside of DocumentRoot (default Off)"),
#ifdef DEBUG
AP_INIT_TAKE1("AccelRedirectDebug", set_debug_level,
NULL, RSRC_CONF,
"Debug level (0=off, 1=min, 2=mid, 3=max)"),
#endif
{ NULL }
};
开发者ID:defanator,项目名称:mod_aclr2,代码行数:30,代码来源:mod_aclr2.c
示例6: if
}
} else if (strcmp(name, "AmAgent") == 0) {
if (!strcasecmp(arg, "on")) {
conf->enabled = 1;
} else {
conf->enabled = 0;
}
}
}
}
return NULL;
}
/*Context: either top level or inside VirtualHost*/
static const command_rec amagent_cmds[] = {
AP_INIT_TAKE1("AmAgent", am_set_opt, NULL, RSRC_CONF, "Module enabled/disabled"),
AP_INIT_TAKE1("AmAgentConf", am_set_opt, NULL, RSRC_CONF, "Module configuration file"), {
NULL
}
};
static apr_status_t amagent_cleanup(void *arg) {
/* main process cleanup */
server_rec *s = (server_rec *) arg;
LOG_S(APLOG_DEBUG, s, "amagent_cleanup() %d", getpid());
#ifndef _WIN32
am_shutdown();
#endif
return APR_SUCCESS;
}
开发者ID:JonathanFu,项目名称:OpenAM-1,代码行数:30,代码来源:agent.c
示例7: MOD_MRUBY_SET_ALL_CMDS_INLINE
//ap_register_input_filter( "MODMRUBYFILTER", mod_mruby_input_filter, NULL, AP_FTYPE_CONTENT_SET);
}
#define MOD_MRUBY_SET_ALL_CMDS_INLINE(hook, dir_name) \
AP_INIT_TAKE1("mruby" #dir_name "FirstCode", set_mod_mruby_##hook##_first_inline, NULL, RSRC_CONF | ACCESS_CONF, "hook inline code for " #hook " first phase."), \
AP_INIT_TAKE1("mruby" #dir_name "MiddleCode", set_mod_mruby_##hook##_middle_inline, NULL, RSRC_CONF | ACCESS_CONF, "hook inline code for " #hook " middle phase."), \
AP_INIT_TAKE1("mruby" #dir_name "LastCode", set_mod_mruby_##hook##_last_inline, NULL, RSRC_CONF | ACCESS_CONF, "hook inline code for " #hook " last phase."),
#define MOD_MRUBY_SET_ALL_CMDS(hook, dir_name) \
AP_INIT_TAKE12("mruby" #dir_name "First", set_mod_mruby_##hook##_first, NULL, RSRC_CONF | ACCESS_CONF, "hook Ruby file for " #hook " first phase."), \
AP_INIT_TAKE12("mruby" #dir_name "Middle", set_mod_mruby_##hook##_middle, NULL, RSRC_CONF | ACCESS_CONF, "hook Ruby file for " #hook " middle phase."), \
AP_INIT_TAKE12("mruby" #dir_name "Last", set_mod_mruby_##hook##_last, NULL, RSRC_CONF | ACCESS_CONF, "hook Ruby file for " #hook " last phase."),
static const command_rec mod_mruby_cmds[] = {
AP_INIT_TAKE1("mrubyHandlerCode", set_mod_mruby_handler_inline, NULL, RSRC_CONF | ACCESS_CONF, "hook inline code for handler phase."),
MOD_MRUBY_SET_ALL_CMDS_INLINE(handler, Handler)
MOD_MRUBY_SET_ALL_CMDS_INLINE(post_read_request, PostReadRequest)
MOD_MRUBY_SET_ALL_CMDS_INLINE(translate_name, TranslateName)
MOD_MRUBY_SET_ALL_CMDS_INLINE(map_to_storage, MapToStorage)
MOD_MRUBY_SET_ALL_CMDS_INLINE(access_checker, AccessChecker)
MOD_MRUBY_SET_ALL_CMDS_INLINE(check_user_id, CheckUserId)
MOD_MRUBY_SET_ALL_CMDS_INLINE(auth_checker, AuthChecker)
MOD_MRUBY_SET_ALL_CMDS_INLINE(fixups, Fixups)
MOD_MRUBY_SET_ALL_CMDS_INLINE(log_transaction, LogTransaction)
AP_INIT_TAKE12("mrubyHandler", set_mod_mruby_handler, NULL, RSRC_CONF | ACCESS_CONF, "hook for handler phase."),
MOD_MRUBY_SET_ALL_CMDS(handler, Handler)
MOD_MRUBY_SET_ALL_CMDS(post_config, PostConfig)
MOD_MRUBY_SET_ALL_CMDS(child_init, ChildInit)
MOD_MRUBY_SET_ALL_CMDS(post_read_request, PostReadRequest)
开发者ID:mpmedia,项目名称:mod_mruby,代码行数:31,代码来源:mod_mruby.c
示例8: AP_INIT_RAW_ARGS
module AP_MODULE_DECLARE_DATA moon_module;
// config struct
typedef struct moon_svr_cfg {
char *buf;
const char* user_data_url;
const char* group_data_url;
apr_hash_t * user_to_css;
apr_hash_t * group_to_css;
} moon_svr_cfg;
// List of containers and directives
static const command_rec moon_cmds[] = {
AP_INIT_RAW_ARGS("<LMMPGroup", lmmpgroup_cmd, NULL, EXEC_ON_READ|OR_ALL, "Container for setting group css style"),
AP_INIT_RAW_ARGS("<LMMPUser", lmmpuser_cmd, NULL, EXEC_ON_READ|OR_ALL, "Container for setting user css style"),
AP_INIT_TAKE1("LMMPSetUserDataUrl", lmmpset_user_data_url_cmd, NULL, OR_ALL, "set user data url"),
AP_INIT_TAKE1("LMMPSetGroupDataUrl", lmmpset_group_data_url_cmd, NULL, OR_ALL, "set group data url"),
{ NULL }
};
// Standard Module declaration for Apache 2.0
module AP_MODULE_DECLARE_DATA moon_module = {
STANDARD20_MODULE_STUFF,
NULL,
NULL,
create_moon_cfg,
NULL,
moon_cmds,
moon_hooks
};
开发者ID:valderrama,项目名称:ModSSOBand,代码行数:30,代码来源:mod_moon.c
示例9: AP_INIT_TAKE1
See LICENSE file for licensing details.
*/
#include "mod_falcon.h"
#include "mod_falcon_config.h"
/*=========================================================
Module data.
Configuration directive for Falcon module
*/
static const command_rec mod_falcon_cmds[] =
{
AP_INIT_TAKE1(
"FalconConfig",
(const char *(*)())falcon_mod_set_config,
NULL,
RSRC_CONF,
"config_file (string) -- Location of the falcon.ini file."
),
AP_INIT_TAKE1(
"FalconHandler",
(const char *(*)())falcon_mod_set_handler,
NULL,
ACCESS_CONF | RSRC_CONF,
"handler script (string) -- Program invoked when falcon-program handler is excited."
),
AP_INIT_TAKE1(
"FalconLoadPath",
(const char *(*)())falcon_mod_set_path,
开发者ID:Klaim,项目名称:falcon,代码行数:31,代码来源:mod_falcon.c
示例10: AP_INIT_TAKE13
AP_INIT_TAKE13("LogSQLLoginInfo", set_log_sql_info, NULL, RSRC_CONF,
"The database connection URI in the form "driver://user:[email protected]:port/database"")
,
AP_INIT_TAKE2("LogSQLDBParam", set_dbparam, NULL, RSRC_CONF,
"First argument is the DB parameter, second is the value to assign")
,
AP_INIT_FLAG("LogSQLForcePreserve", set_global_flag_slot,
(void *)APR_OFFSETOF(global_config_t, forcepreserve), RSRC_CONF,
"Forces logging to preserve file and bypasses database")
,
AP_INIT_FLAG("LogSQLDisablePreserve", set_global_flag_slot,
(void *)APR_OFFSETOF(global_config_t, disablepreserve), RSRC_CONF,
"Completely disables use of the preserve file")
,
AP_INIT_TAKE1("LogSQLPreserveFile", set_server_file_slot,
(void *)APR_OFFSETOF(logsql_state,preserve_file), RSRC_CONF,
"Name of the file to use for data preservation during database downtime")
,
AP_INIT_FLAG("LogSQLCreateTables", set_global_nmv_flag_slot,
(void *)APR_OFFSETOF(global_config_t, createtables), RSRC_CONF,
"Turn on module's capability to create its SQL tables on the fly")
,
/* Table names */
AP_INIT_FLAG("LogSQLMassVirtualHosting", set_global_flag_slot,
(void *)APR_OFFSETOF(global_config_t, massvirtual), RSRC_CONF,
"Activates option(s) useful for ISPs performing mass virutal hosting")
,
AP_INIT_TAKE1("LogSQLTransferLogTable", set_server_nmv_string_slot,
(void *)APR_OFFSETOF(logsql_state, transfer_table_name), RSRC_CONF,
"The database table that holds the transfer log")
,
开发者ID:tommybotten,项目名称:mod_log_sql,代码行数:31,代码来源:mod_log_sql.c
示例11: AP_INIT_RAW_ARGS
return code;
}
/*
* Only needed configuration is pointer to resin.conf
*/
static const command_rec cwx_commands[] = {
AP_INIT_RAW_ARGS("cwinux-service", cwx_svr_command, NULL,
RSRC_CONF, "Configures service."),
AP_INIT_RAW_ARGS("cwinux-host", cwx_host_command, NULL,
RSRC_CONF, "Configures host."),
AP_INIT_RAW_ARGS("cwinux-balance", cwx_balance_command, NULL,
RSRC_CONF, "Configures balance."),
AP_INIT_RAW_ARGS("cwinux-header", cwx_header_command, NULL,
RSRC_CONF, "Configures header."),
AP_INIT_TAKE1("cwinux-show", cwx_show_command, NULL,
RSRC_CONF, "Configures default show."),
AP_INIT_TAKE1("cwinux-delay", cwx_delay_command, NULL,
RSRC_CONF, "Configures default delay."),
AP_INIT_TAKE1("cwinux-persistent", cwx_persistent_command, NULL,
RSRC_CONF, "Configures default persistent."),
AP_INIT_TAKE1("cwinux-query-timeout", cwx_query_timeout_command, NULL,
RSRC_CONF, "Configures default query-timeout."),
AP_INIT_TAKE1("cwinux-conn-timeout", cwx_conn_timeout_command, NULL,
RSRC_CONF, "Configures default conn-timeout."),
AP_INIT_TAKE1("cwinux-reply-timeout", cwx_reply_timeout_command, NULL,
RSRC_CONF, "Configures default reply-timeout."),
AP_INIT_TAKE1("cwinux-restore-time", cwx_restore_time_command, NULL,
RSRC_CONF, "Configures default restore-time."),
AP_INIT_TAKE1("cwinux-min-idle-conn", cwx_min_idle_conn_command, NULL,
RSRC_CONF, "Configures default min-idle-conn."),
AP_INIT_TAKE1("cwinux-max-idle-conn", cwx_max_idle_conn_command, NULL,
开发者ID:yuchao86,项目名称:MemDB,代码行数:32,代码来源:mod_cwinux.c
示例12: ap_check_cmd_context
}
static const char *set_keep_alive_max(cmd_parms *cmd, void *dummy,
const char *arg)
{
const char *err = ap_check_cmd_context(cmd, NOT_IN_DIR_LOC_FILE);
if (err != NULL) {
return err;
}
cmd->server->keep_alive_max = atoi(arg);
return NULL;
}
static const command_rec http_cmds[] = {
AP_INIT_TAKE1("KeepAliveTimeout", set_keep_alive_timeout, NULL, RSRC_CONF,
"Keep-Alive timeout duration (sec)"),
AP_INIT_TAKE1("MaxKeepAliveRequests", set_keep_alive_max, NULL, RSRC_CONF,
"Maximum number of Keep-Alive requests per connection, "
"or 0 for infinite"),
AP_INIT_FLAG("KeepAlive", set_keep_alive, NULL, RSRC_CONF,
"Whether persistent connections should be On or Off"),
{ NULL }
};
static const char *http_scheme(const request_rec *r)
{
/*
* The http module shouldn't return anything other than
* "http" (the default) or "https".
*/
if (r->server->server_scheme &&
开发者ID:amaji,项目名称:httpd-online-2.4.3,代码行数:32,代码来源:http_core.c
示例13: AP_INIT_TAKE1
ret = FTPD_CHROOT_FAIL;
}
}
return ret;
}
/* Module initialization structures */
static const ftpd_provider ftpd_dbm_provider =
{
ftpd_dbm_map_chroot, /* map_chroot */
NULL
};
static const command_rec ftpd_dbm_cmds[] = {
AP_INIT_TAKE1("FtpDBMFile", ftpd_dbm_cmd_dbmpath, NULL, RSRC_CONF,
"Path to Database to use chroot mapping."),
AP_INIT_TAKE1("FtpDBMType", ftpd_dbm_cmd_dbmtype, NULL, RSRC_CONF,
"What type of DBM file to open. default, DB,GDBM,NDBM, SDBM."),
{ NULL }
};
static void register_hooks(apr_pool_t *p)
{
ap_register_provider(p, FTPD_PROVIDER_GROUP, "dbm","0",
&ftpd_dbm_provider);
}
module AP_MODULE_DECLARE_DATA ftpd_dbm_module = {
STANDARD20_MODULE_STUFF,
NULL, /* create per-directory config structure */
NULL, /* merge per-directory config structures */
开发者ID:OutOfOrder,项目名称:mod_ftpd,代码行数:32,代码来源:mod_ftpd_dbm.c
示例14: APR_RETRIEVE_OPTIONAL_FN
dbd_handle = APR_RETRIEVE_OPTIONAL_FN(ap_dbd_acquire);
}
label = apr_psprintf(cmd->pool, "authz_dbd_%d", ++label_num);
dbd_prepare(cmd->server, query, label);
/* save the label here for our own use */
return ap_set_string_slot(cmd, cfg, label);
}
static const command_rec authz_dbd_cmds[] = {
AP_INIT_FLAG("AuthzDBDLoginToReferer", ap_set_flag_slot,
(void*)APR_OFFSETOF(authz_dbd_cfg, redirect), ACCESS_CONF,
"Whether to redirect to referer on successful login"),
AP_INIT_TAKE1("AuthzDBDQuery", authz_dbd_prepare,
(void*)APR_OFFSETOF(authz_dbd_cfg, query), ACCESS_CONF,
"SQL query for DBD Authz or login"),
AP_INIT_TAKE1("AuthzDBDRedirectQuery", authz_dbd_prepare,
(void*)APR_OFFSETOF(authz_dbd_cfg, redir_query), ACCESS_CONF,
"SQL query to get per-user redirect URL after login"),
{NULL}
};
static int authz_dbd_login(request_rec *r, authz_dbd_cfg *cfg,
const char *action)
{
int rv;
const char *newuri = NULL;
int nrows;
const char *message;
ap_dbd_t *dbd;
开发者ID:pexip,项目名称:os-apache2,代码行数:31,代码来源:mod_authz_dbd.c
示例15: svc_simulator_256b_get_reply
static char *
svc_simulator_256b_get_reply(
apr_pool_t * pool);
static void
svc_simulator_256b_module_init(
apr_pool_t * p,
server_rec * svr_rec);
static void
svc_simulator_256b_register_hooks(
apr_pool_t * p);
/***************************End of Function Headers****************************/
static const command_rec svc_simulator_256b_cmds[] = { AP_INIT_TAKE1("SvcSimulatorInputFile_256b", svc_simulator_256b_set_filepath, NULL,
RSRC_CONF, "Service Simulator file path"), { NULL } };
/* Dispatch list for API hooks */
module AP_MODULE_DECLARE_DATA svc_simulator_256b_module = { STANDARD20_MODULE_STUFF, NULL, /* create per-dir config structures */
NULL, /* merge per-dir config structures */
svc_simulator_256b_create_svr, /* create per-server config structures */
NULL, /* merge per-server config structures */
svc_simulator_256b_cmds, /* table of config file commands */
svc_simulator_256b_register_hooks /* register hooks */
};
static void *
svc_simulator_256b_create_svr(
apr_pool_t * p,
server_rec * s)
{
开发者ID:Niranjan-K,项目名称:commons,代码行数:32,代码来源:mod_simulator_256b.c
示例16: apr_psprintf
if (rv != APR_SUCCESS)
return apr_psprintf(cmd->pool, "%pm", &rv);
a->type = T_IP;
}
else { /* no slash, didn't look like an IP address => must be a host */
a->type = T_HOST;
}
return NULL;
}
static char its_an_allow;
static const command_rec access_compat_cmds[] =
{
AP_INIT_TAKE1("order", order, NULL, OR_LIMIT,
"'allow,deny', 'deny,allow', or 'mutual-failure'"),
AP_INIT_ITERATE2("allow", allow_cmd, &its_an_allow, OR_LIMIT,
"'from' followed by hostnames or IP-address wildcards"),
AP_INIT_ITERATE2("deny", allow_cmd, NULL, OR_LIMIT,
"'from' followed by hostnames or IP-address wildcards"),
AP_INIT_TAKE1("Satisfy", satisfy, NULL, OR_AUTHCFG,
"access policy if both allow and require used ('all' or 'any')"),
{NULL}
};
static int in_domain(const char *domain, const char *what)
{
int dl = strlen(domain);
int wl = strlen(what);
if ((wl - dl) >= 0) {
开发者ID:CptFrazz,项目名称:osx,代码行数:32,代码来源:mod_access_compat.c
示例17: strcpy
strcpy (buf, path);
strcat (buf, ":");
strcat (buf, arg);
} else {
strcpy (buf, arg);
}
setenv ("AIKIDOPATH", buf, 1);
return NULL;
}
static const command_rec aikido_cmds[] =
{
AP_INIT_TAKE1("AikidoWebApps", set_webapp_dir, NULL, RSRC_CONF,
"The path of the Aikido web applications"),
AP_INIT_TAKE1("AikidoRootDir", set_aikido_dir, NULL, RSRC_CONF,
"The directory containing the aikido.zip file"),
AP_INIT_TAKE1("AikidoAddPath", add_aikido_path, NULL, RSRC_CONF,
"Add a directory to the AIKIDOPATH environment variable"),
AP_INIT_TAKE1("AikidoDebugMode", set_aikido_debug, NULL, RSRC_CONF,
"Set the mod_aikido debug mode (true or false)"),
};
/*
* we have to create our own bucket type for reading from the sockets. The apr_bucket_pipe_make function
* seems to only read once and therefore a large amount of data seems to block the write to the pipe
开发者ID:dallison,项目名称:aikido3,代码行数:32,代码来源:mod_aikido.c
示例18: if
dcfg->style = CT_COOKIE;
}
else if ((strcasecmp(name, "Cookie2") == 0)
|| (strcasecmp(name, "RFC2965") == 0)) {
dcfg->style = CT_COOKIE2;
}
else {
return apr_psprintf(cmd->pool, "Invalid %s keyword: '%s'",
cmd->cmd->name, name);
}
return NULL;
}
static const command_rec cookie_log_cmds[] = {
AP_INIT_TAKE1("CookieExpires", set_cookie_exp, NULL, OR_FILEINFO,
"an expiry date code"),
AP_INIT_TAKE1("CookieDomain", set_cookie_domain, NULL, OR_FILEINFO,
"domain to which this cookie applies"),
AP_INIT_TAKE1("CookieStyle", set_cookie_style, NULL, OR_FILEINFO,
"'Netscape', 'Cookie' (RFC2109), or 'Cookie2' (RFC2965)"),
AP_INIT_FLAG("CookieTracking", set_cookie_enable, NULL, OR_FILEINFO,
"whether or not to enable cookies"),
AP_INIT_TAKE1("CookieName", set_cookie_name, NULL, OR_FILEINFO,
"name of the tracking cookie"),
{NULL}
};
static void register_hooks(apr_pool_t *p)
{
ap_hook_fixups(spot_cookie,NULL,NULL,APR_HOOK_REALLY_FIRST);
}
开发者ID:AzerTyQsdF,项目名称:osx,代码行数:32,代码来源:mod_usertrack.c
示例19: zend_hash_move_forward
zend_hash_move_forward(&d->config)) {
zend_hash_get_current_data(&d->config, (void **) &data);
phpapdebug((stderr, "APPLYING (%s)(%s)\n", str, data->value));
if (zend_alter_ini_entry(str, str_len, data->value, data->value_len, data->status, data->htaccess?PHP_INI_STAGE_HTACCESS:PHP_INI_STAGE_ACTIVATE) == FAILURE) {
phpapdebug((stderr, "..FAILED\n"));
}
}
}
const command_rec php_dir_cmds[] =
{
AP_INIT_TAKE2("php_value", php_apache_value_handler, NULL, OR_OPTIONS, "PHP Value Modifier"),
AP_INIT_TAKE2("php_flag", php_apache_flag_handler, NULL, OR_OPTIONS, "PHP Flag Modifier"),
AP_INIT_TAKE2("php_admin_value", php_apache_admin_value_handler, NULL, ACCESS_CONF|RSRC_CONF, "PHP Value Modifier (Admin)"),
AP_INIT_TAKE2("php_admin_flag", php_apache_admin_flag_handler, NULL, ACCESS_CONF|RSRC_CONF, "PHP Flag Modifier (Admin)"),
AP_INIT_TAKE1("PHPINIDir", php_apache_phpini_set, NULL, RSRC_CONF, "Directory containing the php.ini file"),
{NULL}
};
static apr_status_t destroy_php_config(void *data)
{
php_conf_rec *d = data;
phpapdebug((stderr, "Destroying config %p\n", data));
zend_hash_destroy(&d->config);
return APR_SUCCESS;
}
void *create_php_config(apr_pool_t *p, char *dummy)
{
开发者ID:Doap,项目名称:php-src,代码行数:31,代码来源:apache_config.c
示例20: AP_INIT_TAKE1
{
wiki_conf *c = (wiki_conf *) conf;
c->header = arg;
return NULL;
}
static const char *set_wiki_footer(cmd_parms * cmd, void *conf,
const char *arg)
{
wiki_conf *c = (wiki_conf *) conf;
c->footer = arg;
return NULL;
}
static const command_rec wiki_cmds[] = {
AP_INIT_TAKE1("WikiRepository", set_wiki_repo, NULL, OR_ALL,
"set Repository"),
AP_INIT_TAKE1("WikiName", set_wiki_name, NULL, OR_ALL,
"set WikiName"),
AP_INIT_TAKE1("WikiBasePath", set_wiki_basepath, NULL, OR_ALL,
"set Base Path"),
AP_INIT_TAKE1("WikiCSS", set_wiki_css, NULL, OR_ALL,
"set CSS"),
AP_INIT_TAKE1("WikiHeaderHtml", set_wiki_header, NULL, OR_ALL,
"set Header HTML"),
AP_INIT_TAKE1("WikiFooterHtml", set_wiki_footer, NULL, OR_ALL,
"set Footer HTML"),
{NULL}
};
static void wiki_register_hooks(apr_pool_t * p)
开发者ID:hamano,项目名称:apache-mod-wiki,代码行数:32,代码来源:mod_wiki.c
注:本文中的AP_INIT_TAKE1函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论