mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Changed pools to contexts. Tested with prefork and pthread mpm's. I'll
check this out tomorrow and make sure everything was checked in correctly. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@83852 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1151,6 +1151,8 @@ int setrlimit(int, struct rlimit *);
|
|||||||
#define INADDR_NONE ((unsigned long) -1)
|
#define INADDR_NONE ((unsigned long) -1)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
/* This stuff taken care of in APR XXXXX */
|
||||||
/*
|
/*
|
||||||
* Replace signal function with sigaction equivalent
|
* Replace signal function with sigaction equivalent
|
||||||
*/
|
*/
|
||||||
@@ -1170,7 +1172,7 @@ typedef void Sigfunc(int);
|
|||||||
#define signal(s,f) ap_signal(s,f)
|
#define signal(s,f) ap_signal(s,f)
|
||||||
Sigfunc *signal(int signo, Sigfunc * func);
|
Sigfunc *signal(int signo, Sigfunc * func);
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
#if defined(USE_LONGJMP)
|
#if defined(USE_LONGJMP)
|
||||||
|
@@ -70,7 +70,7 @@ struct ap_listen_rec {
|
|||||||
ap_listen_rec *ap_listeners;
|
ap_listen_rec *ap_listeners;
|
||||||
|
|
||||||
void ap_listen_pre_config(void);
|
void ap_listen_pre_config(void);
|
||||||
int ap_listen_open(pool *pconf, unsigned port);
|
int ap_listen_open(ap_context_t *pconf, unsigned port);
|
||||||
const char *ap_set_listenbacklog(cmd_parms *cmd, void *dummy, char *arg);
|
const char *ap_set_listenbacklog(cmd_parms *cmd, void *dummy, char *arg);
|
||||||
const char *ap_set_listener(cmd_parms *cmd, void *dummy, char *ips);
|
const char *ap_set_listener(cmd_parms *cmd, void *dummy, char *ips);
|
||||||
const char *ap_set_send_buffer_size(cmd_parms *cmd, void *dummy, char *arg);
|
const char *ap_set_send_buffer_size(cmd_parms *cmd, void *dummy, char *arg);
|
||||||
|
@@ -90,7 +90,7 @@
|
|||||||
However the MPM may choose to terminate processes when the user
|
However the MPM may choose to terminate processes when the user
|
||||||
requests a non-graceful restart/stop. When this occurs, the MPM kills
|
requests a non-graceful restart/stop. When this occurs, the MPM kills
|
||||||
all threads with extreme prejudice, and destroys the pchild pool.
|
all threads with extreme prejudice, and destroys the pchild pool.
|
||||||
User cleanups registered in the pchild pool will be invoked at
|
User cleanups registered in the pchild ap_context_t will be invoked at
|
||||||
this point. (This can pose some complications, the user cleanups
|
this point. (This can pose some complications, the user cleanups
|
||||||
are asynchronous behaviour not unlike longjmp/signal... but if the
|
are asynchronous behaviour not unlike longjmp/signal... but if the
|
||||||
admin is asking for a non-graceful shutdown, how much effort should
|
admin is asking for a non-graceful shutdown, how much effort should
|
||||||
@@ -108,7 +108,7 @@
|
|||||||
|
|
||||||
/* run until a restart/shutdown is indicated, return 1 for shutdown
|
/* run until a restart/shutdown is indicated, return 1 for shutdown
|
||||||
0 otherwise */
|
0 otherwise */
|
||||||
API_EXPORT(int) ap_mpm_run(pool *pconf, pool *plog, server_rec *server_conf);
|
API_EXPORT(int) ap_mpm_run(ap_context_t *pconf, ap_context_t *plog, server_rec *server_conf);
|
||||||
|
|
||||||
/* predicate indicating if a graceful stop has been requested ...
|
/* predicate indicating if a graceful stop has been requested ...
|
||||||
used by the connection loop */
|
used by the connection loop */
|
||||||
|
@@ -155,8 +155,8 @@ typedef struct {
|
|||||||
|
|
||||||
configfile_t *config_file; /* Config file structure from pcfg_openfile() */
|
configfile_t *config_file; /* Config file structure from pcfg_openfile() */
|
||||||
|
|
||||||
ap_pool *pool; /* Pool to allocate new storage in */
|
ap_context_t *pool; /* Pool to allocate new storage in */
|
||||||
struct pool *temp_pool; /* Pool for scratch memory; persists during
|
ap_context_t *temp_pool; /* Pool for scratch memory; persists during
|
||||||
* configuration, but wiped before the first
|
* configuration, but wiped before the first
|
||||||
* request is served...
|
* request is served...
|
||||||
*/
|
*/
|
||||||
@@ -211,10 +211,10 @@ typedef struct module_struct {
|
|||||||
* (see also mod_so).
|
* (see also mod_so).
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void *(*create_dir_config) (pool *p, char *dir);
|
void *(*create_dir_config) (ap_context_t *p, char *dir);
|
||||||
void *(*merge_dir_config) (pool *p, void *base_conf, void *new_conf);
|
void *(*merge_dir_config) (ap_context_t *p, void *base_conf, void *new_conf);
|
||||||
void *(*create_server_config) (pool *p, server_rec *s);
|
void *(*create_server_config) (ap_context_t *p, server_rec *s);
|
||||||
void *(*merge_server_config) (pool *p, void *base_conf, void *new_conf);
|
void *(*merge_server_config) (ap_context_t *p, void *base_conf, void *new_conf);
|
||||||
|
|
||||||
const command_rec *cmds;
|
const command_rec *cmds;
|
||||||
const handler_rec *handlers;
|
const handler_rec *handlers;
|
||||||
@@ -280,7 +280,7 @@ API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *, char *, char *);
|
|||||||
* it relativizes it wrt server_root.
|
* it relativizes it wrt server_root.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
API_EXPORT(const char *) ap_server_root_relative(pool *p, const char *fname);
|
API_EXPORT(const char *) ap_server_root_relative(ap_context_t *p, const char *fname);
|
||||||
|
|
||||||
/* Finally, the hook for dynamically loading modules in... */
|
/* Finally, the hook for dynamically loading modules in... */
|
||||||
|
|
||||||
@@ -319,35 +319,35 @@ extern API_VAR_EXPORT module **ap_loaded_modules;
|
|||||||
|
|
||||||
/* For mod_so.c... */
|
/* For mod_so.c... */
|
||||||
|
|
||||||
void ap_single_module_configure(pool *p, server_rec *s, module *m);
|
void ap_single_module_configure(ap_context_t *p, server_rec *s, module *m);
|
||||||
|
|
||||||
/* For http_main.c... */
|
/* For http_main.c... */
|
||||||
|
|
||||||
void ap_setup_prelinked_modules(void);
|
void ap_setup_prelinked_modules(void);
|
||||||
void ap_show_directives(void);
|
void ap_show_directives(void);
|
||||||
void ap_show_modules(void);
|
void ap_show_modules(void);
|
||||||
server_rec *ap_read_config(pool *conf_pool, pool *temp_pool, const char *config_name);
|
server_rec *ap_read_config(ap_context_t *conf_pool, ap_context_t *temp_pool, const char *config_name);
|
||||||
void ap_post_config_hook(pool *pconf, pool *plog, pool *ptemp, server_rec *s);
|
void ap_post_config_hook(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s);
|
||||||
void ap_child_init_hook(pool *pchild, server_rec *s);
|
void ap_child_init_hook(ap_context_t *pchild, server_rec *s);
|
||||||
|
|
||||||
/* For http_request.c... */
|
/* For http_request.c... */
|
||||||
|
|
||||||
void *ap_create_request_config(pool *p);
|
void *ap_create_request_config(ap_context_t *p);
|
||||||
CORE_EXPORT(void *) ap_create_per_dir_config(pool *p);
|
CORE_EXPORT(void *) ap_create_per_dir_config(ap_context_t *p);
|
||||||
void *ap_merge_per_dir_configs(pool *p, void *base, void *new);
|
void *ap_merge_per_dir_configs(ap_context_t *p, void *base, void *new);
|
||||||
|
|
||||||
/* For http_connection.c... */
|
/* For http_connection.c... */
|
||||||
|
|
||||||
void *ap_create_conn_config(pool *p);
|
void *ap_create_conn_config(ap_context_t *p);
|
||||||
|
|
||||||
/* For http_core.c... (<Directory> command and virtual hosts) */
|
/* For http_core.c... (<Directory> command and virtual hosts) */
|
||||||
|
|
||||||
int ap_parse_htaccess(void **result, request_rec *r, int override,
|
int ap_parse_htaccess(void **result, request_rec *r, int override,
|
||||||
const char *path, const char *access_name);
|
const char *path, const char *access_name);
|
||||||
|
|
||||||
CORE_EXPORT(const char *) ap_init_virtual_host(pool *p, const char *hostname,
|
CORE_EXPORT(const char *) ap_init_virtual_host(ap_context_t *p, const char *hostname,
|
||||||
server_rec *main_server, server_rec **);
|
server_rec *main_server, server_rec **);
|
||||||
void ap_process_resource_config(server_rec *s, const char *fname, pool *p, pool *ptemp);
|
void ap_process_resource_config(server_rec *s, const char *fname, ap_context_t *p, ap_context_t *ptemp);
|
||||||
|
|
||||||
/* Module-method dispatchers, also for http_request.c */
|
/* Module-method dispatchers, also for http_request.c */
|
||||||
|
|
||||||
@@ -366,12 +366,12 @@ CORE_EXPORT(const char *) ap_handle_command(cmd_parms *parms, void *config, cons
|
|||||||
|
|
||||||
/* Hooks */
|
/* Hooks */
|
||||||
DECLARE_HOOK(int,header_parser,(request_rec *))
|
DECLARE_HOOK(int,header_parser,(request_rec *))
|
||||||
DECLARE_HOOK(void,pre_config,(pool *pconf,pool *plog,pool *ptemp))
|
DECLARE_HOOK(void,pre_config,(ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp))
|
||||||
DECLARE_HOOK(void,post_config,
|
DECLARE_HOOK(void,post_config,
|
||||||
(pool *pconf,pool *plog,pool *ptemp,server_rec *s))
|
(ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp,server_rec *s))
|
||||||
DECLARE_HOOK(void,open_logs,
|
DECLARE_HOOK(void,open_logs,
|
||||||
(pool *pconf,pool *plog,pool *ptemp,server_rec *s))
|
(ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp,server_rec *s))
|
||||||
DECLARE_HOOK(void,child_init,(pool *pchild, server_rec *s))
|
DECLARE_HOOK(void,child_init,(ap_context_t *pchild, server_rec *s))
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -64,7 +64,7 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
conn_rec *ap_new_connection(pool *p, server_rec *server, BUFF *inout,
|
conn_rec *ap_new_connection(ap_context_t *p, server_rec *server, BUFF *inout,
|
||||||
const struct sockaddr_in *remaddr,
|
const struct sockaddr_in *remaddr,
|
||||||
const struct sockaddr_in *saddr, long id);
|
const struct sockaddr_in *saddr, long id);
|
||||||
CORE_EXPORT(void) ap_process_connection(conn_rec *);
|
CORE_EXPORT(void) ap_process_connection(conn_rec *);
|
||||||
|
@@ -62,6 +62,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "apr_lib.h"
|
||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
*
|
*
|
||||||
* The most basic server code is encapsulated in a single module
|
* The most basic server code is encapsulated in a single module
|
||||||
@@ -128,7 +130,7 @@ API_EXPORT(const char *) ap_get_remote_logname(request_rec *r);
|
|||||||
/* Used for constructing self-referencing URLs, and things like SERVER_PORT,
|
/* Used for constructing self-referencing URLs, and things like SERVER_PORT,
|
||||||
* and SERVER_NAME.
|
* and SERVER_NAME.
|
||||||
*/
|
*/
|
||||||
API_EXPORT(char *) ap_construct_url(pool *p, const char *uri, request_rec *r);
|
API_EXPORT(char *) ap_construct_url(ap_context_t *p, const char *uri, request_rec *r);
|
||||||
API_EXPORT(const char *) ap_get_server_name(request_rec *r);
|
API_EXPORT(const char *) ap_get_server_name(request_rec *r);
|
||||||
API_EXPORT(unsigned) ap_get_server_port(const request_rec *r);
|
API_EXPORT(unsigned) ap_get_server_port(const request_rec *r);
|
||||||
API_EXPORT(unsigned long) ap_get_limit_req_body(const request_rec *r);
|
API_EXPORT(unsigned long) ap_get_limit_req_body(const request_rec *r);
|
||||||
@@ -150,7 +152,7 @@ typedef struct {
|
|||||||
API_EXPORT(const char *) ap_auth_type (request_rec *);
|
API_EXPORT(const char *) ap_auth_type (request_rec *);
|
||||||
API_EXPORT(const char *) ap_auth_name (request_rec *);
|
API_EXPORT(const char *) ap_auth_name (request_rec *);
|
||||||
API_EXPORT(int) ap_satisfies (request_rec *r);
|
API_EXPORT(int) ap_satisfies (request_rec *r);
|
||||||
API_EXPORT(const array_header *) ap_requires (request_rec *);
|
API_EXPORT(const ap_array_header_t *) ap_requires (request_rec *);
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
/*
|
/*
|
||||||
@@ -210,7 +212,7 @@ typedef struct {
|
|||||||
int satisfy;
|
int satisfy;
|
||||||
char *ap_auth_type;
|
char *ap_auth_type;
|
||||||
char *ap_auth_name;
|
char *ap_auth_name;
|
||||||
array_header *ap_requires;
|
ap_array_header_t *ap_requires;
|
||||||
|
|
||||||
/* Custom response config. These can contain text or a URL to redirect to.
|
/* Custom response config. These can contain text or a URL to redirect to.
|
||||||
* if response_code_strings is NULL then there are none in the config,
|
* if response_code_strings is NULL then there are none in the config,
|
||||||
@@ -251,7 +253,7 @@ typedef struct {
|
|||||||
int loglevel;
|
int loglevel;
|
||||||
|
|
||||||
/* Access control */
|
/* Access control */
|
||||||
array_header *sec;
|
ap_array_header_t *sec;
|
||||||
regex_t *r;
|
regex_t *r;
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
@@ -278,12 +280,12 @@ typedef struct {
|
|||||||
/* Access control */
|
/* Access control */
|
||||||
|
|
||||||
char *access_name;
|
char *access_name;
|
||||||
array_header *sec;
|
ap_array_header_t *sec;
|
||||||
array_header *sec_url;
|
ap_array_header_t *sec_url;
|
||||||
} core_server_config;
|
} core_server_config;
|
||||||
|
|
||||||
/* for http_config.c */
|
/* for http_config.c */
|
||||||
void ap_core_reorder_directories(pool *, server_rec *);
|
void ap_core_reorder_directories(ap_context_t *, server_rec *);
|
||||||
|
|
||||||
/* for mod_perl */
|
/* for mod_perl */
|
||||||
CORE_EXPORT(void) ap_add_per_dir_conf (server_rec *s, void *dir_config);
|
CORE_EXPORT(void) ap_add_per_dir_conf (server_rec *s, void *dir_config);
|
||||||
|
@@ -104,7 +104,7 @@ extern "C" {
|
|||||||
|
|
||||||
#define APLOG_MARK __FILE__,__LINE__
|
#define APLOG_MARK __FILE__,__LINE__
|
||||||
|
|
||||||
void ap_open_logs (server_rec *, pool *p);
|
void ap_open_logs (server_rec *, ap_context_t *p);
|
||||||
|
|
||||||
/* The two primary logging functions, ap_log_error and ap_log_rerror,
|
/* The two primary logging functions, ap_log_error and ap_log_rerror,
|
||||||
* use a printf style format string to build the log message. It is
|
* use a printf style format string to build the log message. It is
|
||||||
@@ -122,7 +122,7 @@ API_EXPORT(void) ap_log_rerror(const char *file, int line, int level,
|
|||||||
__attribute__((format(printf,5,6)));
|
__attribute__((format(printf,5,6)));
|
||||||
API_EXPORT(void) ap_error_log2stderr (server_rec *);
|
API_EXPORT(void) ap_error_log2stderr (server_rec *);
|
||||||
|
|
||||||
void ap_log_pid (pool *p, const char *fname);
|
void ap_log_pid (ap_context_t *p, const char *fname);
|
||||||
/* These are for legacy code, new code should use ap_log_error,
|
/* These are for legacy code, new code should use ap_log_error,
|
||||||
* or ap_log_rerror.
|
* or ap_log_rerror.
|
||||||
*/
|
*/
|
||||||
@@ -135,7 +135,7 @@ API_EXPORT(void) ap_log_reason(const char *reason, const char *fname,
|
|||||||
request_rec *r);
|
request_rec *r);
|
||||||
|
|
||||||
typedef struct piped_log {
|
typedef struct piped_log {
|
||||||
pool *p;
|
ap_context_t *p;
|
||||||
#ifndef NO_RELIABLE_PIPED_LOGS
|
#ifndef NO_RELIABLE_PIPED_LOGS
|
||||||
char *program;
|
char *program;
|
||||||
int pid;
|
int pid;
|
||||||
@@ -145,7 +145,7 @@ typedef struct piped_log {
|
|||||||
#endif
|
#endif
|
||||||
} piped_log;
|
} piped_log;
|
||||||
|
|
||||||
API_EXPORT(piped_log *) ap_open_piped_log (pool *p, const char *program);
|
API_EXPORT(piped_log *) ap_open_piped_log (ap_context_t *p, const char *program);
|
||||||
API_EXPORT(void) ap_close_piped_log (piped_log *);
|
API_EXPORT(void) ap_close_piped_log (piped_log *);
|
||||||
#ifndef NO_RELIABLE_PIPED_LOGS
|
#ifndef NO_RELIABLE_PIPED_LOGS
|
||||||
#define ap_piped_log_read_fd(pl) ((pl)->fds[0])
|
#define ap_piped_log_read_fd(pl) ((pl)->fds[0])
|
||||||
|
@@ -67,9 +67,9 @@ extern MODULE_VAR_EXPORT char *ap_server_argv0;
|
|||||||
extern API_VAR_EXPORT const char *ap_server_root;
|
extern API_VAR_EXPORT const char *ap_server_root;
|
||||||
|
|
||||||
/* for -C, -c and -D switches */
|
/* for -C, -c and -D switches */
|
||||||
extern array_header *ap_server_pre_read_config;
|
extern ap_array_header_t *ap_server_pre_read_config;
|
||||||
extern array_header *ap_server_post_read_config;
|
extern ap_array_header_t *ap_server_post_read_config;
|
||||||
extern array_header *ap_server_config_defines;
|
extern ap_array_header_t *ap_server_config_defines;
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
@@ -81,7 +81,7 @@ extern "C" {
|
|||||||
* (e.g., for includes), a module may call for the request to be run
|
* (e.g., for includes), a module may call for the request to be run
|
||||||
* by calling run_sub_req. The space allocated to create sub_reqs can be
|
* by calling run_sub_req. The space allocated to create sub_reqs can be
|
||||||
* reclaimed by calling destroy_sub_req --- be sure to copy anything you care
|
* reclaimed by calling destroy_sub_req --- be sure to copy anything you care
|
||||||
* about which was allocated in its pool elsewhere before doing this.
|
* about which was allocated in its ap_context_t elsewhere before doing this.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
API_EXPORT(request_rec *) ap_sub_req_lookup_uri(const char *new_file,
|
API_EXPORT(request_rec *) ap_sub_req_lookup_uri(const char *new_file,
|
||||||
|
@@ -63,13 +63,13 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* called before any config is read */
|
/* called before any config is read */
|
||||||
void ap_init_vhost_config(pool *p);
|
void ap_init_vhost_config(ap_context_t *p);
|
||||||
|
|
||||||
/* called after the config has been read */
|
/* called after the config has been read */
|
||||||
void ap_fini_vhost_config(pool *p, server_rec *main_server);
|
void ap_fini_vhost_config(ap_context_t *p, server_rec *main_server);
|
||||||
|
|
||||||
/* handle addresses in <VirtualHost> statement */
|
/* handle addresses in <VirtualHost> statement */
|
||||||
const char *ap_parse_vhost_addrs(pool *p, const char *hostname, server_rec *s);
|
const char *ap_parse_vhost_addrs(ap_context_t *p, const char *hostname, server_rec *s);
|
||||||
|
|
||||||
/* handle NameVirtualHost directive */
|
/* handle NameVirtualHost directive */
|
||||||
const char *ap_set_name_virtual_host (cmd_parms *cmd, void *dummy, char *arg);
|
const char *ap_set_name_virtual_host (cmd_parms *cmd, void *dummy, char *arg);
|
||||||
|
111
include/httpd.h
111
include/httpd.h
@@ -69,7 +69,8 @@ extern "C" {
|
|||||||
/* Headers in which EVERYONE has an interest... */
|
/* Headers in which EVERYONE has an interest... */
|
||||||
|
|
||||||
#include "ap_config.h"
|
#include "ap_config.h"
|
||||||
#include "alloc.h"
|
#include "apr_general.h"
|
||||||
|
#include "apr_lib.h"
|
||||||
#include "buff.h"
|
#include "buff.h"
|
||||||
#include "ap.h"
|
#include "ap.h"
|
||||||
#include "apr.h"
|
#include "apr.h"
|
||||||
@@ -381,7 +382,7 @@ extern "C" {
|
|||||||
#define SERVER_BASEVERSION "Apache/2.0-dev" /* SEE COMMENTS ABOVE */
|
#define SERVER_BASEVERSION "Apache/2.0-dev" /* SEE COMMENTS ABOVE */
|
||||||
#define SERVER_VERSION SERVER_BASEVERSION
|
#define SERVER_VERSION SERVER_BASEVERSION
|
||||||
|
|
||||||
/* TODO: re-implement the server token/version stuff -- it's part of http_core
|
/* TODO: re ap_context_t mplement the server token/version stuff -- it's part of http_core
|
||||||
* it should be possible to do without touching http_main at all. (or else
|
* it should be possible to do without touching http_main at all. (or else
|
||||||
* we haven't got enough module hooks)
|
* we haven't got enough module hooks)
|
||||||
*/
|
*/
|
||||||
@@ -423,7 +424,7 @@ API_EXPORT(const char *) ap_get_server_built(void);
|
|||||||
|
|
||||||
/* The size of the static array in http_protocol.c for storing
|
/* The size of the static array in http_protocol.c for storing
|
||||||
* all of the potential response status-lines (a sparse table).
|
* all of the potential response status-lines (a sparse table).
|
||||||
* A future version should dynamically generate the table at startup.
|
* A future version should dynamically generate the ap_table_t at startup.
|
||||||
*/
|
*/
|
||||||
#define RESPONSE_CODES 55
|
#define RESPONSE_CODES 55
|
||||||
|
|
||||||
@@ -542,7 +543,7 @@ API_EXPORT(const char *) ap_get_server_built(void);
|
|||||||
#define ASCIITEXT_MAGIC_TYPE_PREFIX "text/x-ascii-" /* Text files whose content-type starts with this are passed thru unconverted */
|
#define ASCIITEXT_MAGIC_TYPE_PREFIX "text/x-ascii-" /* Text files whose content-type starts with this are passed thru unconverted */
|
||||||
#endif /*CHARSET_EBCDIC*/
|
#endif /*CHARSET_EBCDIC*/
|
||||||
#define MAP_FILE_MAGIC_TYPE "application/x-type-map"
|
#define MAP_FILE_MAGIC_TYPE "application/x-type-map"
|
||||||
#define ASIS_MAGIC_TYPE "httpd/send-as-is"
|
#define ASIS_MAGIC_TYPE "httpd/send-as ap_context_t s"
|
||||||
#define DIR_MAGIC_TYPE "httpd/unix-directory"
|
#define DIR_MAGIC_TYPE "httpd/unix-directory"
|
||||||
#define STATUS_MAGIC_TYPE "application/x-httpd-status"
|
#define STATUS_MAGIC_TYPE "application/x-httpd-status"
|
||||||
|
|
||||||
@@ -623,7 +624,7 @@ typedef struct request_rec request_rec;
|
|||||||
|
|
||||||
struct request_rec {
|
struct request_rec {
|
||||||
|
|
||||||
ap_pool *pool;
|
ap_context_t *pool;
|
||||||
conn_rec *connection;
|
conn_rec *connection;
|
||||||
server_rec *server;
|
server_rec *server;
|
||||||
|
|
||||||
@@ -711,15 +712,15 @@ struct request_rec {
|
|||||||
* latter are printed even on error, and persist across internal redirects
|
* latter are printed even on error, and persist across internal redirects
|
||||||
* (so the headers printed for ErrorDocument handlers will have them).
|
* (so the headers printed for ErrorDocument handlers will have them).
|
||||||
*
|
*
|
||||||
* The 'notes' table is for notes from one module to another, with no
|
* The 'notes' ap_table_t is for notes from one module to another, with no
|
||||||
* other set purpose in mind...
|
* other set purpose in mind...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
table *headers_in;
|
ap_table_t *headers_in;
|
||||||
table *headers_out;
|
ap_table_t *headers_out;
|
||||||
table *err_headers_out;
|
ap_table_t *err_headers_out;
|
||||||
table *subprocess_env;
|
ap_table_t *subprocess_env;
|
||||||
table *notes;
|
ap_table_t *notes;
|
||||||
|
|
||||||
/* content_type, handler, content_encoding, content_language, and all
|
/* content_type, handler, content_encoding, content_language, and all
|
||||||
* content_languages MUST be lowercased strings. They may be pointers
|
* content_languages MUST be lowercased strings. They may be pointers
|
||||||
@@ -730,7 +731,7 @@ struct request_rec {
|
|||||||
|
|
||||||
const char *content_encoding;
|
const char *content_encoding;
|
||||||
const char *content_language; /* for back-compat. only -- do not use */
|
const char *content_language; /* for back-compat. only -- do not use */
|
||||||
array_header *content_languages; /* array of (char*) */
|
ap_array_header_t *content_languages; /* array of (char*) */
|
||||||
|
|
||||||
char *vlist_validator; /* variant list validator (if negotiated) */
|
char *vlist_validator; /* variant list validator (if negotiated) */
|
||||||
|
|
||||||
@@ -783,7 +784,7 @@ struct request_rec {
|
|||||||
|
|
||||||
struct conn_rec {
|
struct conn_rec {
|
||||||
|
|
||||||
ap_pool *pool;
|
ap_context_t *pool;
|
||||||
server_rec *base_server; /* Physical vhost this conn come in on */
|
server_rec *base_server; /* Physical vhost this conn come in on */
|
||||||
void *vhost_lookup_data; /* used by http_vhost.c */
|
void *vhost_lookup_data; /* used by http_vhost.c */
|
||||||
|
|
||||||
@@ -881,8 +882,8 @@ struct server_rec {
|
|||||||
char *path; /* Pathname for ServerPath */
|
char *path; /* Pathname for ServerPath */
|
||||||
int pathlen; /* Length of path */
|
int pathlen; /* Length of path */
|
||||||
|
|
||||||
array_header *names; /* Normal names for ServerAlias servers */
|
ap_array_header_t *names; /* Normal names for ServerAlias servers */
|
||||||
array_header *wild_names; /* Wildcarded names for ServerAlias servers */
|
ap_array_header_t *wild_names; /* Wildcarded names for ServerAlias servers */
|
||||||
|
|
||||||
uid_t server_uid; /* effective user id when calling exec wrapper */
|
uid_t server_uid; /* effective user id when calling exec wrapper */
|
||||||
gid_t server_gid; /* effective group id when calling exec wrapper */
|
gid_t server_gid; /* effective group id when calling exec wrapper */
|
||||||
@@ -904,68 +905,68 @@ extern API_VAR_EXPORT const char ap_day_snames[7][4];
|
|||||||
|
|
||||||
API_EXPORT(struct tm *) ap_get_gmtoff(int *tz);
|
API_EXPORT(struct tm *) ap_get_gmtoff(int *tz);
|
||||||
API_EXPORT(char *) ap_get_time(void);
|
API_EXPORT(char *) ap_get_time(void);
|
||||||
API_EXPORT(char *) ap_field_noparam(pool *p, const char *intype);
|
API_EXPORT(char *) ap_field_noparam(ap_context_t *p, const char *intype);
|
||||||
API_EXPORT(char *) ap_ht_time(pool *p, time_t t, const char *fmt, int gmt);
|
API_EXPORT(char *) ap_ht_time(ap_context_t *p, time_t t, const char *fmt, int gmt);
|
||||||
API_EXPORT(char *) ap_gm_timestr_822(pool *p, time_t t);
|
API_EXPORT(char *) ap_gm_timestr_822(ap_context_t *p, time_t t);
|
||||||
|
|
||||||
/* String handling. The *_nc variants allow you to use non-const char **s as
|
/* String handling. The *_nc variants allow you to use non-const char **s as
|
||||||
arguments (unfortunately C won't automatically convert a char ** to a const
|
arguments (unfortunately C won't automatically convert a char ** to a const
|
||||||
char **) */
|
char **) */
|
||||||
|
|
||||||
API_EXPORT(char *) ap_getword(pool *p, const char **line, char stop);
|
API_EXPORT(char *) ap_getword(ap_context_t *p, const char **line, char stop);
|
||||||
API_EXPORT(char *) ap_getword_nc(pool *p, char **line, char stop);
|
API_EXPORT(char *) ap_getword_nc(ap_context_t *p, char **line, char stop);
|
||||||
API_EXPORT(char *) ap_getword_white(pool *p, const char **line);
|
API_EXPORT(char *) ap_getword_white(ap_context_t *p, const char **line);
|
||||||
API_EXPORT(char *) ap_getword_white_nc(pool *p, char **line);
|
API_EXPORT(char *) ap_getword_white_nc(ap_context_t *p, char **line);
|
||||||
API_EXPORT(char *) ap_getword_nulls(pool *p, const char **line, char stop);
|
API_EXPORT(char *) ap_getword_nulls(ap_context_t *p, const char **line, char stop);
|
||||||
API_EXPORT(char *) ap_getword_nulls_nc(pool *p, char **line, char stop);
|
API_EXPORT(char *) ap_getword_nulls_nc(ap_context_t *p, char **line, char stop);
|
||||||
API_EXPORT(char *) ap_getword_conf(pool *p, const char **line);
|
API_EXPORT(char *) ap_getword_conf(ap_context_t *p, const char **line);
|
||||||
API_EXPORT(char *) ap_getword_conf_nc(pool *p, char **line);
|
API_EXPORT(char *) ap_getword_conf_nc(ap_context_t *p, char **line);
|
||||||
|
|
||||||
API_EXPORT(const char *) ap_size_list_item(const char **field, int *len);
|
API_EXPORT(const char *) ap_size_list_item(const char **field, int *len);
|
||||||
API_EXPORT(char *) ap_get_list_item(pool *p, const char **field);
|
API_EXPORT(char *) ap_get_list_item(ap_context_t *p, const char **field);
|
||||||
API_EXPORT(int) ap_find_list_item(pool *p, const char *line, const char *tok);
|
API_EXPORT(int) ap_find_list_item(ap_context_t *p, const char *line, const char *tok);
|
||||||
|
|
||||||
API_EXPORT(char *) ap_get_token(pool *p, const char **accept_line, int accept_white);
|
API_EXPORT(char *) ap_get_token(ap_context_t *p, const char **accept_line, int accept_white);
|
||||||
API_EXPORT(int) ap_find_token(pool *p, const char *line, const char *tok);
|
API_EXPORT(int) ap_find_token(ap_context_t *p, const char *line, const char *tok);
|
||||||
API_EXPORT(int) ap_find_last_token(pool *p, const char *line, const char *tok);
|
API_EXPORT(int) ap_find_last_token(ap_context_t *p, const char *line, const char *tok);
|
||||||
|
|
||||||
API_EXPORT(int) ap_is_url(const char *u);
|
API_EXPORT(int) ap_is_url(const char *u);
|
||||||
API_EXPORT(int) ap_unescape_url(char *url);
|
API_EXPORT(int) ap_unescape_url(char *url);
|
||||||
API_EXPORT(void) ap_no2slash(char *name);
|
API_EXPORT(void) ap_no2slash(char *name);
|
||||||
API_EXPORT(void) ap_getparents(char *name);
|
API_EXPORT(void) ap_getparents(char *name);
|
||||||
API_EXPORT(char *) ap_escape_path_segment(pool *p, const char *s);
|
API_EXPORT(char *) ap_escape_path_segment(ap_context_t *p, const char *s);
|
||||||
API_EXPORT(char *) ap_os_escape_path(pool *p, const char *path, int partial);
|
API_EXPORT(char *) ap_os_escape_path(ap_context_t *p, const char *path, int partial);
|
||||||
#define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1)
|
#define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1)
|
||||||
API_EXPORT(char *) ap_escape_html(pool *p, const char *s);
|
API_EXPORT(char *) ap_escape_html(ap_context_t *p, const char *s);
|
||||||
API_EXPORT(char *) ap_construct_server(pool *p, const char *hostname,
|
API_EXPORT(char *) ap_construct_server(ap_context_t *p, const char *hostname,
|
||||||
unsigned port, const request_rec *r);
|
unsigned port, const request_rec *r);
|
||||||
API_EXPORT(char *) ap_escape_shell_cmd(pool *p, const char *s);
|
API_EXPORT(char *) ap_escape_shell_cmd(ap_context_t *p, const char *s);
|
||||||
|
|
||||||
API_EXPORT(int) ap_count_dirs(const char *path);
|
API_EXPORT(int) ap_count_dirs(const char *path);
|
||||||
API_EXPORT(char *) ap_make_dirstr_prefix(char *d, const char *s, int n);
|
API_EXPORT(char *) ap_make_dirstr_prefix(char *d, const char *s, int n);
|
||||||
API_EXPORT(char *) ap_make_dirstr_parent(pool *p, const char *s);
|
API_EXPORT(char *) ap_make_dirstr_parent(ap_context_t *p, const char *s);
|
||||||
/* deprecated. The previous two routines are preferred. */
|
/* deprecated. The previous two routines are preferred. */
|
||||||
API_EXPORT(char *) ap_make_dirstr(pool *a, const char *s, int n);
|
API_EXPORT(char *) ap_make_dirstr(ap_context_t *a, const char *s, int n);
|
||||||
API_EXPORT(char *) ap_make_full_path(pool *a, const char *dir, const char *f);
|
API_EXPORT(char *) ap_make_full_path(ap_context_t *a, const char *dir, const char *f);
|
||||||
|
|
||||||
API_EXPORT(int) ap_is_matchexp(const char *str);
|
API_EXPORT(int) ap_is_matchexp(const char *str);
|
||||||
API_EXPORT(int) ap_strcmp_match(const char *str, const char *exp);
|
API_EXPORT(int) ap_strcmp_match(const char *str, const char *exp);
|
||||||
API_EXPORT(int) ap_strcasecmp_match(const char *str, const char *exp);
|
API_EXPORT(int) ap_strcasecmp_match(const char *str, const char *exp);
|
||||||
API_EXPORT(char *) ap_pbase64decode(pool *p, const char *bufcoded);
|
API_EXPORT(char *) ap_pbase64decode(ap_context_t *p, const char *bufcoded);
|
||||||
API_EXPORT(char *) ap_pbase64encode(pool *p, char *string);
|
API_EXPORT(char *) ap_pbase64encode(ap_context_t *p, char *string);
|
||||||
API_EXPORT(char *) ap_uudecode(pool *p, const char *bufcoded);
|
API_EXPORT(char *) ap_uudecode(ap_context_t *p, const char *bufcoded);
|
||||||
API_EXPORT(char *) ap_uuencode(pool *p, char *string);
|
API_EXPORT(char *) ap_uuencode(ap_context_t *p, char *string);
|
||||||
|
|
||||||
#ifdef OS2
|
#ifdef OS2
|
||||||
void os2pathname(char *path);
|
void os2pathname(char *path);
|
||||||
char *ap_double_quotes(pool *p, char *str);
|
char *ap_double_quotes(ap_context_t *p, char *str);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
API_EXPORT(int) ap_regexec(const regex_t *preg, const char *string,
|
API_EXPORT(int) ap_regexec(const regex_t *preg, const char *string,
|
||||||
size_t nmatch, regmatch_t pmatch[], int eflags);
|
size_t nmatch, regmatch_t pmatch[], int eflags);
|
||||||
API_EXPORT(size_t) ap_regerror(int errcode, const regex_t *preg,
|
API_EXPORT(size_t) ap_regerror(int errcode, const regex_t *preg,
|
||||||
char *errbuf, size_t errbuf_size);
|
char *errbuf, size_t errbuf_size);
|
||||||
API_EXPORT(char *) ap_pregsub(pool *p, const char *input, const char *source,
|
API_EXPORT(char *) ap_pregsub(ap_context_t *p, const char *input, const char *source,
|
||||||
size_t nmatch, regmatch_t pmatch[]);
|
size_t nmatch, regmatch_t pmatch[]);
|
||||||
|
|
||||||
API_EXPORT(void) ap_content_type_tolower(char *);
|
API_EXPORT(void) ap_content_type_tolower(char *);
|
||||||
@@ -973,7 +974,7 @@ API_EXPORT(void) ap_str_tolower(char *);
|
|||||||
API_EXPORT(int) ap_ind(const char *, char); /* Sigh... */
|
API_EXPORT(int) ap_ind(const char *, char); /* Sigh... */
|
||||||
API_EXPORT(int) ap_rind(const char *, char);
|
API_EXPORT(int) ap_rind(const char *, char);
|
||||||
|
|
||||||
API_EXPORT(char *) ap_escape_quotes (pool *p, const char *instring);
|
API_EXPORT(char *) ap_escape_quotes (ap_context_t *p, const char *instring);
|
||||||
|
|
||||||
/* Common structure for reading of config files / passwd files etc. */
|
/* Common structure for reading of config files / passwd files etc. */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@@ -986,10 +987,10 @@ typedef struct {
|
|||||||
} configfile_t;
|
} configfile_t;
|
||||||
|
|
||||||
/* Open a configfile_t as FILE, return open configfile_t struct pointer */
|
/* Open a configfile_t as FILE, return open configfile_t struct pointer */
|
||||||
API_EXPORT(configfile_t *) ap_pcfg_openfile(pool *p, const char *name);
|
API_EXPORT(configfile_t *) ap_pcfg_openfile(ap_context_t *p, const char *name);
|
||||||
|
|
||||||
/* Allocate a configfile_t handle with user defined functions and params */
|
/* Allocate a configfile_t handle with user defined functions and params */
|
||||||
API_EXPORT(configfile_t *) ap_pcfg_open_custom(pool *p, const char *descr,
|
API_EXPORT(configfile_t *) ap_pcfg_open_custom(ap_context_t *p, const char *descr,
|
||||||
void *param,
|
void *param,
|
||||||
int(*getc_func)(void*),
|
int(*getc_func)(void*),
|
||||||
void *(*gets_func) (void *buf, size_t bufsiz, void *param),
|
void *(*gets_func) (void *buf, size_t bufsiz, void *param),
|
||||||
@@ -1019,16 +1020,16 @@ API_EXPORT(const server_rec *) ap_get_server_conf(void);
|
|||||||
|
|
||||||
#ifndef HAVE_CANONICAL_FILENAME
|
#ifndef HAVE_CANONICAL_FILENAME
|
||||||
/*
|
/*
|
||||||
* We can't define these in os.h because of dependence on pool pointer.
|
* We can't define these in os.h because of dependence on ap_context_t pointer.
|
||||||
*/
|
*/
|
||||||
#define ap_os_canonical_filename(p,f) (f)
|
#define ap_os_canonical_filename(p,f) (f)
|
||||||
#define ap_os_case_canonical_filename(p,f) (f)
|
#define ap_os_case_canonical_filename(p,f) (f)
|
||||||
#define ap_os_systemcase_filename(p,f) (f)
|
#define ap_os_systemcase_filename(p,f) (f)
|
||||||
#else
|
#else
|
||||||
API_EXPORT(char *) ap_os_canonical_filename(pool *p, const char *file);
|
API_EXPORT(char *) ap_os_canonical_filename(ap_context_t *p, const char *file);
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool, const char *szFile);
|
API_EXPORT(char *) ap_os_case_canonical_filename(ap_context_t *pPool, const char *szFile);
|
||||||
API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, const char *szFile);
|
API_EXPORT(char *) ap_os_systemcase_filename(ap_context_t *pPool, const char *szFile);
|
||||||
#else
|
#else
|
||||||
#define ap_os_case_canonical_filename(p,f) ap_os_canonical_filename(p,f)
|
#define ap_os_case_canonical_filename(p,f) ap_os_canonical_filename(p,f)
|
||||||
#define ap_os_systemcase_filename(p,f) ap_os_canonical_filename(p,f)
|
#define ap_os_systemcase_filename(p,f) ap_os_canonical_filename(p,f)
|
||||||
@@ -1036,11 +1037,11 @@ API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool, const char *szFile);
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _OSD_POSIX
|
#ifdef _OSD_POSIX
|
||||||
extern const char *os_set_account(pool *p, const char *account);
|
extern const char *os_set_account(ap_context_t *p, const char *account);
|
||||||
extern int os_init_job_environment(server_rec *s, const char *user_name, int one_process);
|
extern int os_init_job_environment(server_rec *s, const char *user_name, int one_process);
|
||||||
#endif /* _OSD_POSIX */
|
#endif /* _OSD_POSIX */
|
||||||
|
|
||||||
char *ap_get_local_host(pool *);
|
char *ap_get_local_host(ap_context_t *);
|
||||||
unsigned long ap_get_virthost_addr(char *hostname, unsigned short *port);
|
unsigned long ap_get_virthost_addr(char *hostname, unsigned short *port);
|
||||||
|
|
||||||
extern API_VAR_EXPORT time_t ap_restart_time;
|
extern API_VAR_EXPORT time_t ap_restart_time;
|
||||||
@@ -1077,7 +1078,7 @@ APRFile ap_slack(APRFile fd, int line);
|
|||||||
#define AP_SLACK_HIGH 2
|
#define AP_SLACK_HIGH 2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
API_EXPORT(char *) ap_escape_quotes(pool *p, const char *instr);
|
API_EXPORT(char *) ap_escape_quotes(ap_context_t *p, const char *instr);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Redefine assert() to something more useful for an Apache...
|
* Redefine assert() to something more useful for an Apache...
|
||||||
|
@@ -64,13 +64,13 @@ extern "C" {
|
|||||||
|
|
||||||
#include "ap_md5.h"
|
#include "ap_md5.h"
|
||||||
|
|
||||||
API_EXPORT(char *) ap_md5(pool *a, const unsigned char *string);
|
API_EXPORT(char *) ap_md5(ap_context_t *a, const unsigned char *string);
|
||||||
API_EXPORT(char *) ap_md5_binary(pool *a, const unsigned char *buf, int len);
|
API_EXPORT(char *) ap_md5_binary(ap_context_t *a, const unsigned char *buf, int len);
|
||||||
API_EXPORT(char *) ap_md5contextTo64(pool *p, AP_MD5_CTX * context);
|
API_EXPORT(char *) ap_md5contextTo64(ap_context_t *p, AP_MD5_CTX * context);
|
||||||
#ifdef CHARSET_EBCDIC
|
#ifdef CHARSET_EBCDIC
|
||||||
API_EXPORT(char *) ap_md5digest(pool *p, FILE *infile, int convert);
|
API_EXPORT(char *) ap_md5digest(ap_context_t *p, FILE *infile, int convert);
|
||||||
#else
|
#else
|
||||||
API_EXPORT(char *) ap_md5digest(pool *p, APRFile infile);
|
API_EXPORT(char *) ap_md5digest(ap_context_t *p, APRFile infile);
|
||||||
#endif /* CHARSET_EBCDIC */
|
#endif /* CHARSET_EBCDIC */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@@ -70,7 +70,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
API_EXPORT(char **) ap_create_environment(pool *p, table *t);
|
API_EXPORT(char **) ap_create_environment(ap_context_t *p, ap_table_t *t);
|
||||||
API_EXPORT(int) ap_find_path_info(const char *uri, const char *path_info);
|
API_EXPORT(int) ap_find_path_info(const char *uri, const char *path_info);
|
||||||
API_EXPORT(void) ap_add_cgi_vars(request_rec *r);
|
API_EXPORT(void) ap_add_cgi_vars(request_rec *r);
|
||||||
API_EXPORT(void) ap_add_common_vars(request_rec *r);
|
API_EXPORT(void) ap_add_common_vars(request_rec *r);
|
||||||
@@ -81,7 +81,7 @@ API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
|
|||||||
int (*getsfunc) (char *, int, void *),
|
int (*getsfunc) (char *, int, void *),
|
||||||
void *getsfunc_data);
|
void *getsfunc_data);
|
||||||
API_EXPORT(void) ap_send_size(size_t size, request_rec *r);
|
API_EXPORT(void) ap_send_size(size_t size, request_rec *r);
|
||||||
API_EXPORT(int) ap_call_exec(request_rec *r, child_info *pinfo, char *argv0, char **env,
|
API_EXPORT(int) ap_call_exec(request_rec *r, ap_child_info_t *pinfo, char *argv0, char **env,
|
||||||
int shellcmd);
|
int shellcmd);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@@ -112,12 +112,12 @@ typedef struct {
|
|||||||
/* util_uri.c */
|
/* util_uri.c */
|
||||||
API_EXPORT(unsigned short) ap_default_port_for_scheme(const char *scheme_str);
|
API_EXPORT(unsigned short) ap_default_port_for_scheme(const char *scheme_str);
|
||||||
API_EXPORT(unsigned short) ap_default_port_for_request(const request_rec *r);
|
API_EXPORT(unsigned short) ap_default_port_for_request(const request_rec *r);
|
||||||
API_EXPORT(struct hostent *) ap_pduphostent(pool *p, const struct hostent *hp);
|
API_EXPORT(struct hostent *) ap_pduphostent(ap_context_t *p, const struct hostent *hp);
|
||||||
API_EXPORT(struct hostent *) ap_pgethostbyname(pool *p, const char *hostname);
|
API_EXPORT(struct hostent *) ap_pgethostbyname(ap_context_t *p, const char *hostname);
|
||||||
API_EXPORT(char *) ap_unparse_uri_components(pool *p, const uri_components *uptr,
|
API_EXPORT(char *) ap_unparse_uri_components(ap_context_t *p, const uri_components *uptr,
|
||||||
unsigned flags);
|
unsigned flags);
|
||||||
API_EXPORT(int) ap_parse_uri_components(pool *p, const char *uri, uri_components *uptr);
|
API_EXPORT(int) ap_parse_uri_components(ap_context_t *p, const char *uri, uri_components *uptr);
|
||||||
API_EXPORT(int) ap_parse_hostinfo_components(pool *p, const char *hostinfo, uri_components *uptr);
|
API_EXPORT(int) ap_parse_hostinfo_components(ap_context_t *p, const char *hostinfo, uri_components *uptr);
|
||||||
/* called by the core in main() */
|
/* called by the core in main() */
|
||||||
extern void ap_util_uri_init(void);
|
extern void ap_util_uri_init(void);
|
||||||
|
|
||||||
|
@@ -95,13 +95,13 @@ typedef struct {
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int order[METHODS];
|
int order[METHODS];
|
||||||
array_header *allows;
|
ap_array_header_t *allows;
|
||||||
array_header *denys;
|
ap_array_header_t *denys;
|
||||||
} access_dir_conf;
|
} access_dir_conf;
|
||||||
|
|
||||||
module MODULE_VAR_EXPORT access_module;
|
module MODULE_VAR_EXPORT access_module;
|
||||||
|
|
||||||
static void *create_access_dir_config(pool *p, char *dummy)
|
static void *create_access_dir_config(ap_context_t *p, char *dummy)
|
||||||
{
|
{
|
||||||
access_dir_conf *conf =
|
access_dir_conf *conf =
|
||||||
(access_dir_conf *) ap_pcalloc(p, sizeof(access_dir_conf));
|
(access_dir_conf *) ap_pcalloc(p, sizeof(access_dir_conf));
|
||||||
@@ -291,7 +291,7 @@ static int in_domain(const char *domain, const char *what)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int find_allowdeny(request_rec *r, array_header *a, int method)
|
static int find_allowdeny(request_rec *r, ap_array_header_t *a, int method)
|
||||||
{
|
{
|
||||||
allowdeny *ap = (allowdeny *) a->elts;
|
allowdeny *ap = (allowdeny *) a->elts;
|
||||||
int mmask = (1 << method);
|
int mmask = (1 << method);
|
||||||
|
@@ -63,7 +63,7 @@
|
|||||||
* Adapted to Apache by rst.
|
* Adapted to Apache by rst.
|
||||||
*
|
*
|
||||||
* dirkx - Added Authoritative control to allow passing on to lower
|
* dirkx - Added Authoritative control to allow passing on to lower
|
||||||
* modules if and only if the user-id is not known to this
|
* modules if and only if the user ap_context_t d is not known to this
|
||||||
* module. A known user with a faulty or absent password still
|
* module. A known user with a faulty or absent password still
|
||||||
* causes an AuthRequired. The default is 'Authoritative', i.e.
|
* causes an AuthRequired. The default is 'Authoritative', i.e.
|
||||||
* no control is passed along.
|
* no control is passed along.
|
||||||
@@ -82,7 +82,7 @@ typedef struct auth_config_struct {
|
|||||||
int auth_authoritative;
|
int auth_authoritative;
|
||||||
} auth_config_rec;
|
} auth_config_rec;
|
||||||
|
|
||||||
static void *create_auth_dir_config(pool *p, char *d)
|
static void *create_auth_dir_config(ap_context_t *p, char *d)
|
||||||
{
|
{
|
||||||
auth_config_rec *sec =
|
auth_config_rec *sec =
|
||||||
(auth_config_rec *) ap_pcalloc(p, sizeof(auth_config_rec));
|
(auth_config_rec *) ap_pcalloc(p, sizeof(auth_config_rec));
|
||||||
@@ -143,11 +143,11 @@ static char *get_pw(request_rec *r, char *user, char *auth_pwfile)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static table *groups_for_user(pool *p, char *user, char *grpfile)
|
static ap_table_t *groups_for_user(ap_context_t *p, char *user, char *grpfile)
|
||||||
{
|
{
|
||||||
configfile_t *f;
|
configfile_t *f;
|
||||||
table *grps = ap_make_table(p, 15);
|
ap_table_t *grps = ap_make_table(p, 15);
|
||||||
pool *sp;
|
ap_context_t *sp;
|
||||||
char l[MAX_STRING_LEN];
|
char l[MAX_STRING_LEN];
|
||||||
const char *group_name, *ll, *w;
|
const char *group_name, *ll, *w;
|
||||||
|
|
||||||
@@ -157,7 +157,7 @@ static table *groups_for_user(pool *p, char *user, char *grpfile)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
sp = ap_make_sub_pool(p);
|
ap_create_context(p, NULL, &sp);
|
||||||
|
|
||||||
while (!(ap_cfg_getline(l, MAX_STRING_LEN, f))) {
|
while (!(ap_cfg_getline(l, MAX_STRING_LEN, f))) {
|
||||||
if ((l[0] == '#') || (!l[0]))
|
if ((l[0] == '#') || (!l[0]))
|
||||||
@@ -239,8 +239,8 @@ static int check_user_access(request_rec *r)
|
|||||||
int method_restricted = 0;
|
int method_restricted = 0;
|
||||||
register int x;
|
register int x;
|
||||||
const char *t, *w;
|
const char *t, *w;
|
||||||
table *grpstatus;
|
ap_table_t *grpstatus;
|
||||||
const array_header *reqs_arr = ap_requires(r);
|
const ap_array_header_t *reqs_arr = ap_requires(r);
|
||||||
require_line *reqs;
|
require_line *reqs;
|
||||||
|
|
||||||
/* BUG FIX: tadc, 11-Nov-1995. If there is no "requires" directive,
|
/* BUG FIX: tadc, 11-Nov-1995. If there is no "requires" directive,
|
||||||
@@ -322,7 +322,7 @@ module MODULE_VAR_EXPORT auth_module =
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
auth_cmds, /* command table */
|
auth_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -72,7 +72,7 @@
|
|||||||
*
|
*
|
||||||
* Just add the following tokes to your <directory> setup:
|
* Just add the following tokes to your <directory> setup:
|
||||||
*
|
*
|
||||||
* Anonymous magic-user-id [magic-user-id]...
|
* Anonymous magic-user ap_context_t d [magic-user ap_context_t d]...
|
||||||
*
|
*
|
||||||
* Anonymous_MustGiveEmail [ on | off ] default = off
|
* Anonymous_MustGiveEmail [ on | off ] default = off
|
||||||
* Anonymous_LogEmail [ on | off ] default = on
|
* Anonymous_LogEmail [ on | off ] default = on
|
||||||
@@ -116,7 +116,7 @@ typedef struct {
|
|||||||
|
|
||||||
} anon_auth_config_rec;
|
} anon_auth_config_rec;
|
||||||
|
|
||||||
static void *create_anon_auth_dir_config(pool *p, char *d)
|
static void *create_anon_auth_dir_config(ap_context_t *p, char *d)
|
||||||
{
|
{
|
||||||
anon_auth_config_rec *sec = (anon_auth_config_rec *)
|
anon_auth_config_rec *sec = (anon_auth_config_rec *)
|
||||||
ap_pcalloc(p, sizeof(anon_auth_config_rec));
|
ap_pcalloc(p, sizeof(anon_auth_config_rec));
|
||||||
@@ -301,7 +301,7 @@ module MODULE_VAR_EXPORT anon_auth_module =
|
|||||||
NULL, /* dir merger ensure strictness */
|
NULL, /* dir merger ensure strictness */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
anon_auth_cmds, /* command table */
|
anon_auth_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -84,7 +84,7 @@
|
|||||||
* can also be used when compatibility mode is enabled.
|
* can also be used when compatibility mode is enabled.
|
||||||
*
|
*
|
||||||
* dirkx - Added Authoritative control to allow passing on to lower
|
* dirkx - Added Authoritative control to allow passing on to lower
|
||||||
* modules if and only if the user-id is not known to this
|
* modules if and only if the user ap_context_t d is not known to this
|
||||||
* module. A known user with a faulty or absent password still
|
* module. A known user with a faulty or absent password still
|
||||||
* causes an AuthRequired. The default is 'Authoritative', i.e.
|
* causes an AuthRequired. The default is 'Authoritative', i.e.
|
||||||
* no control is passed along.
|
* no control is passed along.
|
||||||
@@ -108,7 +108,7 @@ typedef struct {
|
|||||||
int auth_dbauthoritative;
|
int auth_dbauthoritative;
|
||||||
} db_auth_config_rec;
|
} db_auth_config_rec;
|
||||||
|
|
||||||
static void *create_db_auth_dir_config(pool *p, char *d)
|
static void *create_db_auth_dir_config(ap_context_t *p, char *d)
|
||||||
{
|
{
|
||||||
db_auth_config_rec *sec
|
db_auth_config_rec *sec
|
||||||
= (db_auth_config_rec *) ap_pcalloc(p, sizeof(db_auth_config_rec));
|
= (db_auth_config_rec *) ap_pcalloc(p, sizeof(db_auth_config_rec));
|
||||||
@@ -268,7 +268,7 @@ static int db_check_auth(request_rec *r)
|
|||||||
char *user = r->user;
|
char *user = r->user;
|
||||||
int m = r->method_number;
|
int m = r->method_number;
|
||||||
|
|
||||||
const array_header *reqs_arr = ap_requires(r);
|
const ap_array_header_t *reqs_arr = ap_requires(r);
|
||||||
require_line *reqs = reqs_arr ? (require_line *) reqs_arr->elts : NULL;
|
require_line *reqs = reqs_arr ? (require_line *) reqs_arr->elts : NULL;
|
||||||
|
|
||||||
register int x;
|
register int x;
|
||||||
@@ -330,7 +330,7 @@ module db_auth_module =
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
db_auth_cmds, /* command table */
|
db_auth_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
NULL, /* filename translation */
|
NULL, /* filename translation */
|
||||||
db_authenticate_basic_user, /* check_user_id */
|
db_authenticate_basic_user, /* check_user_id */
|
||||||
|
@@ -63,7 +63,7 @@
|
|||||||
* Adapted to Apache by rst.
|
* Adapted to Apache by rst.
|
||||||
*
|
*
|
||||||
* dirkx - Added Authoritative control to allow passing on to lower
|
* dirkx - Added Authoritative control to allow passing on to lower
|
||||||
* modules if and only if the user-id is not known to this
|
* modules if and only if the user ap_context_t d is not known to this
|
||||||
* module. A known user with a faulty or absent password still
|
* module. A known user with a faulty or absent password still
|
||||||
* causes an AuthRequired. The default is 'Authoritative', i.e.
|
* causes an AuthRequired. The default is 'Authoritative', i.e.
|
||||||
* no control is passed along.
|
* no control is passed along.
|
||||||
@@ -102,7 +102,7 @@ typedef struct {
|
|||||||
|
|
||||||
} dbm_auth_config_rec;
|
} dbm_auth_config_rec;
|
||||||
|
|
||||||
static void *create_dbm_auth_dir_config(pool *p, char *d)
|
static void *create_dbm_auth_dir_config(ap_context_t *p, char *d)
|
||||||
{
|
{
|
||||||
dbm_auth_config_rec *sec
|
dbm_auth_config_rec *sec
|
||||||
= (dbm_auth_config_rec *) ap_pcalloc(p, sizeof(dbm_auth_config_rec));
|
= (dbm_auth_config_rec *) ap_pcalloc(p, sizeof(dbm_auth_config_rec));
|
||||||
@@ -255,7 +255,7 @@ static int dbm_check_auth(request_rec *r)
|
|||||||
char *user = r->user;
|
char *user = r->user;
|
||||||
int m = r->method_number;
|
int m = r->method_number;
|
||||||
|
|
||||||
const array_header *reqs_arr = ap_requires(r);
|
const ap_array_header_t *reqs_arr = ap_requires(r);
|
||||||
require_line *reqs = reqs_arr ? (require_line *) reqs_arr->elts : NULL;
|
require_line *reqs = reqs_arr ? (require_line *) reqs_arr->elts : NULL;
|
||||||
|
|
||||||
register int x;
|
register int x;
|
||||||
@@ -318,7 +318,7 @@ module dbm_auth_module =
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
dbm_auth_cmds, /* command table */
|
dbm_auth_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
NULL, /* filename translation */
|
NULL, /* filename translation */
|
||||||
dbm_authenticate_basic_user, /* check_user_id */
|
dbm_authenticate_basic_user, /* check_user_id */
|
||||||
|
@@ -68,7 +68,7 @@
|
|||||||
* function as well).
|
* function as well).
|
||||||
*
|
*
|
||||||
* To load, simply place the ISA in a location in the document tree.
|
* To load, simply place the ISA in a location in the document tree.
|
||||||
* Then add an "AddHandler isapi-isa dll" into your config file.
|
* Then add an "AddHandler isapi ap_context_t sa dll" into your config file.
|
||||||
* You should now be able to load ISAPI DLLs just be reffering to their
|
* You should now be able to load ISAPI DLLs just be reffering to their
|
||||||
* URLs. Make sure the ExecCGI option is active in the directory
|
* URLs. Make sure the ExecCGI option is active in the directory
|
||||||
* the ISA is in.
|
* the ISA is in.
|
||||||
@@ -129,7 +129,7 @@ int isapi_handler (request_rec *r) {
|
|||||||
BOOL (*isapi_term)(DWORD); /* optional entry point 3 */
|
BOOL (*isapi_term)(DWORD); /* optional entry point 3 */
|
||||||
|
|
||||||
isapi_cid *cid = ap_pcalloc(r->pool, sizeof(isapi_cid));
|
isapi_cid *cid = ap_pcalloc(r->pool, sizeof(isapi_cid));
|
||||||
table *e = r->subprocess_env;
|
ap_table_t *e = r->subprocess_env;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
/* Use similar restrictions as CGIs */
|
/* Use similar restrictions as CGIs */
|
||||||
@@ -296,7 +296,7 @@ int isapi_handler (request_rec *r) {
|
|||||||
BOOL WINAPI GetServerVariable (HCONN hConn, LPSTR lpszVariableName,
|
BOOL WINAPI GetServerVariable (HCONN hConn, LPSTR lpszVariableName,
|
||||||
LPVOID lpvBuffer, LPDWORD lpdwSizeofBuffer) {
|
LPVOID lpvBuffer, LPDWORD lpdwSizeofBuffer) {
|
||||||
request_rec *r = ((isapi_cid *)hConn)->r;
|
request_rec *r = ((isapi_cid *)hConn)->r;
|
||||||
table *e = r->subprocess_env;
|
ap_table_t *e = r->subprocess_env;
|
||||||
const char *result;
|
const char *result;
|
||||||
|
|
||||||
/* Mostly, we just grab it from the environment, but there are
|
/* Mostly, we just grab it from the environment, but there are
|
||||||
@@ -546,7 +546,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
|
|||||||
}
|
}
|
||||||
|
|
||||||
handler_rec isapi_handlers[] = {
|
handler_rec isapi_handlers[] = {
|
||||||
{ "isapi-isa", isapi_handler },
|
{ "isapi ap_context_t sa", isapi_handler },
|
||||||
{ NULL}
|
{ NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -557,7 +557,7 @@ module isapi_module = {
|
|||||||
NULL, /* merge per-dir config */
|
NULL, /* merge per-dir config */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
NULL, /* command table */
|
NULL, /* command ap_table_t */
|
||||||
isapi_handlers, /* handlers */
|
isapi_handlers, /* handlers */
|
||||||
NULL, /* filename translation */
|
NULL, /* filename translation */
|
||||||
NULL, /* check_user_id */
|
NULL, /* check_user_id */
|
||||||
|
@@ -9,7 +9,7 @@ typedef struct
|
|||||||
int bEnabled;
|
int bEnabled;
|
||||||
} EchoConfig;
|
} EchoConfig;
|
||||||
|
|
||||||
static void *create_echo_server_config(pool *p,server_rec *s)
|
static void *create_echo_server_config(ap_context_t *p,server_rec *s)
|
||||||
{
|
{
|
||||||
EchoConfig *pConfig=ap_pcalloc(p,sizeof *pConfig);
|
EchoConfig *pConfig=ap_pcalloc(p,sizeof *pConfig);
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ API_VAR_EXPORT module echo_module = {
|
|||||||
NULL, /* merge per-directory config structures */
|
NULL, /* merge per-directory config structures */
|
||||||
create_echo_server_config, /* create per-server config structure */
|
create_echo_server_config, /* create per-server config structure */
|
||||||
NULL, /* merge per-server config structures */
|
NULL, /* merge per-server config structures */
|
||||||
echo_cmds, /* command table */
|
echo_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -117,7 +117,7 @@ typedef struct excfg {
|
|||||||
* the same routine/environment.
|
* the same routine/environment.
|
||||||
*/
|
*/
|
||||||
static const char *trace = NULL;
|
static const char *trace = NULL;
|
||||||
static table *static_calls_made = NULL;
|
static ap_table_t *static_calls_made = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* To avoid leaking memory from pools other than the per-request one, we
|
* To avoid leaking memory from pools other than the per-request one, we
|
||||||
@@ -125,8 +125,8 @@ static table *static_calls_made = NULL;
|
|||||||
* freed each time we modify the trace. That way previous layers of trace
|
* freed each time we modify the trace. That way previous layers of trace
|
||||||
* data don't get lost.
|
* data don't get lost.
|
||||||
*/
|
*/
|
||||||
static pool *example_pool = NULL;
|
static ap_context_t *example_pool = NULL;
|
||||||
static pool *example_subpool = NULL;
|
static ap_context_t *example_subpool = NULL;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Declare ourselves so the configuration routines can find and know us.
|
* Declare ourselves so the configuration routines can find and know us.
|
||||||
@@ -297,7 +297,7 @@ static void setup_module_cells()
|
|||||||
example_pool = ap_make_sub_pool(NULL);
|
example_pool = ap_make_sub_pool(NULL);
|
||||||
};
|
};
|
||||||
/*
|
/*
|
||||||
* Likewise for the table of routine/environment pairs we visit outside of
|
* Likewise for the ap_table_t of routine/environment pairs we visit outside of
|
||||||
* request context.
|
* request context.
|
||||||
*/
|
*/
|
||||||
if (static_calls_made == NULL) {
|
if (static_calls_made == NULL) {
|
||||||
@@ -314,11 +314,11 @@ static void setup_module_cells()
|
|||||||
* The list can be displayed by the example_handler() routine.
|
* The list can be displayed by the example_handler() routine.
|
||||||
*
|
*
|
||||||
* If the call occurs within a request context (i.e., we're passed a request
|
* If the call occurs within a request context (i.e., we're passed a request
|
||||||
* record), we put the trace into the request pool and attach it to the
|
* record), we put the trace into the request ap_context_t and attach it to the
|
||||||
* request via the notes mechanism. Otherwise, the trace gets added
|
* request via the notes mechanism. Otherwise, the trace gets added
|
||||||
* to the static (non-request-specific) list.
|
* to the static (non-request-specific) list.
|
||||||
*
|
*
|
||||||
* Note that the r->notes table is only for storing strings; if you need to
|
* Note that the r->notes ap_table_t is only for storing strings; if you need to
|
||||||
* maintain per-request data of any other type, you need to use another
|
* maintain per-request data of any other type, you need to use another
|
||||||
* mechanism.
|
* mechanism.
|
||||||
*/
|
*/
|
||||||
@@ -332,7 +332,7 @@ static void trace_add(server_rec *s, request_rec *r, excfg *mconfig,
|
|||||||
const char *sofar;
|
const char *sofar;
|
||||||
char *addon;
|
char *addon;
|
||||||
char *where;
|
char *where;
|
||||||
pool *p;
|
ap_context_t *p;
|
||||||
const char *trace_copy;
|
const char *trace_copy;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -384,7 +384,7 @@ static void trace_add(server_rec *s, request_rec *r, excfg *mconfig,
|
|||||||
where = (where != NULL) ? where : "";
|
where = (where != NULL) ? where : "";
|
||||||
/*
|
/*
|
||||||
* Now, if we're not in request context, see if we've been called with
|
* Now, if we're not in request context, see if we've been called with
|
||||||
* this particular combination before. The table is allocated in the
|
* this particular combination before. The ap_table_t is allocated in the
|
||||||
* module's private pool, which doesn't get destroyed.
|
* module's private pool, which doesn't get destroyed.
|
||||||
*/
|
*/
|
||||||
if (r == NULL) {
|
if (r == NULL) {
|
||||||
@@ -624,9 +624,9 @@ static int example_handler(request_rec *r)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* All our module-initialiser does is add its trace to the log.
|
* All our module ap_context_t nitialiser does is add its trace to the log.
|
||||||
*/
|
*/
|
||||||
static void example_init(server_rec *s, pool *p)
|
static void example_init(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
|
|
||||||
char *note;
|
char *note;
|
||||||
@@ -648,16 +648,16 @@ static void example_init(server_rec *s, pool *p)
|
|||||||
/*
|
/*
|
||||||
* This function is called during server initialisation when an heavy-weight
|
* This function is called during server initialisation when an heavy-weight
|
||||||
* process (such as a child) is being initialised. As with the
|
* process (such as a child) is being initialised. As with the
|
||||||
* module-initialisation function, any information that needs to be recorded
|
* module ap_context_t nitialisation function, any information that needs to be recorded
|
||||||
* must be in static cells, since there's no configuration record.
|
* must be in static cells, since there's no configuration record.
|
||||||
*
|
*
|
||||||
* There is no return value.
|
* There is no return value.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* All our process-initialiser does is add its trace to the log.
|
* All our process ap_context_t nitialiser does is add its trace to the log.
|
||||||
*/
|
*/
|
||||||
static void example_child_init(server_rec *s, pool *p)
|
static void example_child_init(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
|
|
||||||
char *note;
|
char *note;
|
||||||
@@ -678,7 +678,7 @@ static void example_child_init(server_rec *s, pool *p)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This function is called when an heavy-weight process (such as a child) is
|
* This function is called when an heavy-weight process (such as a child) is
|
||||||
* being run down or destroyed. As with the child-initialisation function,
|
* being run down or destroyed. As with the child ap_context_t nitialisation function,
|
||||||
* any information that needs to be recorded must be in static cells, since
|
* any information that needs to be recorded must be in static cells, since
|
||||||
* there's no configuration record.
|
* there's no configuration record.
|
||||||
*
|
*
|
||||||
@@ -688,7 +688,7 @@ static void example_child_init(server_rec *s, pool *p)
|
|||||||
/*
|
/*
|
||||||
* All our process-death routine does is add its trace to the log.
|
* All our process-death routine does is add its trace to the log.
|
||||||
*/
|
*/
|
||||||
static void example_child_exit(server_rec *s, pool *p)
|
static void example_child_exit(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
|
|
||||||
char *note;
|
char *note;
|
||||||
@@ -715,14 +715,14 @@ static void example_child_exit(server_rec *s, pool *p)
|
|||||||
* The return value is a pointer to the created module-specific
|
* The return value is a pointer to the created module-specific
|
||||||
* structure.
|
* structure.
|
||||||
*/
|
*/
|
||||||
static void *example_create_dir_config(pool *p, char *dirspec)
|
static void *example_create_dir_config(ap_context_t *p, char *dirspec)
|
||||||
{
|
{
|
||||||
|
|
||||||
excfg *cfg;
|
excfg *cfg;
|
||||||
char *dname = dirspec;
|
char *dname = dirspec;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate the space for our record from the pool supplied.
|
* Allocate the space for our record from the ap_context_t supplied.
|
||||||
*/
|
*/
|
||||||
cfg = (excfg *) ap_pcalloc(p, sizeof(excfg));
|
cfg = (excfg *) ap_pcalloc(p, sizeof(excfg));
|
||||||
/*
|
/*
|
||||||
@@ -756,7 +756,7 @@ static void *example_create_dir_config(pool *p, char *dirspec)
|
|||||||
* The return value is a pointer to the created module-specific structure
|
* The return value is a pointer to the created module-specific structure
|
||||||
* containing the merged values.
|
* containing the merged values.
|
||||||
*/
|
*/
|
||||||
static void *example_merge_dir_config(pool *p, void *parent_conf,
|
static void *example_merge_dir_config(ap_context_t *p, void *parent_conf,
|
||||||
void *newloc_conf)
|
void *newloc_conf)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -801,7 +801,7 @@ static void *example_merge_dir_config(pool *p, void *parent_conf,
|
|||||||
* The return value is a pointer to the created module-specific
|
* The return value is a pointer to the created module-specific
|
||||||
* structure.
|
* structure.
|
||||||
*/
|
*/
|
||||||
static void *example_create_server_config(pool *p, server_rec *s)
|
static void *example_create_server_config(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
|
|
||||||
excfg *cfg;
|
excfg *cfg;
|
||||||
@@ -837,7 +837,7 @@ static void *example_create_server_config(pool *p, server_rec *s)
|
|||||||
* The return value is a pointer to the created module-specific structure
|
* The return value is a pointer to the created module-specific structure
|
||||||
* containing the merged values.
|
* containing the merged values.
|
||||||
*/
|
*/
|
||||||
static void *example_merge_server_config(pool *p, void *server1_conf,
|
static void *example_merge_server_config(ap_context_t *p, void *server1_conf,
|
||||||
void *server2_conf)
|
void *server2_conf)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -1122,7 +1122,7 @@ module example_module =
|
|||||||
example_merge_dir_config, /* dir config merger */
|
example_merge_dir_config, /* dir config merger */
|
||||||
example_create_server_config, /* server config creator */
|
example_create_server_config, /* server config creator */
|
||||||
example_merge_server_config, /* server config merger */
|
example_merge_server_config, /* server config merger */
|
||||||
example_cmds, /* command table */
|
example_cmds, /* command ap_table_t */
|
||||||
example_handlers, /* [7] list of handlers */
|
example_handlers, /* [7] list of handlers */
|
||||||
example_translate_handler, /* [2] filename-to-URI translation */
|
example_translate_handler, /* [2] filename-to-URI translation */
|
||||||
example_check_user_id, /* [5] check/validate user_id */
|
example_check_user_id, /* [5] check/validate user_id */
|
||||||
|
@@ -122,7 +122,7 @@ static void add_include_vars(request_rec *r, char *timefmt)
|
|||||||
#ifndef WIN32
|
#ifndef WIN32
|
||||||
struct passwd *pw;
|
struct passwd *pw;
|
||||||
#endif /* ndef WIN32 */
|
#endif /* ndef WIN32 */
|
||||||
table *e = r->subprocess_env;
|
ap_table_t *e = r->subprocess_env;
|
||||||
char *t;
|
char *t;
|
||||||
time_t date = r->request_time;
|
time_t date = r->request_time;
|
||||||
|
|
||||||
@@ -357,7 +357,7 @@ otilde\365oslash\370ugrave\371uacute\372yacute\375" /* 6 */
|
|||||||
* the tag value is html decoded if dodecode is non-zero
|
* the tag value is html decoded if dodecode is non-zero
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static char *get_tag(pool *p, FILE *in, char *tag, int tagbuf_len, int dodecode)
|
static char *get_tag(ap_context_t *p, FILE *in, char *tag, int tagbuf_len, int dodecode)
|
||||||
{
|
{
|
||||||
char *t = tag, *tag_val, c, term;
|
char *t = tag, *tag_val, c, term;
|
||||||
|
|
||||||
@@ -443,7 +443,7 @@ static char *get_tag(pool *p, FILE *in, char *tag, int tagbuf_len, int dodecode)
|
|||||||
return ap_pstrdup(p, tag_val);
|
return ap_pstrdup(p, tag_val);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int get_directive(FILE *in, char *dest, size_t len, pool *p)
|
static int get_directive(FILE *in, char *dest, size_t len, ap_context_t *p)
|
||||||
{
|
{
|
||||||
char *d = dest;
|
char *d = dest;
|
||||||
char c;
|
char c;
|
||||||
@@ -775,7 +775,7 @@ static int include_cmd_child(void *arg, child_info *pinfo)
|
|||||||
{
|
{
|
||||||
request_rec *r = ((include_cmd_arg *) arg)->r;
|
request_rec *r = ((include_cmd_arg *) arg)->r;
|
||||||
char *s = ((include_cmd_arg *) arg)->s;
|
char *s = ((include_cmd_arg *) arg)->s;
|
||||||
table *env = r->subprocess_env;
|
ap_table_t *env = r->subprocess_env;
|
||||||
int child_pid = 0;
|
int child_pid = 0;
|
||||||
#ifdef DEBUG_INCLUDE_CMD
|
#ifdef DEBUG_INCLUDE_CMD
|
||||||
#ifdef OS2
|
#ifdef OS2
|
||||||
@@ -995,7 +995,7 @@ static int handle_config(FILE *in, request_rec *r, char *error, char *tf,
|
|||||||
char tag[MAX_STRING_LEN];
|
char tag[MAX_STRING_LEN];
|
||||||
char *tag_val;
|
char *tag_val;
|
||||||
char parsed_string[MAX_STRING_LEN];
|
char parsed_string[MAX_STRING_LEN];
|
||||||
table *env = r->subprocess_env;
|
ap_table_t *env = r->subprocess_env;
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
if (!(tag_val = get_tag(r->pool, in, tag, sizeof(tag), 0))) {
|
if (!(tag_val = get_tag(r->pool, in, tag, sizeof(tag), 0))) {
|
||||||
@@ -1367,7 +1367,7 @@ static int parse_expr(request_rec *r, const char *expr, const char *error)
|
|||||||
} *root, *current, *new;
|
} *root, *current, *new;
|
||||||
const char *parse;
|
const char *parse;
|
||||||
char buffer[MAX_STRING_LEN];
|
char buffer[MAX_STRING_LEN];
|
||||||
pool *expr_pool;
|
ap_context_t *expr_pool;
|
||||||
int retval = 0;
|
int retval = 0;
|
||||||
|
|
||||||
if ((parse = expr) == (char *) NULL) {
|
if ((parse = expr) == (char *) NULL) {
|
||||||
@@ -2107,7 +2107,7 @@ static int handle_printenv(FILE *in, request_rec *r, const char *error)
|
|||||||
{
|
{
|
||||||
char tag[MAX_STRING_LEN];
|
char tag[MAX_STRING_LEN];
|
||||||
char *tag_val;
|
char *tag_val;
|
||||||
array_header *arr = ap_table_elts(r->subprocess_env);
|
ap_array_header_t *arr = ap_table_elts(r->subprocess_env);
|
||||||
table_entry *elts = (table_entry *) arr->elts;
|
table_entry *elts = (table_entry *) arr->elts;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -2290,7 +2290,7 @@ enum xbithack {
|
|||||||
#define DEFAULT_XBITHACK xbithack_off
|
#define DEFAULT_XBITHACK xbithack_off
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void *create_includes_dir_config(pool *p, char *dummy)
|
static void *create_includes_dir_config(ap_context_t *p, char *dummy)
|
||||||
{
|
{
|
||||||
enum xbithack *result = (enum xbithack *) ap_palloc(p, sizeof(enum xbithack));
|
enum xbithack *result = (enum xbithack *) ap_palloc(p, sizeof(enum xbithack));
|
||||||
*result = DEFAULT_XBITHACK;
|
*result = DEFAULT_XBITHACK;
|
||||||
@@ -2462,7 +2462,7 @@ module MODULE_VAR_EXPORT includes_module =
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
includes_cmds, /* command table */
|
includes_cmds, /* command ap_table_t */
|
||||||
includes_handlers, /* handlers */
|
includes_handlers, /* handlers */
|
||||||
NULL, /* check auth */
|
NULL, /* check auth */
|
||||||
NULL, /* check access */
|
NULL, /* check access */
|
||||||
|
@@ -119,7 +119,7 @@ static int asis_handler(request_rec *r)
|
|||||||
static const handler_rec asis_handlers[] =
|
static const handler_rec asis_handlers[] =
|
||||||
{
|
{
|
||||||
{ASIS_MAGIC_TYPE, asis_handler},
|
{ASIS_MAGIC_TYPE, asis_handler},
|
||||||
{"send-as-is", asis_handler},
|
{"send-as ap_context_t s", asis_handler},
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ module MODULE_VAR_EXPORT asis_module =
|
|||||||
NULL, /* merge per-directory config structures */
|
NULL, /* merge per-directory config structures */
|
||||||
NULL, /* create per-server config structure */
|
NULL, /* create per-server config structure */
|
||||||
NULL, /* merge per-server config structures */
|
NULL, /* merge per-server config structures */
|
||||||
NULL, /* command table */
|
NULL, /* command ap_table_t */
|
||||||
asis_handlers, /* handlers */
|
asis_handlers, /* handlers */
|
||||||
NULL /* register hooks */
|
NULL /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -151,12 +151,12 @@ typedef struct autoindex_config_struct {
|
|||||||
int icon_height;
|
int icon_height;
|
||||||
char *default_order;
|
char *default_order;
|
||||||
|
|
||||||
array_header *icon_list;
|
ap_array_header_t *icon_list;
|
||||||
array_header *alt_list;
|
ap_array_header_t *alt_list;
|
||||||
array_header *desc_list;
|
ap_array_header_t *desc_list;
|
||||||
array_header *ign_list;
|
ap_array_header_t *ign_list;
|
||||||
array_header *hdr_list;
|
ap_array_header_t *hdr_list;
|
||||||
array_header *rdme_list;
|
ap_array_header_t *rdme_list;
|
||||||
|
|
||||||
} autoindex_config_rec;
|
} autoindex_config_rec;
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ static void emit_preamble(request_rec *r, char *title)
|
|||||||
"</TITLE>\n </HEAD>\n <BODY>\n", NULL);
|
"</TITLE>\n </HEAD>\n <BODY>\n", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void push_item(array_header *arr, char *type, char *to, char *path,
|
static void push_item(ap_array_header_t *arr, char *type, char *to, char *path,
|
||||||
char *data)
|
char *data)
|
||||||
{
|
{
|
||||||
struct item *p = (struct item *) ap_push_array(arr);
|
struct item *p = (struct item *) ap_push_array(arr);
|
||||||
@@ -210,14 +210,14 @@ static void push_item(array_header *arr, char *type, char *to, char *path,
|
|||||||
}
|
}
|
||||||
|
|
||||||
p->type = type;
|
p->type = type;
|
||||||
p->data = data ? ap_pstrdup(arr->pool, data) : NULL;
|
p->data = data ? ap_pstrdup(arr->cont, data) : NULL;
|
||||||
p->apply_path = ap_pstrcat(arr->pool, path, "*", NULL);
|
p->apply_path = ap_pstrcat(arr->cont, path, "*", NULL);
|
||||||
|
|
||||||
if ((type == BY_PATH) && (!ap_is_matchexp(to))) {
|
if ((type == BY_PATH) && (!ap_is_matchexp(to))) {
|
||||||
p->apply_to = ap_pstrcat(arr->pool, "*", to, NULL);
|
p->apply_to = ap_pstrcat(arr->cont, "*", to, NULL);
|
||||||
}
|
}
|
||||||
else if (to) {
|
else if (to) {
|
||||||
p->apply_to = ap_pstrdup(arr->pool, to);
|
p->apply_to = ap_pstrdup(arr->cont, to);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
p->apply_to = NULL;
|
p->apply_to = NULL;
|
||||||
@@ -304,13 +304,13 @@ static const char *add_desc(cmd_parms *cmd, void *d, char *desc, char *to)
|
|||||||
|| ap_is_fnmatch(to));
|
|| ap_is_fnmatch(to));
|
||||||
if (desc_entry->wildcards) {
|
if (desc_entry->wildcards) {
|
||||||
prefix = desc_entry->full_path ? "*/" : "*";
|
prefix = desc_entry->full_path ? "*/" : "*";
|
||||||
desc_entry->pattern = ap_pstrcat(dcfg->desc_list->pool,
|
desc_entry->pattern = ap_pstrcat(dcfg->desc_list->cont,
|
||||||
prefix, to, "*", NULL);
|
prefix, to, "*", NULL);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
desc_entry->pattern = ap_pstrdup(dcfg->desc_list->pool, to);
|
desc_entry->pattern = ap_pstrdup(dcfg->desc_list->cont, to);
|
||||||
}
|
}
|
||||||
desc_entry->description = ap_pstrdup(dcfg->desc_list->pool, desc);
|
desc_entry->description = ap_pstrdup(dcfg->desc_list->cont, desc);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -563,7 +563,7 @@ static const command_rec autoindex_cmds[] =
|
|||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void *create_autoindex_config(pool *p, char *dummy)
|
static void *create_autoindex_config(ap_context_t *p, char *dummy)
|
||||||
{
|
{
|
||||||
autoindex_config_rec *new =
|
autoindex_config_rec *new =
|
||||||
(autoindex_config_rec *) ap_pcalloc(p, sizeof(autoindex_config_rec));
|
(autoindex_config_rec *) ap_pcalloc(p, sizeof(autoindex_config_rec));
|
||||||
@@ -586,7 +586,7 @@ static void *create_autoindex_config(pool *p, char *dummy)
|
|||||||
return (void *) new;
|
return (void *) new;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_autoindex_configs(pool *p, void *basev, void *addv)
|
static void *merge_autoindex_configs(ap_context_t *p, void *basev, void *addv)
|
||||||
{
|
{
|
||||||
autoindex_config_rec *new;
|
autoindex_config_rec *new;
|
||||||
autoindex_config_rec *base = (autoindex_config_rec *) basev;
|
autoindex_config_rec *base = (autoindex_config_rec *) basev;
|
||||||
@@ -615,7 +615,7 @@ static void *merge_autoindex_configs(pool *p, void *basev, void *addv)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/*
|
/*
|
||||||
* If there were any non-incremental options selected for
|
* If there were any non ap_context_t ncremental options selected for
|
||||||
* this directory, they dominate and we don't inherit *anything.*
|
* this directory, they dominate and we don't inherit *anything.*
|
||||||
* Contrariwise, we *do* inherit if the only settings here are
|
* Contrariwise, we *do* inherit if the only settings here are
|
||||||
* incremental ones.
|
* incremental ones.
|
||||||
@@ -634,7 +634,7 @@ static void *merge_autoindex_configs(pool *p, void *basev, void *addv)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
/*
|
/*
|
||||||
* There are local non-incremental settings, which clear
|
* There are local non ap_context_t ncremental settings, which clear
|
||||||
* all inheritance from above. They *are* the new base settings.
|
* all inheritance from above. They *are* the new base settings.
|
||||||
*/
|
*/
|
||||||
new->opts = add->opts;;
|
new->opts = add->opts;;
|
||||||
@@ -684,7 +684,7 @@ struct ent {
|
|||||||
char key;
|
char key;
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *find_item(request_rec *r, array_header *list, int path_only)
|
static char *find_item(request_rec *r, ap_array_header_t *list, int path_only)
|
||||||
{
|
{
|
||||||
const char *content_type = r->content_type;
|
const char *content_type = r->content_type;
|
||||||
const char *content_encoding = r->content_encoding;
|
const char *content_encoding = r->content_encoding;
|
||||||
@@ -809,7 +809,7 @@ static char *find_desc(autoindex_config_rec *dcfg, request_rec *r)
|
|||||||
|
|
||||||
static int ignore_entry(autoindex_config_rec *d, char *path)
|
static int ignore_entry(autoindex_config_rec *d, char *path)
|
||||||
{
|
{
|
||||||
array_header *list = d->ign_list;
|
ap_array_header_t *list = d->ign_list;
|
||||||
struct item *items = (struct item *) list->elts;
|
struct item *items = (struct item *) list->elts;
|
||||||
char *tt;
|
char *tt;
|
||||||
int i;
|
int i;
|
||||||
@@ -1269,11 +1269,12 @@ static void output_directories(struct ent **ar, int n,
|
|||||||
char *name = r->uri;
|
char *name = r->uri;
|
||||||
char *tp;
|
char *tp;
|
||||||
int static_columns = (autoindex_opts & SUPPRESS_COLSORT);
|
int static_columns = (autoindex_opts & SUPPRESS_COLSORT);
|
||||||
pool *scratch = ap_make_sub_pool(r->pool);
|
ap_context_t *scratch;
|
||||||
int name_width;
|
int name_width;
|
||||||
char *name_scratch;
|
char *name_scratch;
|
||||||
char *pad_scratch;
|
char *pad_scratch;
|
||||||
|
|
||||||
|
ap_create_context(r->pool, NULL, &scratch);
|
||||||
if (name[0] == '\0') {
|
if (name[0] == '\0') {
|
||||||
name = "/";
|
name = "/";
|
||||||
}
|
}
|
||||||
@@ -1654,7 +1655,7 @@ module MODULE_VAR_EXPORT autoindex_module =
|
|||||||
merge_autoindex_configs, /* dir merger --- default is to override */
|
merge_autoindex_configs, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
autoindex_cmds, /* command table */
|
autoindex_cmds, /* command ap_table_t */
|
||||||
autoindex_handlers, /* handlers */
|
autoindex_handlers, /* handlers */
|
||||||
NULL /* register hooks */
|
NULL /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -103,7 +103,7 @@ typedef struct {
|
|||||||
int bufbytes;
|
int bufbytes;
|
||||||
} cgi_server_conf;
|
} cgi_server_conf;
|
||||||
|
|
||||||
static void *create_cgi_config(pool *p, server_rec *s)
|
static void *create_cgi_config(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
cgi_server_conf *c =
|
cgi_server_conf *c =
|
||||||
(cgi_server_conf *) ap_pcalloc(p, sizeof(cgi_server_conf));
|
(cgi_server_conf *) ap_pcalloc(p, sizeof(cgi_server_conf));
|
||||||
@@ -115,7 +115,7 @@ static void *create_cgi_config(pool *p, server_rec *s)
|
|||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_cgi_config(pool *p, void *basev, void *overridesv)
|
static void *merge_cgi_config(ap_context_t *p, void *basev, void *overridesv)
|
||||||
{
|
{
|
||||||
cgi_server_conf *base = (cgi_server_conf *) basev, *overrides = (cgi_server_conf *) overridesv;
|
cgi_server_conf *base = (cgi_server_conf *) basev, *overrides = (cgi_server_conf *) overridesv;
|
||||||
|
|
||||||
@@ -195,7 +195,7 @@ static int log_scripterror(request_rec *r, cgi_server_conf * conf, int ret,
|
|||||||
static int log_script(request_rec *r, cgi_server_conf * conf, int ret,
|
static int log_script(request_rec *r, cgi_server_conf * conf, int ret,
|
||||||
char *dbuf, const char *sbuf, BUFF *script_in, BUFF *script_err)
|
char *dbuf, const char *sbuf, BUFF *script_in, BUFF *script_err)
|
||||||
{
|
{
|
||||||
array_header *hdrs_arr = ap_table_elts(r->headers_in);
|
ap_array_header_t *hdrs_arr = ap_table_elts(r->headers_in);
|
||||||
table_entry *hdrs = (table_entry *) hdrs_arr->elts;
|
table_entry *hdrs = (table_entry *) hdrs_arr->elts;
|
||||||
char argsbuffer[HUGE_STRING_LEN];
|
char argsbuffer[HUGE_STRING_LEN];
|
||||||
FILE *f;
|
FILE *f;
|
||||||
@@ -581,7 +581,7 @@ module MODULE_VAR_EXPORT cgi_module =
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
create_cgi_config, /* server config */
|
create_cgi_config, /* server config */
|
||||||
merge_cgi_config, /* merge server config */
|
merge_cgi_config, /* merge server config */
|
||||||
cgi_cmds, /* command table */
|
cgi_cmds, /* command ap_table_t */
|
||||||
cgi_handlers, /* handlers */
|
cgi_handlers, /* handlers */
|
||||||
NULL, /* check auth */
|
NULL, /* check auth */
|
||||||
NULL, /* check access */
|
NULL, /* check access */
|
||||||
|
@@ -59,14 +59,14 @@
|
|||||||
* Info Module. Display configuration information for the server and
|
* Info Module. Display configuration information for the server and
|
||||||
* all included modules.
|
* all included modules.
|
||||||
*
|
*
|
||||||
* <Location /server-info>
|
* <Location /server ap_context_t nfo>
|
||||||
* SetHandler server-info
|
* SetHandler server ap_context_t nfo
|
||||||
* </Location>
|
* </Location>
|
||||||
*
|
*
|
||||||
* GET /server-info - Returns full configuration page for server and all modules
|
* GET /server ap_context_t nfo - Returns full configuration page for server and all modules
|
||||||
* GET /server-info?server - Returns server configuration only
|
* GET /server ap_context_t nfo?server - Returns server configuration only
|
||||||
* GET /server-info?module_name - Returns configuration for a single module
|
* GET /server ap_context_t nfo?module_name - Returns configuration for a single module
|
||||||
* GET /server-info?list - Returns quick list of included modules
|
* GET /server ap_context_t nfo?list - Returns quick list of included modules
|
||||||
*
|
*
|
||||||
* Rasmus Lerdorf <rasmus@vex.net>, May 1996
|
* Rasmus Lerdorf <rasmus@vex.net>, May 1996
|
||||||
*
|
*
|
||||||
@@ -93,7 +93,7 @@ typedef struct {
|
|||||||
} info_entry;
|
} info_entry;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
array_header *more_info;
|
ap_array_header_t *more_info;
|
||||||
} info_svr_conf;
|
} info_svr_conf;
|
||||||
|
|
||||||
typedef struct info_cfg_lines {
|
typedef struct info_cfg_lines {
|
||||||
@@ -105,7 +105,7 @@ typedef struct info_cfg_lines {
|
|||||||
module MODULE_VAR_EXPORT info_module;
|
module MODULE_VAR_EXPORT info_module;
|
||||||
extern module *top_module;
|
extern module *top_module;
|
||||||
|
|
||||||
static void *create_info_config(pool *p, server_rec *s)
|
static void *create_info_config(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
info_svr_conf *conf = (info_svr_conf *) ap_pcalloc(p, sizeof(info_svr_conf));
|
info_svr_conf *conf = (info_svr_conf *) ap_pcalloc(p, sizeof(info_svr_conf));
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ static void *create_info_config(pool *p, server_rec *s)
|
|||||||
return conf;
|
return conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_info_config(pool *p, void *basev, void *overridesv)
|
static void *merge_info_config(ap_context_t *p, void *basev, void *overridesv)
|
||||||
{
|
{
|
||||||
info_svr_conf *new = (info_svr_conf *) ap_pcalloc(p, sizeof(info_svr_conf));
|
info_svr_conf *new = (info_svr_conf *) ap_pcalloc(p, sizeof(info_svr_conf));
|
||||||
info_svr_conf *base = (info_svr_conf *) basev;
|
info_svr_conf *base = (info_svr_conf *) basev;
|
||||||
@@ -161,7 +161,7 @@ static char *mod_info_html_cmd_string(const char *string, char *buf, size_t buf_
|
|||||||
return (buf);
|
return (buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static info_cfg_lines *mod_info_load_config(pool *p, const char *filename,
|
static info_cfg_lines *mod_info_load_config(ap_context_t *p, const char *filename,
|
||||||
request_rec *r)
|
request_rec *r)
|
||||||
{
|
{
|
||||||
char s[MAX_STRING_LEN];
|
char s[MAX_STRING_LEN];
|
||||||
@@ -660,7 +660,7 @@ static const command_rec info_cmds[] =
|
|||||||
|
|
||||||
static const handler_rec info_handlers[] =
|
static const handler_rec info_handlers[] =
|
||||||
{
|
{
|
||||||
{"server-info", display_info},
|
{"server ap_context_t nfo", display_info},
|
||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -672,7 +672,7 @@ module MODULE_VAR_EXPORT info_module =
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
create_info_config, /* server config */
|
create_info_config, /* server config */
|
||||||
merge_info_config, /* merge server config */
|
merge_info_config, /* merge server config */
|
||||||
info_cmds, /* command table */
|
info_cmds, /* command ap_table_t */
|
||||||
info_handlers, /* handlers */
|
info_handlers, /* handlers */
|
||||||
NULL, /* filename translation */
|
NULL, /* filename translation */
|
||||||
NULL, /* check_user_id */
|
NULL, /* check_user_id */
|
||||||
|
@@ -70,7 +70,7 @@
|
|||||||
* http://your_server_name/server-status
|
* http://your_server_name/server-status
|
||||||
*
|
*
|
||||||
* /server-status - Returns page using tables
|
* /server-status - Returns page using tables
|
||||||
* /server-status?notable - Returns page for browsers without table support
|
* /server-status?notable - Returns page for browsers without ap_table_t support
|
||||||
* /server-status?refresh - Returns page with 1 second refresh
|
* /server-status?refresh - Returns page with 1 second refresh
|
||||||
* /server-status?refresh=6 - Returns page with refresh every 6 seconds
|
* /server-status?refresh=6 - Returns page with refresh every 6 seconds
|
||||||
* /server-status?auto - Returns page with data for automatic parsing
|
* /server-status?auto - Returns page with data for automatic parsing
|
||||||
@@ -202,7 +202,7 @@ static void show_time(request_rec *r, time_t tsecs)
|
|||||||
|
|
||||||
/* Main handler for x-httpd-status requests */
|
/* Main handler for x-httpd-status requests */
|
||||||
|
|
||||||
/* ID values for command table */
|
/* ID values for command ap_table_t */
|
||||||
|
|
||||||
#define STAT_OPT_END -1
|
#define STAT_OPT_END -1
|
||||||
#define STAT_OPT_REFRESH 0
|
#define STAT_OPT_REFRESH 0
|
||||||
@@ -750,7 +750,7 @@ static int status_handler(request_rec *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void status_init(server_rec *s, pool *p)
|
static void status_init(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for (i = 0; i < SERVER_NUM_STATUS; i++)
|
for (i = 0; i < SERVER_NUM_STATUS; i++)
|
||||||
@@ -784,7 +784,7 @@ module MODULE_VAR_EXPORT status_module =
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
status_module_cmds, /* command table */
|
status_module_cmds, /* command ap_table_t */
|
||||||
status_handlers, /* handlers */
|
status_handlers, /* handlers */
|
||||||
NULL, /* filename translation */
|
NULL, /* filename translation */
|
||||||
NULL, /* check_user_id */
|
NULL, /* check_user_id */
|
||||||
|
@@ -56,6 +56,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#define CORE_PRIVATE
|
#define CORE_PRIVATE
|
||||||
|
#include "apr_lib.h"
|
||||||
#include "httpd.h"
|
#include "httpd.h"
|
||||||
#include "http_config.h"
|
#include "http_config.h"
|
||||||
#include "http_core.h"
|
#include "http_core.h"
|
||||||
@@ -106,7 +107,7 @@
|
|||||||
* the http_conf_globals.
|
* the http_conf_globals.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void *create_core_dir_config(pool *a, char *dir)
|
static void *create_core_dir_config(ap_context_t *a, char *dir)
|
||||||
{
|
{
|
||||||
core_dir_config *conf;
|
core_dir_config *conf;
|
||||||
|
|
||||||
@@ -146,7 +147,7 @@ static void *create_core_dir_config(pool *a, char *dir)
|
|||||||
return (void *)conf;
|
return (void *)conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_core_dir_configs(pool *a, void *basev, void *newv)
|
static void *merge_core_dir_configs(ap_context_t *a, void *basev, void *newv)
|
||||||
{
|
{
|
||||||
core_dir_config *base = (core_dir_config *)basev;
|
core_dir_config *base = (core_dir_config *)basev;
|
||||||
core_dir_config *new = (core_dir_config *)newv;
|
core_dir_config *new = (core_dir_config *)newv;
|
||||||
@@ -257,7 +258,7 @@ static void *merge_core_dir_configs(pool *a, void *basev, void *newv)
|
|||||||
return (void*)conf;
|
return (void*)conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *create_core_server_config(pool *a, server_rec *s)
|
static void *create_core_server_config(ap_context_t *a, server_rec *s)
|
||||||
{
|
{
|
||||||
core_server_config *conf;
|
core_server_config *conf;
|
||||||
int is_virtual = s->is_virtual;
|
int is_virtual = s->is_virtual;
|
||||||
@@ -274,7 +275,7 @@ static void *create_core_server_config(pool *a, server_rec *s)
|
|||||||
return (void *)conf;
|
return (void *)conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_core_server_configs(pool *p, void *basev, void *virtv)
|
static void *merge_core_server_configs(ap_context_t *p, void *basev, void *virtv)
|
||||||
{
|
{
|
||||||
core_server_config *base = (core_server_config *)basev;
|
core_server_config *base = (core_server_config *)basev;
|
||||||
core_server_config *virt = (core_server_config *)virtv;
|
core_server_config *virt = (core_server_config *)virtv;
|
||||||
@@ -382,15 +383,15 @@ static int reorder_sorter(const void *va, const void *vb)
|
|||||||
return a->orig_index - b->orig_index;
|
return a->orig_index - b->orig_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ap_core_reorder_directories(pool *p, server_rec *s)
|
void ap_core_reorder_directories(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
core_server_config *sconf;
|
core_server_config *sconf;
|
||||||
array_header *sec;
|
ap_array_header_t *sec;
|
||||||
struct reorder_sort_rec *sortbin;
|
struct reorder_sort_rec *sortbin;
|
||||||
int nelts;
|
int nelts;
|
||||||
void **elts;
|
void **elts;
|
||||||
int i;
|
int i;
|
||||||
pool *tmp;
|
ap_context_t *tmp;
|
||||||
|
|
||||||
sconf = ap_get_module_config(s->module_config, &core_module);
|
sconf = ap_get_module_config(s->module_config, &core_module);
|
||||||
sec = sconf->sec;
|
sec = sconf->sec;
|
||||||
@@ -398,7 +399,7 @@ void ap_core_reorder_directories(pool *p, server_rec *s)
|
|||||||
elts = (void **)sec->elts;
|
elts = (void **)sec->elts;
|
||||||
|
|
||||||
/* we have to allocate tmp space to do a stable sort */
|
/* we have to allocate tmp space to do a stable sort */
|
||||||
tmp = ap_make_sub_pool(p);
|
ap_create_context(p, NULL, &tmp);
|
||||||
sortbin = ap_palloc(tmp, sec->nelts * sizeof(*sortbin));
|
sortbin = ap_palloc(tmp, sec->nelts * sizeof(*sortbin));
|
||||||
for (i = 0; i < nelts; ++i) {
|
for (i = 0; i < nelts; ++i) {
|
||||||
sortbin[i].orig_index = i;
|
sortbin[i].orig_index = i;
|
||||||
@@ -478,7 +479,7 @@ API_EXPORT(const char *) ap_document_root(request_rec *r) /* Don't use this! */
|
|||||||
return conf->ap_document_root;
|
return conf->ap_document_root;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(const array_header *) ap_requires(request_rec *r)
|
API_EXPORT(const ap_array_header_t *) ap_requires(request_rec *r)
|
||||||
{
|
{
|
||||||
core_dir_config *conf;
|
core_dir_config *conf;
|
||||||
|
|
||||||
@@ -700,7 +701,7 @@ API_EXPORT(unsigned) ap_get_server_port(const request_rec *r)
|
|||||||
return port;
|
return port;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_construct_url(pool *p, const char *uri,
|
API_EXPORT(char *) ap_construct_url(ap_context_t *p, const char *uri,
|
||||||
request_rec *r)
|
request_rec *r)
|
||||||
{
|
{
|
||||||
unsigned port = ap_get_server_port(r);
|
unsigned port = ap_get_server_port(r);
|
||||||
@@ -721,7 +722,7 @@ API_EXPORT(unsigned long) ap_get_limit_req_body(const request_rec *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
static char* get_interpreter_from_win32_registry(pool *p, const char* ext)
|
static char* get_interpreter_from_win32_registry(ap_context_t *p, const char* ext)
|
||||||
{
|
{
|
||||||
char extension_path[] = "SOFTWARE\\Classes\\";
|
char extension_path[] = "SOFTWARE\\Classes\\";
|
||||||
char executable_path[] = "\\SHELL\\OPEN\\COMMAND";
|
char executable_path[] = "\\SHELL\\OPEN\\COMMAND";
|
||||||
@@ -739,7 +740,7 @@ static char* get_interpreter_from_win32_registry(pool *p, const char* ext)
|
|||||||
/*
|
/*
|
||||||
* Future optimization:
|
* Future optimization:
|
||||||
* When the registry is successfully searched, store the interpreter
|
* When the registry is successfully searched, store the interpreter
|
||||||
* string in a table to make subsequent look-ups faster
|
* string in a ap_table_t to make subsequent look-ups faster
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Open the key associated with the script extension */
|
/* Open the key associated with the script extension */
|
||||||
@@ -1677,7 +1678,7 @@ static const char *virtualhost_section(cmd_parms *cmd, void *dummy, char *arg)
|
|||||||
server_rec *main_server = cmd->server, *s;
|
server_rec *main_server = cmd->server, *s;
|
||||||
const char *errmsg;
|
const char *errmsg;
|
||||||
char *endp = strrchr(arg, '>');
|
char *endp = strrchr(arg, '>');
|
||||||
pool *p = cmd->pool, *ptemp = cmd->temp_pool;
|
ap_context_t *p = cmd->pool, *ptemp = cmd->temp_pool;
|
||||||
const char *old_end_token;
|
const char *old_end_token;
|
||||||
|
|
||||||
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
|
const char *err = ap_check_cmd_context(cmd, GLOBAL_ONLY);
|
||||||
@@ -2109,7 +2110,7 @@ static const char *set_serv_tokens(cmd_parms *cmd, void *dummy, char *arg)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: re-implement the server token stuff. */
|
/* TODO: re ap_context_t mplement the server token stuff. */
|
||||||
#if 0
|
#if 0
|
||||||
if (!strcasecmp(arg, "OS")) {
|
if (!strcasecmp(arg, "OS")) {
|
||||||
ap_server_tokens = SrvTk_OS;
|
ap_server_tokens = SrvTk_OS;
|
||||||
@@ -2447,7 +2448,7 @@ struct mmap_rec {
|
|||||||
size_t length;
|
size_t length;
|
||||||
};
|
};
|
||||||
|
|
||||||
static void mmap_cleanup(void *mmv)
|
static ap_status_t mmap_cleanup(void *mmv)
|
||||||
{
|
{
|
||||||
struct mmap_rec *mmd = mmv;
|
struct mmap_rec *mmd = mmv;
|
||||||
|
|
||||||
@@ -2456,6 +2457,7 @@ static void mmap_cleanup(void *mmv)
|
|||||||
"Failed to munmap memory of length %ld at 0x%lx",
|
"Failed to munmap memory of length %ld at 0x%lx",
|
||||||
(long) mmd->length, (long) mmd->mm);
|
(long) mmd->length, (long) mmd->mm);
|
||||||
}
|
}
|
||||||
|
return APR_SUCCESS;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2644,7 +2646,7 @@ static const handler_rec core_handlers[] = {
|
|||||||
{ NULL, NULL }
|
{ NULL, NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
static void core_open_logs(pool *pconf, pool *plog, pool *ptemp, server_rec *s)
|
static void core_open_logs(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s)
|
||||||
{
|
{
|
||||||
ap_open_logs(s, pconf);
|
ap_open_logs(s, pconf);
|
||||||
}
|
}
|
||||||
@@ -2674,7 +2676,7 @@ API_VAR_EXPORT module core_module = {
|
|||||||
merge_core_dir_configs, /* merge per-directory config structures */
|
merge_core_dir_configs, /* merge per-directory config structures */
|
||||||
create_core_server_config, /* create per-server config structure */
|
create_core_server_config, /* create per-server config structure */
|
||||||
merge_core_server_configs, /* merge per-server config structures */
|
merge_core_server_configs, /* merge per-server config structures */
|
||||||
core_cmds, /* command table */
|
core_cmds, /* command ap_table_t */
|
||||||
core_handlers, /* handlers */
|
core_handlers, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -793,7 +793,7 @@ static int read_request_line(request_rec *r)
|
|||||||
* read(). B_SAFEREAD ensures that the BUFF layer flushes if it will
|
* read(). B_SAFEREAD ensures that the BUFF layer flushes if it will
|
||||||
* have to block during a read.
|
* have to block during a read.
|
||||||
*/
|
*/
|
||||||
/* TODO: re-implement SAFEREAD external to BUFF using a layer */
|
/* TODO: re ap_context_t mplement SAFEREAD external to BUFF using a layer */
|
||||||
/* //ap_bsetflag(conn->client, B_SAFEREAD, 1); */
|
/* //ap_bsetflag(conn->client, B_SAFEREAD, 1); */
|
||||||
ap_bflush(conn->client);
|
ap_bflush(conn->client);
|
||||||
while ((len = getline(l, sizeof(l), conn->client, 0)) <= 0) {
|
while ((len = getline(l, sizeof(l), conn->client, 0)) <= 0) {
|
||||||
@@ -866,7 +866,7 @@ static void get_mime_headers(request_rec *r)
|
|||||||
char *copy;
|
char *copy;
|
||||||
int len;
|
int len;
|
||||||
unsigned int fields_read = 0;
|
unsigned int fields_read = 0;
|
||||||
table *tmp_headers;
|
ap_table_t *tmp_headers;
|
||||||
|
|
||||||
/* We'll use ap_overlap_tables later to merge these into r->headers_in. */
|
/* We'll use ap_overlap_tables later to merge these into r->headers_in. */
|
||||||
tmp_headers = ap_make_table(r->pool, 50);
|
tmp_headers = ap_make_table(r->pool, 50);
|
||||||
@@ -921,11 +921,11 @@ static void get_mime_headers(request_rec *r)
|
|||||||
request_rec *ap_read_request(conn_rec *conn)
|
request_rec *ap_read_request(conn_rec *conn)
|
||||||
{
|
{
|
||||||
request_rec *r;
|
request_rec *r;
|
||||||
pool *p;
|
ap_context_t *p;
|
||||||
const char *expect;
|
const char *expect;
|
||||||
int access_status;
|
int access_status;
|
||||||
|
|
||||||
p = ap_make_sub_pool(conn->pool);
|
ap_create_context(conn->pool, NULL, &p);
|
||||||
r = ap_pcalloc(p, sizeof(request_rec));
|
r = ap_pcalloc(p, sizeof(request_rec));
|
||||||
r->pool = p;
|
r->pool = p;
|
||||||
r->connection = conn;
|
r->connection = conn;
|
||||||
@@ -1469,15 +1469,15 @@ static int use_range_x(request_rec *r)
|
|||||||
*/
|
*/
|
||||||
static int uniq_field_values(void *d, const char *key, const char *val)
|
static int uniq_field_values(void *d, const char *key, const char *val)
|
||||||
{
|
{
|
||||||
array_header *values;
|
ap_array_header_t *values;
|
||||||
char *start;
|
char *start;
|
||||||
char *e;
|
char *e;
|
||||||
char **strpp;
|
char **strpp;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
values = (array_header *)d;
|
values = (ap_array_header_t *)d;
|
||||||
|
|
||||||
e = ap_pstrdup(values->pool, val);
|
e = ap_pstrdup(values->cont, val);
|
||||||
|
|
||||||
do {
|
do {
|
||||||
/* Find a non-empty fieldname */
|
/* Find a non-empty fieldname */
|
||||||
@@ -1520,7 +1520,7 @@ static int uniq_field_values(void *d, const char *key, const char *val)
|
|||||||
*/
|
*/
|
||||||
static void fixup_vary(request_rec *r)
|
static void fixup_vary(request_rec *r)
|
||||||
{
|
{
|
||||||
array_header *varies;
|
ap_array_header_t *varies;
|
||||||
|
|
||||||
varies = ap_make_array(r->pool, 5, sizeof(char *));
|
varies = ap_make_array(r->pool, 5, sizeof(char *));
|
||||||
|
|
||||||
@@ -1531,7 +1531,7 @@ static void fixup_vary(request_rec *r)
|
|||||||
ap_table_do((int (*)(void *, const char *, const char *))uniq_field_values,
|
ap_table_do((int (*)(void *, const char *, const char *))uniq_field_values,
|
||||||
(void *) varies, r->headers_out, "Vary", NULL);
|
(void *) varies, r->headers_out, "Vary", NULL);
|
||||||
|
|
||||||
/* If we found any, replace old Vary fields with unique-ified value */
|
/* If we found any, replace old Vary fields with unique ap_context_t fied value */
|
||||||
|
|
||||||
if (varies->nelts > 0) {
|
if (varies->nelts > 0) {
|
||||||
ap_table_setn(r->headers_out, "Vary",
|
ap_table_setn(r->headers_out, "Vary",
|
||||||
@@ -1619,7 +1619,7 @@ API_EXPORT(void) ap_send_http_header(request_rec *r)
|
|||||||
ap_table_addn(r->headers_out, "Expires",
|
ap_table_addn(r->headers_out, "Expires",
|
||||||
ap_gm_timestr_822(r->pool, r->request_time));
|
ap_gm_timestr_822(r->pool, r->request_time));
|
||||||
|
|
||||||
/* Send the entire table of header fields, terminated by an empty line. */
|
/* Send the entire ap_table_t of header fields, terminated by an empty line. */
|
||||||
|
|
||||||
ap_table_do((int (*) (void *, const char *, const char *)) ap_send_header_field,
|
ap_table_do((int (*) (void *, const char *, const char *)) ap_send_header_field,
|
||||||
(void *) r, r->headers_out, NULL);
|
(void *) r, r->headers_out, NULL);
|
||||||
@@ -2051,7 +2051,7 @@ API_EXPORT(long) ap_send_fd_length(APRFile fd, request_rec *r, long length)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* TODO: re-implement ap_send_fb */
|
/* TODO: re ap_context_t mplement ap_send_fb */
|
||||||
#if 0
|
#if 0
|
||||||
/*
|
/*
|
||||||
* Send the body of a response to the client.
|
* Send the body of a response to the client.
|
||||||
@@ -2441,7 +2441,7 @@ void ap_send_error_response(request_rec *r, int recursive_error)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!r->assbackwards) {
|
if (!r->assbackwards) {
|
||||||
table *tmp = r->headers_out;
|
ap_table_t *tmp = r->headers_out;
|
||||||
|
|
||||||
/* For all HTTP/1.x responses for which we generate the message,
|
/* For all HTTP/1.x responses for which we generate the message,
|
||||||
* we need to avoid inheriting the "normal status" header fields
|
* we need to avoid inheriting the "normal status" header fields
|
||||||
|
@@ -737,9 +737,11 @@ static int file_walk(request_rec *r)
|
|||||||
|
|
||||||
static request_rec *make_sub_request(const request_rec *r)
|
static request_rec *make_sub_request(const request_rec *r)
|
||||||
{
|
{
|
||||||
pool *rrp = ap_make_sub_pool(r->pool);
|
ap_context_t *rrp;
|
||||||
request_rec *rr = ap_pcalloc(rrp, sizeof(request_rec));
|
request_rec *rr;
|
||||||
|
|
||||||
|
ap_create_context(r->pool, NULL, &rrp);
|
||||||
|
rr = ap_pcalloc(rrp, sizeof(request_rec));
|
||||||
rr->pool = rrp;
|
rr->pool = rrp;
|
||||||
return rr;
|
return rr;
|
||||||
}
|
}
|
||||||
@@ -1094,7 +1096,7 @@ API_EXPORT(int) ap_some_auth_required(request_rec *r)
|
|||||||
{
|
{
|
||||||
/* Is there a require line configured for the type of *this* req? */
|
/* Is there a require line configured for the type of *this* req? */
|
||||||
|
|
||||||
const array_header *reqs_arr = ap_requires(r);
|
const ap_array_header_t *reqs_arr = ap_requires(r);
|
||||||
require_line *reqs;
|
require_line *reqs;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -1258,16 +1260,16 @@ void ap_process_request(request_rec *r)
|
|||||||
* this packet, then it'll appear like the link is stalled when really
|
* this packet, then it'll appear like the link is stalled when really
|
||||||
* it's the application that's stalled.
|
* it's the application that's stalled.
|
||||||
*/
|
*/
|
||||||
/* TODO: re-implement ap_bhalfduplex... not sure how yet */
|
/* TODO: re ap_context_t mplement ap_bhalfduplex... not sure how yet */
|
||||||
/* //ap_bhalfduplex(r->connection->client); */
|
/* //ap_bhalfduplex(r->connection->client); */
|
||||||
ap_run_log_transaction(r);
|
ap_run_log_transaction(r);
|
||||||
}
|
}
|
||||||
|
|
||||||
static table *rename_original_env(pool *p, table *t)
|
static ap_table_t *rename_original_env(ap_context_t *p, ap_table_t *t)
|
||||||
{
|
{
|
||||||
array_header *env_arr = ap_table_elts(t);
|
ap_array_header_t *env_arr = ap_table_elts(t);
|
||||||
table_entry *elts = (table_entry *) env_arr->elts;
|
ap_table_entry_t *elts = (ap_table_entry_t *) env_arr->elts;
|
||||||
table *new = ap_make_table(p, env_arr->nalloc);
|
ap_table_t *new = ap_make_table(p, env_arr->nalloc);
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < env_arr->nelts; ++i) {
|
for (i = 0; i < env_arr->nelts; ++i) {
|
||||||
|
@@ -74,11 +74,11 @@ typedef struct handlers_info {
|
|||||||
} handlers_info;
|
} handlers_info;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
table *forced_types; /* Additional AddTyped stuff */
|
ap_table_t *forced_types; /* Additional AddTyped stuff */
|
||||||
table *encoding_types; /* Added with AddEncoding... */
|
ap_table_t *encoding_types; /* Added with AddEncoding... */
|
||||||
table *language_types; /* Added with AddLanguage... */
|
ap_table_t *language_types; /* Added with AddLanguage... */
|
||||||
table *handlers; /* Added with AddHandler... */
|
ap_table_t *handlers; /* Added with AddHandler... */
|
||||||
array_header *handlers_remove; /* List of handlers to remove */
|
ap_array_header_t *handlers_remove; /* List of handlers to remove */
|
||||||
|
|
||||||
char *type; /* Type forced with ForceType */
|
char *type; /* Type forced with ForceType */
|
||||||
char *handler; /* Handler forced with SetHandler */
|
char *handler; /* Handler forced with SetHandler */
|
||||||
@@ -87,7 +87,7 @@ typedef struct {
|
|||||||
|
|
||||||
module MODULE_VAR_EXPORT mime_module;
|
module MODULE_VAR_EXPORT mime_module;
|
||||||
|
|
||||||
static void *create_mime_dir_config(pool *p, char *dummy)
|
static void *create_mime_dir_config(ap_context_t *p, char *dummy)
|
||||||
{
|
{
|
||||||
mime_dir_config *new =
|
mime_dir_config *new =
|
||||||
(mime_dir_config *) ap_palloc(p, sizeof(mime_dir_config));
|
(mime_dir_config *) ap_palloc(p, sizeof(mime_dir_config));
|
||||||
@@ -105,7 +105,7 @@ static void *create_mime_dir_config(pool *p, char *dummy)
|
|||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_mime_dir_configs(pool *p, void *basev, void *addv)
|
static void *merge_mime_dir_configs(ap_context_t *p, void *basev, void *addv)
|
||||||
{
|
{
|
||||||
mime_dir_config *base = (mime_dir_config *) basev;
|
mime_dir_config *base = (mime_dir_config *) basev;
|
||||||
mime_dir_config *add = (mime_dir_config *) addv;
|
mime_dir_config *add = (mime_dir_config *) addv;
|
||||||
@@ -230,16 +230,16 @@ static const command_rec mime_cmds[] =
|
|||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Hash table --- only one of these per daemon; virtual hosts can
|
/* Hash ap_table_t --- only one of these per daemon; virtual hosts can
|
||||||
* get private versions through AddType...
|
* get private versions through AddType...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define MIME_HASHSIZE (32)
|
#define MIME_HASHSIZE (32)
|
||||||
#define hash(i) (ap_tolower(i) % MIME_HASHSIZE)
|
#define hash(i) (ap_tolower(i) % MIME_HASHSIZE)
|
||||||
|
|
||||||
static table *hash_buckets[MIME_HASHSIZE];
|
static ap_table_t *hash_buckets[MIME_HASHSIZE];
|
||||||
|
|
||||||
static void mime_post_config(pool *p, pool *plog, pool *ptemp, server_rec *s)
|
static void mime_post_config(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp, server_rec *s)
|
||||||
{
|
{
|
||||||
configfile_t *f;
|
configfile_t *f;
|
||||||
char l[MAX_STRING_LEN];
|
char l[MAX_STRING_LEN];
|
||||||
@@ -391,7 +391,7 @@ module MODULE_VAR_EXPORT mime_module = {
|
|||||||
merge_mime_dir_configs, /* merge per-directory config structures */
|
merge_mime_dir_configs, /* merge per-directory config structures */
|
||||||
NULL, /* create per-server config structure */
|
NULL, /* create per-server config structure */
|
||||||
NULL, /* merge per-server config structures */
|
NULL, /* merge per-server config structures */
|
||||||
mime_cmds, /* command table */
|
mime_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -218,10 +218,10 @@ static mode_t xfer_mode = (S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char *default_format_string;
|
char *default_format_string;
|
||||||
array_header *default_format;
|
ap_array_header_t *default_format;
|
||||||
array_header *config_logs;
|
ap_array_header_t *config_logs;
|
||||||
array_header *server_config_logs;
|
ap_array_header_t *server_config_logs;
|
||||||
table *formats;
|
ap_table_t *formats;
|
||||||
} multi_log_state;
|
} multi_log_state;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -236,7 +236,7 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
char *fname;
|
char *fname;
|
||||||
char *format_string;
|
char *format_string;
|
||||||
array_header *format;
|
ap_array_header_t *format;
|
||||||
int log_fd;
|
int log_fd;
|
||||||
char *condition_var;
|
char *condition_var;
|
||||||
#ifdef BUFFERED_LOGS
|
#ifdef BUFFERED_LOGS
|
||||||
@@ -257,15 +257,15 @@ typedef struct {
|
|||||||
char *arg;
|
char *arg;
|
||||||
int condition_sense;
|
int condition_sense;
|
||||||
int want_orig;
|
int want_orig;
|
||||||
array_header *conditions;
|
ap_array_header_t *conditions;
|
||||||
} log_format_item;
|
} log_format_item;
|
||||||
|
|
||||||
static char *format_integer(pool *p, int i)
|
static char *format_integer(ap_context_t *p, int i)
|
||||||
{
|
{
|
||||||
return ap_psprintf(p, "%d", i);
|
return ap_psprintf(p, "%d", i);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *pfmt(pool *p, int i)
|
static char *pfmt(ap_context_t *p, int i)
|
||||||
{
|
{
|
||||||
if (i <= 0) {
|
if (i <= 0) {
|
||||||
return "-";
|
return "-";
|
||||||
@@ -524,7 +524,7 @@ static struct log_item_list *find_log_func(char k)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *parse_log_misc_string(pool *p, log_format_item *it,
|
static char *parse_log_misc_string(ap_context_t *p, log_format_item *it,
|
||||||
const char **sa)
|
const char **sa)
|
||||||
{
|
{
|
||||||
const char *s;
|
const char *s;
|
||||||
@@ -582,7 +582,7 @@ static char *parse_log_misc_string(pool *p, log_format_item *it,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *parse_log_item(pool *p, log_format_item *it, const char **sa)
|
static char *parse_log_item(ap_context_t *p, log_format_item *it, const char **sa)
|
||||||
{
|
{
|
||||||
const char *s = *sa;
|
const char *s = *sa;
|
||||||
|
|
||||||
@@ -667,9 +667,9 @@ static char *parse_log_item(pool *p, log_format_item *it, const char **sa)
|
|||||||
return "Ran off end of LogFormat parsing args to some directive";
|
return "Ran off end of LogFormat parsing args to some directive";
|
||||||
}
|
}
|
||||||
|
|
||||||
static array_header *parse_log_string(pool *p, const char *s, const char **err)
|
static ap_array_header_t *parse_log_string(ap_context_t *p, const char *s, const char **err)
|
||||||
{
|
{
|
||||||
array_header *a = ap_make_array(p, 30, sizeof(log_format_item));
|
ap_array_header_t *a = ap_make_array(p, 30, sizeof(log_format_item));
|
||||||
char *res;
|
char *res;
|
||||||
|
|
||||||
while (*s) {
|
while (*s) {
|
||||||
@@ -731,7 +731,7 @@ static void flush_log(config_log_state *cls)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static int config_log_transaction(request_rec *r, config_log_state *cls,
|
static int config_log_transaction(request_rec *r, config_log_state *cls,
|
||||||
array_header *default_format)
|
ap_array_header_t *default_format)
|
||||||
{
|
{
|
||||||
log_format_item *items;
|
log_format_item *items;
|
||||||
char *str, *s;
|
char *str, *s;
|
||||||
@@ -740,7 +740,7 @@ static int config_log_transaction(request_rec *r, config_log_state *cls,
|
|||||||
request_rec *orig;
|
request_rec *orig;
|
||||||
int i;
|
int i;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
array_header *format;
|
ap_array_header_t *format;
|
||||||
char *envar;
|
char *envar;
|
||||||
|
|
||||||
if (cls->fname == NULL) {
|
if (cls->fname == NULL) {
|
||||||
@@ -855,7 +855,7 @@ static int multi_log_transaction(request_rec *r)
|
|||||||
* Module glue...
|
* Module glue...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void *make_config_log_state(pool *p, server_rec *s)
|
static void *make_config_log_state(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
multi_log_state *mls;
|
multi_log_state *mls;
|
||||||
|
|
||||||
@@ -876,7 +876,7 @@ static void *make_config_log_state(pool *p, server_rec *s)
|
|||||||
* vhosts inherit any globally-defined format names.
|
* vhosts inherit any globally-defined format names.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void *merge_config_log_state(pool *p, void *basev, void *addv)
|
static void *merge_config_log_state(ap_context_t *p, void *basev, void *addv)
|
||||||
{
|
{
|
||||||
multi_log_state *base = (multi_log_state *) basev;
|
multi_log_state *base = (multi_log_state *) basev;
|
||||||
multi_log_state *add = (multi_log_state *) addv;
|
multi_log_state *add = (multi_log_state *) addv;
|
||||||
@@ -978,9 +978,9 @@ static const command_rec config_log_cmds[] =
|
|||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static config_log_state *open_config_log(server_rec *s, pool *p,
|
static config_log_state *open_config_log(server_rec *s, ap_context_t *p,
|
||||||
config_log_state *cls,
|
config_log_state *cls,
|
||||||
array_header *default_format)
|
ap_array_header_t *default_format)
|
||||||
{
|
{
|
||||||
if (cls->log_fd > 0) {
|
if (cls->log_fd > 0) {
|
||||||
return cls; /* virtual config shared w/main server */
|
return cls; /* virtual config shared w/main server */
|
||||||
@@ -1014,7 +1014,7 @@ static config_log_state *open_config_log(server_rec *s, pool *p,
|
|||||||
return cls;
|
return cls;
|
||||||
}
|
}
|
||||||
|
|
||||||
static config_log_state *open_multi_logs(server_rec *s, pool *p)
|
static config_log_state *open_multi_logs(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
multi_log_state *mls = ap_get_module_config(s->module_config,
|
multi_log_state *mls = ap_get_module_config(s->module_config,
|
||||||
@@ -1068,7 +1068,7 @@ static config_log_state *open_multi_logs(server_rec *s, pool *p)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void init_config_log(pool *pc, pool *p, pool *pt, server_rec *s)
|
static void init_config_log(ap_context_t *pc, ap_context_t *p, ap_context_t *pt, server_rec *s)
|
||||||
{
|
{
|
||||||
/* First, do "physical" server, which gets default log fd and format
|
/* First, do "physical" server, which gets default log fd and format
|
||||||
* for the virtual servers, if they don't override...
|
* for the virtual servers, if they don't override...
|
||||||
@@ -1091,7 +1091,7 @@ static void init_config_log(pool *pc, pool *p, pool *pt, server_rec *s)
|
|||||||
static void flush_all_logs(server_rec *s)
|
static void flush_all_logs(server_rec *s)
|
||||||
{
|
{
|
||||||
multi_log_state *mls;
|
multi_log_state *mls;
|
||||||
array_header *log_list;
|
ap_array_header_t *log_list;
|
||||||
config_log_state *clsarray;
|
config_log_state *clsarray;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -1127,7 +1127,7 @@ module MODULE_VAR_EXPORT config_log_module =
|
|||||||
NULL, /* merge per-dir config */
|
NULL, /* merge per-dir config */
|
||||||
make_config_log_state, /* server config */
|
make_config_log_state, /* server config */
|
||||||
merge_config_log_state, /* merge server config */
|
merge_config_log_state, /* merge server config */
|
||||||
config_log_cmds, /* command table */
|
config_log_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -87,13 +87,13 @@
|
|||||||
#include "util_script.h"
|
#include "util_script.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
table *action_types; /* Added with Action... */
|
ap_table_t *action_types; /* Added with Action... */
|
||||||
char *scripted[METHODS]; /* Added with Script... */
|
char *scripted[METHODS]; /* Added with Script... */
|
||||||
} action_dir_config;
|
} action_dir_config;
|
||||||
|
|
||||||
module action_module;
|
module action_module;
|
||||||
|
|
||||||
static void *create_action_dir_config(pool *p, char *dummy)
|
static void *create_action_dir_config(ap_context_t *p, char *dummy)
|
||||||
{
|
{
|
||||||
action_dir_config *new =
|
action_dir_config *new =
|
||||||
(action_dir_config *) ap_palloc(p, sizeof(action_dir_config));
|
(action_dir_config *) ap_palloc(p, sizeof(action_dir_config));
|
||||||
@@ -104,7 +104,7 @@ static void *create_action_dir_config(pool *p, char *dummy)
|
|||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_action_dir_configs(pool *p, void *basev, void *addv)
|
static void *merge_action_dir_configs(ap_context_t *p, void *basev, void *addv)
|
||||||
{
|
{
|
||||||
action_dir_config *base = (action_dir_config *) basev;
|
action_dir_config *base = (action_dir_config *) basev;
|
||||||
action_dir_config *add = (action_dir_config *) addv;
|
action_dir_config *add = (action_dir_config *) addv;
|
||||||
@@ -215,7 +215,7 @@ module action_module =
|
|||||||
merge_action_dir_configs, /* dir merger --- default is to override */
|
merge_action_dir_configs, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
action_cmds, /* command table */
|
action_cmds, /* command ap_table_t */
|
||||||
action_handlers, /* handlers */
|
action_handlers, /* handlers */
|
||||||
NULL /* register hooks */
|
NULL /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -76,17 +76,17 @@ typedef struct {
|
|||||||
} alias_entry;
|
} alias_entry;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
array_header *aliases;
|
ap_array_header_t *aliases;
|
||||||
array_header *redirects;
|
ap_array_header_t *redirects;
|
||||||
} alias_server_conf;
|
} alias_server_conf;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
array_header *redirects;
|
ap_array_header_t *redirects;
|
||||||
} alias_dir_conf;
|
} alias_dir_conf;
|
||||||
|
|
||||||
module MODULE_VAR_EXPORT alias_module;
|
module MODULE_VAR_EXPORT alias_module;
|
||||||
|
|
||||||
static void *create_alias_config(pool *p, server_rec *s)
|
static void *create_alias_config(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
alias_server_conf *a =
|
alias_server_conf *a =
|
||||||
(alias_server_conf *) ap_pcalloc(p, sizeof(alias_server_conf));
|
(alias_server_conf *) ap_pcalloc(p, sizeof(alias_server_conf));
|
||||||
@@ -96,7 +96,7 @@ static void *create_alias_config(pool *p, server_rec *s)
|
|||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *create_alias_dir_config(pool *p, char *d)
|
static void *create_alias_dir_config(ap_context_t *p, char *d)
|
||||||
{
|
{
|
||||||
alias_dir_conf *a =
|
alias_dir_conf *a =
|
||||||
(alias_dir_conf *) ap_pcalloc(p, sizeof(alias_dir_conf));
|
(alias_dir_conf *) ap_pcalloc(p, sizeof(alias_dir_conf));
|
||||||
@@ -104,7 +104,7 @@ static void *create_alias_dir_config(pool *p, char *d)
|
|||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_alias_config(pool *p, void *basev, void *overridesv)
|
static void *merge_alias_config(ap_context_t *p, void *basev, void *overridesv)
|
||||||
{
|
{
|
||||||
alias_server_conf *a =
|
alias_server_conf *a =
|
||||||
(alias_server_conf *) ap_pcalloc(p, sizeof(alias_server_conf));
|
(alias_server_conf *) ap_pcalloc(p, sizeof(alias_server_conf));
|
||||||
@@ -115,7 +115,7 @@ static void *merge_alias_config(pool *p, void *basev, void *overridesv)
|
|||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_alias_dir_config(pool *p, void *basev, void *overridesv)
|
static void *merge_alias_dir_config(ap_context_t *p, void *basev, void *overridesv)
|
||||||
{
|
{
|
||||||
alias_dir_conf *a =
|
alias_dir_conf *a =
|
||||||
(alias_dir_conf *) ap_pcalloc(p, sizeof(alias_dir_conf));
|
(alias_dir_conf *) ap_pcalloc(p, sizeof(alias_dir_conf));
|
||||||
@@ -289,7 +289,7 @@ static int alias_matches(const char *uri, const char *alias_fakename)
|
|||||||
return urip - uri;
|
return urip - uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
static char *try_alias_list(request_rec *r, array_header *aliases, int doesc, int *status)
|
static char *try_alias_list(request_rec *r, ap_array_header_t *aliases, int doesc, int *status)
|
||||||
{
|
{
|
||||||
alias_entry *entries = (alias_entry *) aliases->elts;
|
alias_entry *entries = (alias_entry *) aliases->elts;
|
||||||
regmatch_t regm[10];
|
regmatch_t regm[10];
|
||||||
@@ -410,7 +410,7 @@ module MODULE_VAR_EXPORT alias_module =
|
|||||||
merge_alias_dir_config, /* dir merger --- default is to override */
|
merge_alias_dir_config, /* dir merger --- default is to override */
|
||||||
create_alias_config, /* server config */
|
create_alias_config, /* server config */
|
||||||
merge_alias_config, /* merge server configs */
|
merge_alias_config, /* merge server configs */
|
||||||
alias_cmds, /* command table */
|
alias_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -71,7 +71,7 @@
|
|||||||
module MODULE_VAR_EXPORT dir_module;
|
module MODULE_VAR_EXPORT dir_module;
|
||||||
|
|
||||||
typedef struct dir_config_struct {
|
typedef struct dir_config_struct {
|
||||||
array_header *index_names;
|
ap_array_header_t *index_names;
|
||||||
} dir_config_rec;
|
} dir_config_rec;
|
||||||
|
|
||||||
#define DIR_CMD_PERMS OR_INDEXES
|
#define DIR_CMD_PERMS OR_INDEXES
|
||||||
@@ -95,7 +95,7 @@ static const command_rec dir_cmds[] =
|
|||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void *create_dir_config(pool *p, char *dummy)
|
static void *create_dir_config(ap_context_t *p, char *dummy)
|
||||||
{
|
{
|
||||||
dir_config_rec *new =
|
dir_config_rec *new =
|
||||||
(dir_config_rec *) ap_pcalloc(p, sizeof(dir_config_rec));
|
(dir_config_rec *) ap_pcalloc(p, sizeof(dir_config_rec));
|
||||||
@@ -104,7 +104,7 @@ static void *create_dir_config(pool *p, char *dummy)
|
|||||||
return (void *) new;
|
return (void *) new;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_dir_configs(pool *p, void *basev, void *addv)
|
static void *merge_dir_configs(ap_context_t *p, void *basev, void *addv)
|
||||||
{
|
{
|
||||||
dir_config_rec *new = (dir_config_rec *) ap_pcalloc(p, sizeof(dir_config_rec));
|
dir_config_rec *new = (dir_config_rec *) ap_pcalloc(p, sizeof(dir_config_rec));
|
||||||
dir_config_rec *base = (dir_config_rec *) basev;
|
dir_config_rec *base = (dir_config_rec *) basev;
|
||||||
@@ -228,7 +228,7 @@ module MODULE_VAR_EXPORT dir_module = {
|
|||||||
merge_dir_configs, /* merge per-directory config structures */
|
merge_dir_configs, /* merge per-directory config structures */
|
||||||
NULL, /* create per-server config structure */
|
NULL, /* create per-server config structure */
|
||||||
NULL, /* merge per-server config structures */
|
NULL, /* merge per-server config structures */
|
||||||
dir_cmds, /* command table */
|
dir_cmds, /* command ap_table_t */
|
||||||
dir_handlers, /* handlers */
|
dir_handlers, /* handlers */
|
||||||
NULL /* register hooks */
|
NULL /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -100,7 +100,7 @@
|
|||||||
#include "http_log.h"
|
#include "http_log.h"
|
||||||
#include "util_script.h"
|
#include "util_script.h"
|
||||||
|
|
||||||
#define IMAP_MAGIC_TYPE "application/x-httpd-imap"
|
#define IMAP_MAGIC_TYPE "application/x-httpd ap_context_t map"
|
||||||
#define MAXVERTS 100
|
#define MAXVERTS 100
|
||||||
#define X 0
|
#define X 0
|
||||||
#define Y 1
|
#define Y 1
|
||||||
@@ -121,7 +121,7 @@ typedef struct {
|
|||||||
char *imap_base;
|
char *imap_base;
|
||||||
} imap_conf_rec;
|
} imap_conf_rec;
|
||||||
|
|
||||||
static void *create_imap_dir_config(pool *p, char *dummy)
|
static void *create_imap_dir_config(ap_context_t *p, char *dummy)
|
||||||
{
|
{
|
||||||
imap_conf_rec *icr =
|
imap_conf_rec *icr =
|
||||||
(imap_conf_rec *) ap_palloc(p, sizeof(imap_conf_rec));
|
(imap_conf_rec *) ap_palloc(p, sizeof(imap_conf_rec));
|
||||||
@@ -133,7 +133,7 @@ static void *create_imap_dir_config(pool *p, char *dummy)
|
|||||||
return icr;
|
return icr;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_imap_dir_configs(pool *p, void *basev, void *addv)
|
static void *merge_imap_dir_configs(ap_context_t *p, void *basev, void *addv)
|
||||||
{
|
{
|
||||||
imap_conf_rec *new = (imap_conf_rec *) ap_pcalloc(p, sizeof(imap_conf_rec));
|
imap_conf_rec *new = (imap_conf_rec *) ap_pcalloc(p, sizeof(imap_conf_rec));
|
||||||
imap_conf_rec *base = (imap_conf_rec *) basev;
|
imap_conf_rec *base = (imap_conf_rec *) basev;
|
||||||
@@ -901,7 +901,7 @@ module MODULE_VAR_EXPORT imap_module =
|
|||||||
merge_imap_dir_configs, /* dir merger --- default is to override */
|
merge_imap_dir_configs, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
imap_cmds, /* command table */
|
imap_cmds, /* command ap_table_t */
|
||||||
imap_handlers, /* handlers */
|
imap_handlers, /* handlers */
|
||||||
NULL /* register hooks */
|
NULL /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -75,12 +75,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
array_header *language_priority;
|
ap_array_header_t *language_priority;
|
||||||
} neg_dir_config;
|
} neg_dir_config;
|
||||||
|
|
||||||
module MODULE_VAR_EXPORT negotiation_module;
|
module MODULE_VAR_EXPORT negotiation_module;
|
||||||
|
|
||||||
static void *create_neg_dir_config(pool *p, char *dummy)
|
static void *create_neg_dir_config(ap_context_t *p, char *dummy)
|
||||||
{
|
{
|
||||||
neg_dir_config *new = (neg_dir_config *) ap_palloc(p, sizeof(neg_dir_config));
|
neg_dir_config *new = (neg_dir_config *) ap_palloc(p, sizeof(neg_dir_config));
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ static void *create_neg_dir_config(pool *p, char *dummy)
|
|||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_neg_dir_configs(pool *p, void *basev, void *addv)
|
static void *merge_neg_dir_configs(ap_context_t *p, void *basev, void *addv)
|
||||||
{
|
{
|
||||||
neg_dir_config *base = (neg_dir_config *) basev;
|
neg_dir_config *base = (neg_dir_config *) basev;
|
||||||
neg_dir_config *add = (neg_dir_config *) addv;
|
neg_dir_config *add = (neg_dir_config *) addv;
|
||||||
@@ -102,7 +102,7 @@ static void *merge_neg_dir_configs(pool *p, void *basev, void *addv)
|
|||||||
|
|
||||||
static const char *set_language_priority(cmd_parms *cmd, void *n, char *lang)
|
static const char *set_language_priority(cmd_parms *cmd, void *n, char *lang)
|
||||||
{
|
{
|
||||||
array_header *arr = ((neg_dir_config *) n)->language_priority;
|
ap_array_header_t *arr = ((neg_dir_config *) n)->language_priority;
|
||||||
char **langp = (char **) ap_push_array(arr);
|
char **langp = (char **) ap_push_array(arr);
|
||||||
|
|
||||||
*langp = lang;
|
*langp = lang;
|
||||||
@@ -169,7 +169,7 @@ typedef struct var_rec {
|
|||||||
char *mime_type; /* MUST be lowercase */
|
char *mime_type; /* MUST be lowercase */
|
||||||
char *file_name;
|
char *file_name;
|
||||||
const char *content_encoding;
|
const char *content_encoding;
|
||||||
array_header *content_languages; /* list of languages for this variant */
|
ap_array_header_t *content_languages; /* list of languages for this variant */
|
||||||
char *content_charset;
|
char *content_charset;
|
||||||
char *description;
|
char *description;
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ typedef struct var_rec {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
pool *pool;
|
ap_context_t *pool;
|
||||||
request_rec *r;
|
request_rec *r;
|
||||||
char *dir_name;
|
char *dir_name;
|
||||||
int accept_q; /* 1 if an Accept item has a q= param */
|
int accept_q; /* 1 if an Accept item has a q= param */
|
||||||
@@ -217,12 +217,12 @@ typedef struct {
|
|||||||
/* the array pointers below are NULL if the corresponding accept
|
/* the array pointers below are NULL if the corresponding accept
|
||||||
* headers are not present
|
* headers are not present
|
||||||
*/
|
*/
|
||||||
array_header *accepts; /* accept_recs */
|
ap_array_header_t *accepts; /* accept_recs */
|
||||||
array_header *accept_encodings; /* accept_recs */
|
ap_array_header_t *accept_encodings; /* accept_recs */
|
||||||
array_header *accept_charsets; /* accept_recs */
|
ap_array_header_t *accept_charsets; /* accept_recs */
|
||||||
array_header *accept_langs; /* accept_recs */
|
ap_array_header_t *accept_langs; /* accept_recs */
|
||||||
|
|
||||||
array_header *avail_vars; /* available variants */
|
ap_array_header_t *avail_vars; /* available variants */
|
||||||
|
|
||||||
int count_multiviews_variants; /* number of variants found on disk */
|
int count_multiviews_variants; /* number of variants found on disk */
|
||||||
|
|
||||||
@@ -310,7 +310,7 @@ static void set_vlist_validator(request_rec *r, request_rec *vlistr)
|
|||||||
* enter the values we recognize into the argument accept_rec
|
* enter the values we recognize into the argument accept_rec
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static const char *get_entry(pool *p, accept_rec *result,
|
static const char *get_entry(ap_context_t *p, accept_rec *result,
|
||||||
const char *accept_line)
|
const char *accept_line)
|
||||||
{
|
{
|
||||||
result->quality = 1.0f;
|
result->quality = 1.0f;
|
||||||
@@ -329,8 +329,8 @@ static const char *get_entry(pool *p, accept_rec *result,
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
result->name = ap_get_token(p, &accept_line, 0);
|
result->name = ap_get_token(p, &accept_line, 0);
|
||||||
ap_str_tolower(result->name); /* You want case-insensitive,
|
ap_str_tolower(result->name); /* You want case ap_context_t nsensitive,
|
||||||
* you'll *get* case-insensitive.
|
* you'll *get* case ap_context_t nsensitive.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* KLUDGE!!! Default HTML to level 2.0 unless the browser
|
/* KLUDGE!!! Default HTML to level 2.0 unless the browser
|
||||||
@@ -417,9 +417,9 @@ static const char *get_entry(pool *p, accept_rec *result,
|
|||||||
* where charset is only valid in Accept.
|
* where charset is only valid in Accept.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static array_header *do_header_line(pool *p, const char *accept_line)
|
static ap_array_header_t *do_header_line(ap_context_t *p, const char *accept_line)
|
||||||
{
|
{
|
||||||
array_header *accept_recs;
|
ap_array_header_t *accept_recs;
|
||||||
|
|
||||||
if (!accept_line) {
|
if (!accept_line) {
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -439,9 +439,9 @@ static array_header *do_header_line(pool *p, const char *accept_line)
|
|||||||
* return an array containing the languages of this variant
|
* return an array containing the languages of this variant
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static array_header *do_languages_line(pool *p, const char **lang_line)
|
static ap_array_header_t *do_languages_line(ap_context_t *p, const char **lang_line)
|
||||||
{
|
{
|
||||||
array_header *lang_recs = ap_make_array(p, 2, sizeof(char *));
|
ap_array_header_t *lang_recs = ap_make_array(p, 2, sizeof(char *));
|
||||||
|
|
||||||
if (!lang_line) {
|
if (!lang_line) {
|
||||||
return lang_recs;
|
return lang_recs;
|
||||||
@@ -469,7 +469,7 @@ static negotiation_state *parse_accept_headers(request_rec *r)
|
|||||||
negotiation_state *new =
|
negotiation_state *new =
|
||||||
(negotiation_state *) ap_pcalloc(r->pool, sizeof(negotiation_state));
|
(negotiation_state *) ap_pcalloc(r->pool, sizeof(negotiation_state));
|
||||||
accept_rec *elts;
|
accept_rec *elts;
|
||||||
table *hdrs = r->headers_in;
|
ap_table_t *hdrs = r->headers_in;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
new->pool = r->pool;
|
new->pool = r->pool;
|
||||||
@@ -1139,7 +1139,7 @@ static int level_cmp(var_rec *var1, var_rec *var2)
|
|||||||
* to set lang_index.
|
* to set lang_index.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int find_lang_index(array_header *accept_langs, char *lang)
|
static int find_lang_index(ap_array_header_t *accept_langs, char *lang)
|
||||||
{
|
{
|
||||||
accept_rec *accs;
|
accept_rec *accs;
|
||||||
int i;
|
int i;
|
||||||
@@ -1166,7 +1166,7 @@ static int find_lang_index(array_header *accept_langs, char *lang)
|
|||||||
|
|
||||||
static int find_default_index(neg_dir_config *conf, char *lang)
|
static int find_default_index(neg_dir_config *conf, char *lang)
|
||||||
{
|
{
|
||||||
array_header *arr;
|
ap_array_header_t *arr;
|
||||||
int nelts;
|
int nelts;
|
||||||
char **elts;
|
char **elts;
|
||||||
int i;
|
int i;
|
||||||
@@ -2030,7 +2030,7 @@ static int best_match(negotiation_state *neg, var_rec **pbest)
|
|||||||
static void set_neg_headers(request_rec *r, negotiation_state *neg,
|
static void set_neg_headers(request_rec *r, negotiation_state *neg,
|
||||||
int alg_result)
|
int alg_result)
|
||||||
{
|
{
|
||||||
table *hdrs;
|
ap_table_t *hdrs;
|
||||||
var_rec *avail_recs = (var_rec *) neg->avail_vars->elts;
|
var_rec *avail_recs = (var_rec *) neg->avail_vars->elts;
|
||||||
const char *sample_type = NULL;
|
const char *sample_type = NULL;
|
||||||
const char *sample_language = NULL;
|
const char *sample_language = NULL;
|
||||||
@@ -2040,7 +2040,7 @@ static void set_neg_headers(request_rec *r, negotiation_state *neg,
|
|||||||
char *qstr;
|
char *qstr;
|
||||||
char *lenstr;
|
char *lenstr;
|
||||||
long len;
|
long len;
|
||||||
array_header *arr;
|
ap_array_header_t *arr;
|
||||||
int max_vlist_array = (neg->avail_vars->nelts * 21);
|
int max_vlist_array = (neg->avail_vars->nelts * 21);
|
||||||
int first_variant = 1;
|
int first_variant = 1;
|
||||||
int vary_by_type = 0;
|
int vary_by_type = 0;
|
||||||
@@ -2050,7 +2050,7 @@ static void set_neg_headers(request_rec *r, negotiation_state *neg,
|
|||||||
int j;
|
int j;
|
||||||
|
|
||||||
/* In order to avoid O(n^2) memory copies in building Alternates,
|
/* In order to avoid O(n^2) memory copies in building Alternates,
|
||||||
* we preallocate a table with the maximum substrings possible,
|
* we preallocate a ap_table_t with the maximum substrings possible,
|
||||||
* fill it with the variant list, and then concatenate the entire array.
|
* fill it with the variant list, and then concatenate the entire array.
|
||||||
* Note that if you change the number of substrings pushed, you also
|
* Note that if you change the number of substrings pushed, you also
|
||||||
* need to change the calculation of max_vlist_array above.
|
* need to change the calculation of max_vlist_array above.
|
||||||
@@ -2216,12 +2216,12 @@ static void set_neg_headers(request_rec *r, negotiation_state *neg,
|
|||||||
|
|
||||||
static char *make_variant_list(request_rec *r, negotiation_state *neg)
|
static char *make_variant_list(request_rec *r, negotiation_state *neg)
|
||||||
{
|
{
|
||||||
array_header *arr;
|
ap_array_header_t *arr;
|
||||||
int i;
|
int i;
|
||||||
int max_vlist_array = (neg->avail_vars->nelts * 15) + 2;
|
int max_vlist_array = (neg->avail_vars->nelts * 15) + 2;
|
||||||
|
|
||||||
/* In order to avoid O(n^2) memory copies in building the list,
|
/* In order to avoid O(n^2) memory copies in building the list,
|
||||||
* we preallocate a table with the maximum substrings possible,
|
* we preallocate a ap_table_t with the maximum substrings possible,
|
||||||
* fill it with the variant list, and then concatenate the entire array.
|
* fill it with the variant list, and then concatenate the entire array.
|
||||||
*/
|
*/
|
||||||
arr = ap_make_array(r->pool, max_vlist_array, sizeof(char *));
|
arr = ap_make_array(r->pool, max_vlist_array, sizeof(char *));
|
||||||
@@ -2231,7 +2231,7 @@ static char *make_variant_list(request_rec *r, negotiation_state *neg)
|
|||||||
for (i = 0; i < neg->avail_vars->nelts; ++i) {
|
for (i = 0; i < neg->avail_vars->nelts; ++i) {
|
||||||
var_rec *variant = &((var_rec *) neg->avail_vars->elts)[i];
|
var_rec *variant = &((var_rec *) neg->avail_vars->elts)[i];
|
||||||
char *filename = variant->file_name ? variant->file_name : "";
|
char *filename = variant->file_name ? variant->file_name : "";
|
||||||
array_header *languages = variant->content_languages;
|
ap_array_header_t *languages = variant->content_languages;
|
||||||
char *description = variant->description ? variant->description : "";
|
char *description = variant->description ? variant->description : "";
|
||||||
|
|
||||||
/* The format isn't very neat, and it would be nice to make
|
/* The format isn't very neat, and it would be nice to make
|
||||||
@@ -2677,7 +2677,7 @@ static int fix_encoding(request_rec *r)
|
|||||||
{
|
{
|
||||||
const char *enc = r->content_encoding;
|
const char *enc = r->content_encoding;
|
||||||
char *x_enc = NULL;
|
char *x_enc = NULL;
|
||||||
array_header *accept_encodings;
|
ap_array_header_t *accept_encodings;
|
||||||
accept_rec *accept_recs;
|
accept_rec *accept_recs;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -2737,7 +2737,7 @@ module MODULE_VAR_EXPORT negotiation_module =
|
|||||||
merge_neg_dir_configs, /* dir merger --- default is to override */
|
merge_neg_dir_configs, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
negotiation_cmds, /* command table */
|
negotiation_cmds, /* command ap_table_t */
|
||||||
negotiation_handlers, /* handlers */
|
negotiation_handlers, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -153,7 +153,7 @@
|
|||||||
* MODULE-DEFINITION-END
|
* MODULE-DEFINITION-END
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* the table of commands we provide */
|
/* the ap_table_t of commands we provide */
|
||||||
static const command_rec command_table[] = {
|
static const command_rec command_table[] = {
|
||||||
{ "RewriteEngine", cmd_rewriteengine, NULL, OR_FILEINFO, FLAG,
|
{ "RewriteEngine", cmd_rewriteengine, NULL, OR_FILEINFO, FLAG,
|
||||||
"On or Off to enable or disable (default) the whole rewriting engine" },
|
"On or Off to enable or disable (default) the whole rewriting engine" },
|
||||||
@@ -177,7 +177,7 @@ static const command_rec command_table[] = {
|
|||||||
{ NULL }
|
{ NULL }
|
||||||
};
|
};
|
||||||
|
|
||||||
/* the table of content handlers we provide */
|
/* the ap_table_t of content handlers we provide */
|
||||||
static const handler_rec handler_table[] = {
|
static const handler_rec handler_table[] = {
|
||||||
{ "redirect-handler", handler_redirect },
|
{ "redirect-handler", handler_redirect },
|
||||||
{ NULL }
|
{ NULL }
|
||||||
@@ -191,7 +191,7 @@ module MODULE_VAR_EXPORT rewrite_module = {
|
|||||||
config_perdir_merge, /* merge per-dir config structures */
|
config_perdir_merge, /* merge per-dir config structures */
|
||||||
config_server_create, /* create per-server config structures */
|
config_server_create, /* create per-server config structures */
|
||||||
config_server_merge, /* merge per-server config structures */
|
config_server_merge, /* merge per-server config structures */
|
||||||
command_table, /* table of config file commands */
|
command_table, /* ap_table_t of config file commands */
|
||||||
handler_table, /* [#8] MIME-typed-dispatched handlers */
|
handler_table, /* [#8] MIME-typed-dispatched handlers */
|
||||||
hook_uri2file, /* [#1] URI to filename translation */
|
hook_uri2file, /* [#1] URI to filename translation */
|
||||||
NULL, /* [#4] validate user id from request */
|
NULL, /* [#4] validate user id from request */
|
||||||
@@ -229,7 +229,7 @@ static int lockfd = -1;
|
|||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void *config_server_create(pool *p, server_rec *s)
|
static void *config_server_create(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
rewrite_server_conf *a;
|
rewrite_server_conf *a;
|
||||||
|
|
||||||
@@ -248,7 +248,7 @@ static void *config_server_create(pool *p, server_rec *s)
|
|||||||
return (void *)a;
|
return (void *)a;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *config_server_merge(pool *p, void *basev, void *overridesv)
|
static void *config_server_merge(ap_context_t *p, void *basev, void *overridesv)
|
||||||
{
|
{
|
||||||
rewrite_server_conf *a, *base, *overrides;
|
rewrite_server_conf *a, *base, *overrides;
|
||||||
|
|
||||||
@@ -304,7 +304,7 @@ static void *config_server_merge(pool *p, void *basev, void *overridesv)
|
|||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void *config_perdir_create(pool *p, char *path)
|
static void *config_perdir_create(ap_context_t *p, char *path)
|
||||||
{
|
{
|
||||||
rewrite_perdir_conf *a;
|
rewrite_perdir_conf *a;
|
||||||
|
|
||||||
@@ -332,7 +332,7 @@ static void *config_perdir_create(pool *p, char *path)
|
|||||||
return (void *)a;
|
return (void *)a;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *config_perdir_merge(pool *p, void *basev, void *overridesv)
|
static void *config_perdir_merge(ap_context_t *p, void *basev, void *overridesv)
|
||||||
{
|
{
|
||||||
rewrite_perdir_conf *a, *base, *overrides;
|
rewrite_perdir_conf *a, *base, *overrides;
|
||||||
|
|
||||||
@@ -407,7 +407,7 @@ static const char *cmd_rewriteoptions(cmd_parms *cmd,
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *cmd_rewriteoptions_setoption(pool *p, int *options,
|
static const char *cmd_rewriteoptions_setoption(ap_context_t *p, int *options,
|
||||||
char *name)
|
char *name)
|
||||||
{
|
{
|
||||||
if (strcasecmp(name, "inherit") == 0) {
|
if (strcasecmp(name, "inherit") == 0) {
|
||||||
@@ -605,7 +605,7 @@ static const char *cmd_rewritecond(cmd_parms *cmd, rewrite_perdir_conf *dconf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* now be careful: Under the POSIX regex library
|
/* now be careful: Under the POSIX regex library
|
||||||
we can compile the pattern for case-insensitive matching,
|
we can compile the pattern for case ap_context_t nsensitive matching,
|
||||||
under the old V8 library we have to do it self via a hack */
|
under the old V8 library we have to do it self via a hack */
|
||||||
if (new->flags & CONDFLAG_NOCASE) {
|
if (new->flags & CONDFLAG_NOCASE) {
|
||||||
rc = ((regexp = ap_pregcomp(cmd->pool, cp, REG_EXTENDED|REG_ICASE))
|
rc = ((regexp = ap_pregcomp(cmd->pool, cp, REG_EXTENDED|REG_ICASE))
|
||||||
@@ -626,7 +626,7 @@ static const char *cmd_rewritecond(cmd_parms *cmd, rewrite_perdir_conf *dconf,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *cmd_rewritecond_parseflagfield(pool *p,
|
static const char *cmd_rewritecond_parseflagfield(ap_context_t *p,
|
||||||
rewritecond_entry *cfg,
|
rewritecond_entry *cfg,
|
||||||
char *str)
|
char *str)
|
||||||
{
|
{
|
||||||
@@ -678,7 +678,7 @@ static const char *cmd_rewritecond_parseflagfield(pool *p,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *cmd_rewritecond_setflag(pool *p, rewritecond_entry *cfg,
|
static const char *cmd_rewritecond_setflag(ap_context_t *p, rewritecond_entry *cfg,
|
||||||
char *key, char *val)
|
char *key, char *val)
|
||||||
{
|
{
|
||||||
if ( strcasecmp(key, "nocase") == 0
|
if ( strcasecmp(key, "nocase") == 0
|
||||||
@@ -782,7 +782,7 @@ static const char *cmd_rewriterule(cmd_parms *cmd, rewrite_perdir_conf *dconf,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *cmd_rewriterule_parseflagfield(pool *p,
|
static const char *cmd_rewriterule_parseflagfield(ap_context_t *p,
|
||||||
rewriterule_entry *cfg,
|
rewriterule_entry *cfg,
|
||||||
char *str)
|
char *str)
|
||||||
{
|
{
|
||||||
@@ -834,7 +834,7 @@ static const char *cmd_rewriterule_parseflagfield(pool *p,
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *cmd_rewriterule_setflag(pool *p, rewriterule_entry *cfg,
|
static const char *cmd_rewriterule_setflag(ap_context_t *p, rewriterule_entry *cfg,
|
||||||
char *key, char *val)
|
char *key, char *val)
|
||||||
{
|
{
|
||||||
int status = 0;
|
int status = 0;
|
||||||
@@ -939,7 +939,7 @@ static const char *cmd_rewriterule_setflag(pool *p, rewriterule_entry *cfg,
|
|||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void init_module(server_rec *s, pool *p)
|
static void init_module(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
/* check if proxy module is available */
|
/* check if proxy module is available */
|
||||||
proxy_available = (ap_find_linked_module("mod_proxy.c") != NULL);
|
proxy_available = (ap_find_linked_module("mod_proxy.c") != NULL);
|
||||||
@@ -966,7 +966,7 @@ static void init_module(server_rec *s, pool *p)
|
|||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void init_child(server_rec *s, pool *p)
|
static void init_child(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
/* open the rewriting lockfile */
|
/* open the rewriting lockfile */
|
||||||
rewritelock_open(s, p);
|
rewritelock_open(s, p);
|
||||||
@@ -1595,7 +1595,7 @@ static int handler_redirect(request_rec *r)
|
|||||||
* Apply a complete rule set,
|
* Apply a complete rule set,
|
||||||
* i.e. a list of rewrite rules
|
* i.e. a list of rewrite rules
|
||||||
*/
|
*/
|
||||||
static int apply_rewrite_list(request_rec *r, array_header *rewriterules,
|
static int apply_rewrite_list(request_rec *r, ap_array_header_t *rewriterules,
|
||||||
char *perdir)
|
char *perdir)
|
||||||
{
|
{
|
||||||
rewriterule_entry *entries;
|
rewriterule_entry *entries;
|
||||||
@@ -1740,7 +1740,7 @@ static int apply_rewrite_rule(request_rec *r, rewriterule_entry *p,
|
|||||||
backrefinfo *briRC = NULL;
|
backrefinfo *briRC = NULL;
|
||||||
int prefixstrip;
|
int prefixstrip;
|
||||||
int failed;
|
int failed;
|
||||||
array_header *rewriteconds;
|
ap_array_header_t *rewriteconds;
|
||||||
rewritecond_entry *conds;
|
rewritecond_entry *conds;
|
||||||
rewritecond_entry *c;
|
rewritecond_entry *c;
|
||||||
int i;
|
int i;
|
||||||
@@ -1758,7 +1758,7 @@ static int apply_rewrite_rule(request_rec *r, rewriterule_entry *p,
|
|||||||
* make sure we really match against the complete URL.
|
* make sure we really match against the complete URL.
|
||||||
*/
|
*/
|
||||||
if (perdir != NULL && r->path_info != NULL && r->path_info[0] != '\0') {
|
if (perdir != NULL && r->path_info != NULL && r->path_info[0] != '\0') {
|
||||||
rewritelog(r, 3, "[per-dir %s] add path-info postfix: %s -> %s%s",
|
rewritelog(r, 3, "[per-dir %s] add path ap_context_t nfo postfix: %s -> %s%s",
|
||||||
perdir, uri, uri, r->path_info);
|
perdir, uri, uri, r->path_info);
|
||||||
uri = ap_pstrcat(r->pool, uri, r->path_info, NULL);
|
uri = ap_pstrcat(r->pool, uri, r->path_info, NULL);
|
||||||
}
|
}
|
||||||
@@ -2467,7 +2467,7 @@ static void fully_qualify_uri(request_rec *r)
|
|||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void expand_backref_inbuffer(pool *p, char *buf, int nbuf,
|
static void expand_backref_inbuffer(ap_context_t *p, char *buf, int nbuf,
|
||||||
backrefinfo *bri, char c)
|
backrefinfo *bri, char c)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -2675,7 +2675,7 @@ static char *lookup_map(request_rec *r, char *name, char *key)
|
|||||||
{
|
{
|
||||||
void *sconf;
|
void *sconf;
|
||||||
rewrite_server_conf *conf;
|
rewrite_server_conf *conf;
|
||||||
array_header *rewritemaps;
|
ap_array_header_t *rewritemaps;
|
||||||
rewritemap_entry *entries;
|
rewritemap_entry *entries;
|
||||||
rewritemap_entry *s;
|
rewritemap_entry *s;
|
||||||
char *value;
|
char *value;
|
||||||
@@ -3081,7 +3081,7 @@ static char *select_random_value_part(request_rec *r, char *value)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
static void open_rewritelog(server_rec *s, pool *p)
|
static void open_rewritelog(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
rewrite_server_conf *conf;
|
rewrite_server_conf *conf;
|
||||||
char *fname;
|
char *fname;
|
||||||
@@ -3251,7 +3251,7 @@ static char *current_logtime(request_rec *r)
|
|||||||
#define REWRITELOCK_MODE ( S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH )
|
#define REWRITELOCK_MODE ( S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void rewritelock_create(server_rec *s, pool *p)
|
static void rewritelock_create(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
rewrite_server_conf *conf;
|
rewrite_server_conf *conf;
|
||||||
|
|
||||||
@@ -3283,7 +3283,7 @@ static void rewritelock_create(server_rec *s, pool *p)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void rewritelock_open(server_rec *s, pool *p)
|
static void rewritelock_open(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
rewrite_server_conf *conf;
|
rewrite_server_conf *conf;
|
||||||
|
|
||||||
@@ -3343,13 +3343,13 @@ static void rewritelock_free(request_rec *r)
|
|||||||
** +-------------------------------------------------------+
|
** +-------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void run_rewritemap_programs(server_rec *s, pool *p)
|
static void run_rewritemap_programs(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
rewrite_server_conf *conf;
|
rewrite_server_conf *conf;
|
||||||
FILE *fpin;
|
FILE *fpin;
|
||||||
FILE *fpout;
|
FILE *fpout;
|
||||||
FILE *fperr;
|
FILE *fperr;
|
||||||
array_header *rewritemaps;
|
ap_array_header_t *rewritemaps;
|
||||||
rewritemap_entry *entries;
|
rewritemap_entry *entries;
|
||||||
rewritemap_entry *map;
|
rewritemap_entry *map;
|
||||||
int i;
|
int i;
|
||||||
@@ -3689,7 +3689,7 @@ static char *lookup_variable(request_rec *r, char *var)
|
|||||||
rsub = subrecfunc(r->filename, r); \
|
rsub = subrecfunc(r->filename, r); \
|
||||||
/* now recursively lookup the variable in the sub_req */ \
|
/* now recursively lookup the variable in the sub_req */ \
|
||||||
result = lookup_variable(rsub, var+5); \
|
result = lookup_variable(rsub, var+5); \
|
||||||
/* copy it up to our scope before we destroy sub_req's pool */ \
|
/* copy it up to our scope before we destroy sub_req's ap_context_t */ \
|
||||||
result = ap_pstrdup(r->pool, result); \
|
result = ap_pstrdup(r->pool, result); \
|
||||||
/* cleanup by destroying the subrequest */ \
|
/* cleanup by destroying the subrequest */ \
|
||||||
ap_destroy_sub_req(rsub); \
|
ap_destroy_sub_req(rsub); \
|
||||||
@@ -3756,7 +3756,7 @@ static char *lookup_variable(request_rec *r, char *var)
|
|||||||
|
|
||||||
static char *lookup_header(request_rec *r, const char *name)
|
static char *lookup_header(request_rec *r, const char *name)
|
||||||
{
|
{
|
||||||
array_header *hdrs_arr;
|
ap_array_header_t *hdrs_arr;
|
||||||
table_entry *hdrs;
|
table_entry *hdrs;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -3786,7 +3786,7 @@ static char *lookup_header(request_rec *r, const char *name)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
static cache *init_cache(pool *p)
|
static cache *init_cache(ap_context_t *p)
|
||||||
{
|
{
|
||||||
cache *c;
|
cache *c;
|
||||||
|
|
||||||
|
@@ -115,7 +115,7 @@
|
|||||||
#include "http_vhost.h"
|
#include "http_vhost.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The key in the r->notes table wherein we store our accumulated
|
* The key in the r->notes ap_table_t wherein we store our accumulated
|
||||||
* Vary values, and the one used for per-condition checks in a chain.
|
* Vary values, and the one used for per-condition checks in a chain.
|
||||||
*/
|
*/
|
||||||
#define VARY_KEY "rewrite-Vary"
|
#define VARY_KEY "rewrite-Vary"
|
||||||
@@ -281,7 +281,7 @@ typedef struct {
|
|||||||
} rewritecond_entry;
|
} rewritecond_entry;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
array_header *rewriteconds; /* the corresponding RewriteCond entries */
|
ap_array_header_t *rewriteconds; /* the corresponding RewriteCond entries */
|
||||||
char *pattern; /* the RegExp pattern string */
|
char *pattern; /* the RegExp pattern string */
|
||||||
regex_t *regexp; /* the RegExp pattern compilation */
|
regex_t *regexp; /* the RegExp pattern compilation */
|
||||||
char *output; /* the Substitution string */
|
char *output; /* the Substitution string */
|
||||||
@@ -302,9 +302,9 @@ typedef struct {
|
|||||||
char *rewritelogfile; /* the RewriteLog filename */
|
char *rewritelogfile; /* the RewriteLog filename */
|
||||||
int rewritelogfp; /* the RewriteLog open filepointer */
|
int rewritelogfp; /* the RewriteLog open filepointer */
|
||||||
int rewriteloglevel; /* the RewriteLog level of verbosity */
|
int rewriteloglevel; /* the RewriteLog level of verbosity */
|
||||||
array_header *rewritemaps; /* the RewriteMap entries */
|
ap_array_header_t *rewritemaps; /* the RewriteMap entries */
|
||||||
array_header *rewriteconds; /* the RewriteCond entries (temporary) */
|
ap_array_header_t *rewriteconds; /* the RewriteCond entries (temporary) */
|
||||||
array_header *rewriterules; /* the RewriteRule entries */
|
ap_array_header_t *rewriterules; /* the RewriteRule entries */
|
||||||
server_rec *server; /* the corresponding server indicator */
|
server_rec *server; /* the corresponding server indicator */
|
||||||
} rewrite_server_conf;
|
} rewrite_server_conf;
|
||||||
|
|
||||||
@@ -315,15 +315,15 @@ typedef struct {
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
int state; /* the RewriteEngine state */
|
int state; /* the RewriteEngine state */
|
||||||
int options; /* the RewriteOption state */
|
int options; /* the RewriteOption state */
|
||||||
array_header *rewriteconds; /* the RewriteCond entries (temporary) */
|
ap_array_header_t *rewriteconds; /* the RewriteCond entries (temporary) */
|
||||||
array_header *rewriterules; /* the RewriteRule entries */
|
ap_array_header_t *rewriterules; /* the RewriteRule entries */
|
||||||
char *directory; /* the directory where it applies */
|
char *directory; /* the directory where it applies */
|
||||||
char *baseurl; /* the base-URL where it applies */
|
char *baseurl; /* the base-URL where it applies */
|
||||||
} rewrite_perdir_conf;
|
} rewrite_perdir_conf;
|
||||||
|
|
||||||
|
|
||||||
/* the cache structures,
|
/* the cache structures,
|
||||||
* a 4-way hash table with LRU functionality
|
* a 4-way hash ap_table_t with LRU functionality
|
||||||
*/
|
*/
|
||||||
typedef struct cacheentry {
|
typedef struct cacheentry {
|
||||||
time_t time;
|
time_t time;
|
||||||
@@ -337,13 +337,13 @@ typedef struct tlbentry {
|
|||||||
|
|
||||||
typedef struct cachelist {
|
typedef struct cachelist {
|
||||||
char *resource;
|
char *resource;
|
||||||
array_header *entries;
|
ap_array_header_t *entries;
|
||||||
array_header *tlb;
|
ap_array_header_t *tlb;
|
||||||
} cachelist;
|
} cachelist;
|
||||||
|
|
||||||
typedef struct cache {
|
typedef struct cache {
|
||||||
pool *pool;
|
ap_context_t *pool;
|
||||||
array_header *lists;
|
ap_array_header_t *lists;
|
||||||
} cache;
|
} cache;
|
||||||
|
|
||||||
|
|
||||||
@@ -364,10 +364,10 @@ typedef struct backrefinfo {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* config structure handling */
|
/* config structure handling */
|
||||||
static void *config_server_create(pool *p, server_rec *s);
|
static void *config_server_create(ap_context_t *p, server_rec *s);
|
||||||
static void *config_server_merge (pool *p, void *basev, void *overridesv);
|
static void *config_server_merge (ap_context_t *p, void *basev, void *overridesv);
|
||||||
static void *config_perdir_create(pool *p, char *path);
|
static void *config_perdir_create(ap_context_t *p, char *path);
|
||||||
static void *config_perdir_merge (pool *p, void *basev, void *overridesv);
|
static void *config_perdir_merge (ap_context_t *p, void *basev, void *overridesv);
|
||||||
|
|
||||||
/* config directive handling */
|
/* config directive handling */
|
||||||
static const char *cmd_rewriteengine(cmd_parms *cmd,
|
static const char *cmd_rewriteengine(cmd_parms *cmd,
|
||||||
@@ -375,7 +375,7 @@ static const char *cmd_rewriteengine(cmd_parms *cmd,
|
|||||||
static const char *cmd_rewriteoptions(cmd_parms *cmd,
|
static const char *cmd_rewriteoptions(cmd_parms *cmd,
|
||||||
rewrite_perdir_conf *dconf,
|
rewrite_perdir_conf *dconf,
|
||||||
char *option);
|
char *option);
|
||||||
static const char *cmd_rewriteoptions_setoption(pool *p, int *options,
|
static const char *cmd_rewriteoptions_setoption(ap_context_t *p, int *options,
|
||||||
char *name);
|
char *name);
|
||||||
static const char *cmd_rewritelog (cmd_parms *cmd, void *dconf, char *a1);
|
static const char *cmd_rewritelog (cmd_parms *cmd, void *dconf, char *a1);
|
||||||
static const char *cmd_rewriteloglevel(cmd_parms *cmd, void *dconf, char *a1);
|
static const char *cmd_rewriteloglevel(cmd_parms *cmd, void *dconf, char *a1);
|
||||||
@@ -386,22 +386,22 @@ static const char *cmd_rewritebase(cmd_parms *cmd, rewrite_perdir_conf *dconf,
|
|||||||
char *a1);
|
char *a1);
|
||||||
static const char *cmd_rewritecond(cmd_parms *cmd, rewrite_perdir_conf *dconf,
|
static const char *cmd_rewritecond(cmd_parms *cmd, rewrite_perdir_conf *dconf,
|
||||||
char *str);
|
char *str);
|
||||||
static const char *cmd_rewritecond_parseflagfield(pool *p,
|
static const char *cmd_rewritecond_parseflagfield(ap_context_t *p,
|
||||||
rewritecond_entry *new,
|
rewritecond_entry *new,
|
||||||
char *str);
|
char *str);
|
||||||
static const char *cmd_rewritecond_setflag(pool *p, rewritecond_entry *cfg,
|
static const char *cmd_rewritecond_setflag(ap_context_t *p, rewritecond_entry *cfg,
|
||||||
char *key, char *val);
|
char *key, char *val);
|
||||||
static const char *cmd_rewriterule(cmd_parms *cmd, rewrite_perdir_conf *dconf,
|
static const char *cmd_rewriterule(cmd_parms *cmd, rewrite_perdir_conf *dconf,
|
||||||
char *str);
|
char *str);
|
||||||
static const char *cmd_rewriterule_parseflagfield(pool *p,
|
static const char *cmd_rewriterule_parseflagfield(ap_context_t *p,
|
||||||
rewriterule_entry *new,
|
rewriterule_entry *new,
|
||||||
char *str);
|
char *str);
|
||||||
static const char *cmd_rewriterule_setflag(pool *p, rewriterule_entry *cfg,
|
static const char *cmd_rewriterule_setflag(ap_context_t *p, rewriterule_entry *cfg,
|
||||||
char *key, char *val);
|
char *key, char *val);
|
||||||
|
|
||||||
/* initialisation */
|
/* initialisation */
|
||||||
static void init_module(server_rec *s, pool *p);
|
static void init_module(server_rec *s, ap_context_t *p);
|
||||||
static void init_child(server_rec *s, pool *p);
|
static void init_child(server_rec *s, ap_context_t *p);
|
||||||
|
|
||||||
/* runtime hooks */
|
/* runtime hooks */
|
||||||
static int hook_uri2file (request_rec *r);
|
static int hook_uri2file (request_rec *r);
|
||||||
@@ -410,7 +410,7 @@ static int hook_fixup (request_rec *r);
|
|||||||
static int handler_redirect(request_rec *r);
|
static int handler_redirect(request_rec *r);
|
||||||
|
|
||||||
/* rewriting engine */
|
/* rewriting engine */
|
||||||
static int apply_rewrite_list(request_rec *r, array_header *rewriterules,
|
static int apply_rewrite_list(request_rec *r, ap_array_header_t *rewriterules,
|
||||||
char *perdir);
|
char *perdir);
|
||||||
static int apply_rewrite_rule(request_rec *r, rewriterule_entry *p,
|
static int apply_rewrite_rule(request_rec *r, rewriterule_entry *p,
|
||||||
char *perdir);
|
char *perdir);
|
||||||
@@ -422,7 +422,7 @@ static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p,
|
|||||||
static void splitout_queryargs(request_rec *r, int qsappend);
|
static void splitout_queryargs(request_rec *r, int qsappend);
|
||||||
static void fully_qualify_uri(request_rec *r);
|
static void fully_qualify_uri(request_rec *r);
|
||||||
static void reduce_uri(request_rec *r);
|
static void reduce_uri(request_rec *r);
|
||||||
static void expand_backref_inbuffer(pool *p, char *buf, int nbuf,
|
static void expand_backref_inbuffer(ap_context_t *p, char *buf, int nbuf,
|
||||||
backrefinfo *bri, char c);
|
backrefinfo *bri, char c);
|
||||||
static char *expand_tildepaths(request_rec *r, char *uri);
|
static char *expand_tildepaths(request_rec *r, char *uri);
|
||||||
static void expand_map_lookups(request_rec *r, char *uri, int uri_len);
|
static void expand_map_lookups(request_rec *r, char *uri, int uri_len);
|
||||||
@@ -447,20 +447,20 @@ static void rewrite_rand_init(void);
|
|||||||
static int rewrite_rand(int l, int h);
|
static int rewrite_rand(int l, int h);
|
||||||
|
|
||||||
/* rewriting logfile support */
|
/* rewriting logfile support */
|
||||||
static void open_rewritelog(server_rec *s, pool *p);
|
static void open_rewritelog(server_rec *s, ap_context_t *p);
|
||||||
static void rewritelog(request_rec *r, int level, const char *text, ...)
|
static void rewritelog(request_rec *r, int level, const char *text, ...)
|
||||||
__attribute__((format(printf,3,4)));
|
__attribute__((format(printf,3,4)));
|
||||||
static char *current_logtime(request_rec *r);
|
static char *current_logtime(request_rec *r);
|
||||||
|
|
||||||
/* rewriting lockfile support */
|
/* rewriting lockfile support */
|
||||||
static void rewritelock_create(server_rec *s, pool *p);
|
static void rewritelock_create(server_rec *s, ap_context_t *p);
|
||||||
static void rewritelock_open(server_rec *s, pool *p);
|
static void rewritelock_open(server_rec *s, ap_context_t *p);
|
||||||
static void rewritelock_remove(void *data);
|
static void rewritelock_remove(void *data);
|
||||||
static void rewritelock_alloc(request_rec *r);
|
static void rewritelock_alloc(request_rec *r);
|
||||||
static void rewritelock_free(request_rec *r);
|
static void rewritelock_free(request_rec *r);
|
||||||
|
|
||||||
/* program map support */
|
/* program map support */
|
||||||
static void run_rewritemap_programs(server_rec *s, pool *p);
|
static void run_rewritemap_programs(server_rec *s, ap_context_t *p);
|
||||||
static int rewritemap_program_child(void *cmd, child_info *pinfo);
|
static int rewritemap_program_child(void *cmd, child_info *pinfo);
|
||||||
|
|
||||||
/* env variable support */
|
/* env variable support */
|
||||||
@@ -470,7 +470,7 @@ static char *lookup_variable(request_rec *r, char *var);
|
|||||||
static char *lookup_header(request_rec *r, const char *name);
|
static char *lookup_header(request_rec *r, const char *name);
|
||||||
|
|
||||||
/* caching functions */
|
/* caching functions */
|
||||||
static cache *init_cache(pool *p);
|
static cache *init_cache(ap_context_t *p);
|
||||||
static char *get_cache_string(cache *c, char *res, int mode, time_t mtime,
|
static char *get_cache_string(cache *c, char *res, int mode, time_t mtime,
|
||||||
char *key);
|
char *key);
|
||||||
static void set_cache_string(cache *c, char *res, int mode, time_t mtime,
|
static void set_cache_string(cache *c, char *res, int mode, time_t mtime,
|
||||||
|
@@ -101,7 +101,7 @@
|
|||||||
* You can use this to dynamically change the capability of your server
|
* You can use this to dynamically change the capability of your server
|
||||||
* without bringing it down.
|
* without bringing it down.
|
||||||
*
|
*
|
||||||
* Because currently there is only limited built-in support in the Configure
|
* Because currently there is only limited built ap_context_t n support in the Configure
|
||||||
* script for creating the shared library files (`.so'), please consult your
|
* script for creating the shared library files (`.so'), please consult your
|
||||||
* vendors cc(1), ld(1) and dlopen(3) manpages to find out the appropriate
|
* vendors cc(1), ld(1) and dlopen(3) manpages to find out the appropriate
|
||||||
* compiler and linker flags and insert them manually into the Configuration
|
* compiler and linker flags and insert them manually into the Configuration
|
||||||
@@ -144,10 +144,10 @@ typedef struct moduleinfo {
|
|||||||
} moduleinfo;
|
} moduleinfo;
|
||||||
|
|
||||||
typedef struct so_server_conf {
|
typedef struct so_server_conf {
|
||||||
array_header *loaded_modules;
|
ap_array_header_t *loaded_modules;
|
||||||
} so_server_conf;
|
} so_server_conf;
|
||||||
|
|
||||||
static void *so_sconf_create(pool *p, server_rec *s)
|
static void *so_sconf_create(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
so_server_conf *soc;
|
so_server_conf *soc;
|
||||||
|
|
||||||
@@ -269,7 +269,7 @@ static const char *load_module(cmd_parms *cmd, void *dummy,
|
|||||||
ap_add_loaded_module(modp);
|
ap_add_loaded_module(modp);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Register a cleanup in the config pool (normally pconf). When
|
* Register a cleanup in the config ap_context_t (normally pconf). When
|
||||||
* we do a restart (or shutdown) this cleanup will cause the
|
* we do a restart (or shutdown) this cleanup will cause the
|
||||||
* shared object to be unloaded.
|
* shared object to be unloaded.
|
||||||
*/
|
*/
|
||||||
@@ -344,7 +344,7 @@ module MODULE_VAR_EXPORT so_module = {
|
|||||||
NULL, /* merge per-dir config */
|
NULL, /* merge per-dir config */
|
||||||
so_sconf_create, /* server config */
|
so_sconf_create, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
so_cmds, /* command table */
|
so_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
NULL, /* filename translation */
|
NULL, /* filename translation */
|
||||||
NULL, /* check_user_id */
|
NULL, /* check_user_id */
|
||||||
|
@@ -98,7 +98,7 @@ typedef struct {
|
|||||||
* bother to have such a function.
|
* bother to have such a function.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void *mkconfig(pool *p)
|
static void *mkconfig(ap_context_t *p)
|
||||||
{
|
{
|
||||||
spconfig *cfg = ap_pcalloc(p, sizeof(spconfig));
|
spconfig *cfg = ap_pcalloc(p, sizeof(spconfig));
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ static void *mkconfig(pool *p)
|
|||||||
* Respond to a callback to create configuration record for a server or
|
* Respond to a callback to create configuration record for a server or
|
||||||
* vhost environment.
|
* vhost environment.
|
||||||
*/
|
*/
|
||||||
static void *create_mconfig_for_server(pool *p, server_rec *s)
|
static void *create_mconfig_for_server(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
return mkconfig(p);
|
return mkconfig(p);
|
||||||
}
|
}
|
||||||
@@ -118,7 +118,7 @@ static void *create_mconfig_for_server(pool *p, server_rec *s)
|
|||||||
/*
|
/*
|
||||||
* Respond to a callback to create a config record for a specific directory.
|
* Respond to a callback to create a config record for a specific directory.
|
||||||
*/
|
*/
|
||||||
static void *create_mconfig_for_directory(pool *p, char *dir)
|
static void *create_mconfig_for_directory(ap_context_t *p, char *dir)
|
||||||
{
|
{
|
||||||
return mkconfig(p);
|
return mkconfig(p);
|
||||||
}
|
}
|
||||||
@@ -231,7 +231,7 @@ static int check_speling(request_rec *r)
|
|||||||
int filoc, dotloc, urlen, pglen;
|
int filoc, dotloc, urlen, pglen;
|
||||||
DIR *dirp;
|
DIR *dirp;
|
||||||
struct DIR_TYPE *dir_entry;
|
struct DIR_TYPE *dir_entry;
|
||||||
array_header *candidates = NULL;
|
ap_array_header_t *candidates = NULL;
|
||||||
|
|
||||||
cfg = ap_get_module_config(r->per_dir_config, &speling_module);
|
cfg = ap_get_module_config(r->per_dir_config, &speling_module);
|
||||||
if (!cfg->enabled) {
|
if (!cfg->enabled) {
|
||||||
@@ -428,11 +428,11 @@ static int check_speling(request_rec *r)
|
|||||||
* returned.
|
* returned.
|
||||||
*/
|
*/
|
||||||
else {
|
else {
|
||||||
pool *p;
|
ap_context_t *p;
|
||||||
table *notes;
|
ap_table_t *notes;
|
||||||
pool *sub_pool;
|
ap_context_t *sub_pool;
|
||||||
array_header *t;
|
ap_array_header_t *t;
|
||||||
array_header *v;
|
ap_array_header_t *v;
|
||||||
|
|
||||||
|
|
||||||
if (r->main == NULL) {
|
if (r->main == NULL) {
|
||||||
@@ -514,7 +514,7 @@ static int check_speling(request_rec *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Pass our table to http_protocol.c (see mod_negotiation): */
|
/* Pass our ap_table_t to http_protocol.c (see mod_negotiation): */
|
||||||
ap_table_setn(notes, "variant-list", ap_array_pstrcat(p, t, 0));
|
ap_table_setn(notes, "variant-list", ap_array_pstrcat(p, t, 0));
|
||||||
|
|
||||||
ap_table_mergen(r->subprocess_env, "VARIANTS",
|
ap_table_mergen(r->subprocess_env, "VARIANTS",
|
||||||
@@ -544,7 +544,7 @@ module MODULE_VAR_EXPORT speling_module =
|
|||||||
NULL, /* merge per-dir config */
|
NULL, /* merge per-dir config */
|
||||||
create_mconfig_for_server, /* server config */
|
create_mconfig_for_server, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
speling_cmds, /* command table */
|
speling_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -99,8 +99,8 @@ module userdir_module;
|
|||||||
typedef struct userdir_config {
|
typedef struct userdir_config {
|
||||||
int globally_disabled;
|
int globally_disabled;
|
||||||
char *userdir;
|
char *userdir;
|
||||||
table *enabled_users;
|
ap_table_t *enabled_users;
|
||||||
table *disabled_users;
|
ap_table_t *disabled_users;
|
||||||
} userdir_config;
|
} userdir_config;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -109,7 +109,7 @@ typedef struct userdir_config {
|
|||||||
* explicit) disablement, and the replacement string for all others.
|
* explicit) disablement, and the replacement string for all others.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void *create_userdir_config(pool *p, server_rec *s)
|
static void *create_userdir_config(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
userdir_config
|
userdir_config
|
||||||
* newcfg = (userdir_config *) ap_pcalloc(p, sizeof(userdir_config));
|
* newcfg = (userdir_config *) ap_pcalloc(p, sizeof(userdir_config));
|
||||||
@@ -137,7 +137,7 @@ static const char *set_user_dir(cmd_parms *cmd, void *dummy, char *arg)
|
|||||||
const char
|
const char
|
||||||
*usernames = arg;
|
*usernames = arg;
|
||||||
char *kw = ap_getword_conf(cmd->pool, &usernames);
|
char *kw = ap_getword_conf(cmd->pool, &usernames);
|
||||||
table *usertable;
|
ap_table_t *usertable;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Let's do the comparisons once.
|
* Let's do the comparisons once.
|
||||||
@@ -340,7 +340,7 @@ module userdir_module = {
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
create_userdir_config, /* server config */
|
create_userdir_config, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
userdir_cmds, /* command table */
|
userdir_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -101,7 +101,7 @@ typedef struct mva_sconf_t {
|
|||||||
mva_mode_e cgi_root_mode;
|
mva_mode_e cgi_root_mode;
|
||||||
} mva_sconf_t;
|
} mva_sconf_t;
|
||||||
|
|
||||||
static void *mva_create_server_config(pool *p, server_rec *s)
|
static void *mva_create_server_config(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
mva_sconf_t *conf;
|
mva_sconf_t *conf;
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ static void *mva_create_server_config(pool *p, server_rec *s)
|
|||||||
return conf;
|
return conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *mva_merge_server_config(pool *p, void *parentv, void *childv)
|
static void *mva_merge_server_config(ap_context_t *p, void *parentv, void *childv)
|
||||||
{
|
{
|
||||||
mva_sconf_t *parent = (mva_sconf_t *) parentv;
|
mva_sconf_t *parent = (mva_sconf_t *) parentv;
|
||||||
mva_sconf_t *child = (mva_sconf_t *) childv;
|
mva_sconf_t *child = (mva_sconf_t *) childv;
|
||||||
@@ -466,7 +466,7 @@ module MODULE_VAR_EXPORT vhost_alias_module =
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
mva_create_server_config, /* server config */
|
mva_create_server_config, /* server config */
|
||||||
mva_merge_server_config, /* merge server configs */
|
mva_merge_server_config, /* merge server configs */
|
||||||
mva_commands, /* command table */
|
mva_commands, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
mva_translate, /* filename translation */
|
mva_translate, /* filename translation */
|
||||||
NULL, /* check_user_id */
|
NULL, /* check_user_id */
|
||||||
|
@@ -170,7 +170,7 @@ typedef struct {
|
|||||||
char *metafiles;
|
char *metafiles;
|
||||||
} cern_meta_dir_config;
|
} cern_meta_dir_config;
|
||||||
|
|
||||||
static void *create_cern_meta_dir_config(pool *p, char *dummy)
|
static void *create_cern_meta_dir_config(ap_context_t *p, char *dummy)
|
||||||
{
|
{
|
||||||
cern_meta_dir_config *new =
|
cern_meta_dir_config *new =
|
||||||
(cern_meta_dir_config *) ap_palloc(p, sizeof(cern_meta_dir_config));
|
(cern_meta_dir_config *) ap_palloc(p, sizeof(cern_meta_dir_config));
|
||||||
@@ -182,7 +182,7 @@ static void *create_cern_meta_dir_config(pool *p, char *dummy)
|
|||||||
return new;
|
return new;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_cern_meta_dir_configs(pool *p, void *basev, void *addv)
|
static void *merge_cern_meta_dir_configs(ap_context_t *p, void *basev, void *addv)
|
||||||
{
|
{
|
||||||
cern_meta_dir_config *base = (cern_meta_dir_config *) basev;
|
cern_meta_dir_config *base = (cern_meta_dir_config *) basev;
|
||||||
cern_meta_dir_config *add = (cern_meta_dir_config *) addv;
|
cern_meta_dir_config *add = (cern_meta_dir_config *) addv;
|
||||||
@@ -234,7 +234,7 @@ static int scan_meta_file(request_rec *r, FILE *f)
|
|||||||
char w[MAX_STRING_LEN];
|
char w[MAX_STRING_LEN];
|
||||||
char *l;
|
char *l;
|
||||||
int p;
|
int p;
|
||||||
table *tmp_headers;
|
ap_table_t *tmp_headers;
|
||||||
|
|
||||||
tmp_headers = ap_make_table(r->pool, 5);
|
tmp_headers = ap_make_table(r->pool, 5);
|
||||||
while (fgets(w, MAX_STRING_LEN - 1, f) != NULL) {
|
while (fgets(w, MAX_STRING_LEN - 1, f) != NULL) {
|
||||||
@@ -381,7 +381,7 @@ module MODULE_VAR_EXPORT cern_meta_module =
|
|||||||
merge_cern_meta_dir_configs,/* dir merger --- default is to override */
|
merge_cern_meta_dir_configs,/* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server configs */
|
NULL, /* merge server configs */
|
||||||
cern_meta_cmds, /* command table */
|
cern_meta_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -67,7 +67,7 @@
|
|||||||
* 08.Dec.95 Now allows PassEnv directive to appear more than once in
|
* 08.Dec.95 Now allows PassEnv directive to appear more than once in
|
||||||
* conf files.
|
* conf files.
|
||||||
* 10.Dec.95 optimisation. getenv() only called at startup and used
|
* 10.Dec.95 optimisation. getenv() only called at startup and used
|
||||||
* to build a fast-to-access table. table used to build
|
* to build a fast-to-access table. ap_table_t used to build
|
||||||
* per-server environment for each request.
|
* per-server environment for each request.
|
||||||
* robustness. better able to handle errors in configuration
|
* robustness. better able to handle errors in configuration
|
||||||
* files:
|
* files:
|
||||||
@@ -103,14 +103,14 @@
|
|||||||
#include "http_request.h"
|
#include "http_request.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
table *vars;
|
ap_table_t *vars;
|
||||||
char *unsetenv;
|
char *unsetenv;
|
||||||
int vars_present;
|
int vars_present;
|
||||||
} env_dir_config_rec;
|
} env_dir_config_rec;
|
||||||
|
|
||||||
module MODULE_VAR_EXPORT env_module;
|
module MODULE_VAR_EXPORT env_module;
|
||||||
|
|
||||||
static void *create_env_dir_config(pool *p, char *dummy)
|
static void *create_env_dir_config(ap_context_t *p, char *dummy)
|
||||||
{
|
{
|
||||||
env_dir_config_rec *new =
|
env_dir_config_rec *new =
|
||||||
(env_dir_config_rec *) ap_palloc(p, sizeof(env_dir_config_rec));
|
(env_dir_config_rec *) ap_palloc(p, sizeof(env_dir_config_rec));
|
||||||
@@ -120,16 +120,16 @@ static void *create_env_dir_config(pool *p, char *dummy)
|
|||||||
return (void *) new;
|
return (void *) new;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_env_dir_configs(pool *p, void *basev, void *addv)
|
static void *merge_env_dir_configs(ap_context_t *p, void *basev, void *addv)
|
||||||
{
|
{
|
||||||
env_dir_config_rec *base = (env_dir_config_rec *) basev;
|
env_dir_config_rec *base = (env_dir_config_rec *) basev;
|
||||||
env_dir_config_rec *add = (env_dir_config_rec *) addv;
|
env_dir_config_rec *add = (env_dir_config_rec *) addv;
|
||||||
env_dir_config_rec *new =
|
env_dir_config_rec *new =
|
||||||
(env_dir_config_rec *) ap_palloc(p, sizeof(env_dir_config_rec));
|
(env_dir_config_rec *) ap_palloc(p, sizeof(env_dir_config_rec));
|
||||||
|
|
||||||
table *new_table;
|
ap_table_t *new_table;
|
||||||
table_entry *elts;
|
ap_table_entry_t *elts;
|
||||||
array_header *arr;
|
ap_array_header_t *arr;
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
const char *uenv, *unset;
|
const char *uenv, *unset;
|
||||||
@@ -147,7 +147,7 @@ static void *merge_env_dir_configs(pool *p, void *basev, void *addv)
|
|||||||
new_table = ap_copy_table(p, base->vars);
|
new_table = ap_copy_table(p, base->vars);
|
||||||
|
|
||||||
arr = ap_table_elts(add->vars);
|
arr = ap_table_elts(add->vars);
|
||||||
elts = (table_entry *)arr->elts;
|
elts = (ap_table_entry_t *)arr->elts;
|
||||||
|
|
||||||
for (i = 0; i < arr->nelts; ++i) {
|
for (i = 0; i < arr->nelts; ++i) {
|
||||||
ap_table_setn(new_table, elts[i].key, elts[i].val);
|
ap_table_setn(new_table, elts[i].key, elts[i].val);
|
||||||
@@ -171,7 +171,7 @@ static const char *add_env_module_vars_passed(cmd_parms *cmd,
|
|||||||
env_dir_config_rec *sconf,
|
env_dir_config_rec *sconf,
|
||||||
const char *arg)
|
const char *arg)
|
||||||
{
|
{
|
||||||
table *vars = sconf->vars;
|
ap_table_t *vars = sconf->vars;
|
||||||
char *env_var;
|
char *env_var;
|
||||||
char *name_ptr;
|
char *name_ptr;
|
||||||
|
|
||||||
@@ -190,7 +190,7 @@ static const char *add_env_module_vars_set(cmd_parms *cmd,
|
|||||||
env_dir_config_rec *sconf,
|
env_dir_config_rec *sconf,
|
||||||
const char *arg)
|
const char *arg)
|
||||||
{
|
{
|
||||||
table *vars = sconf->vars;
|
ap_table_t *vars = sconf->vars;
|
||||||
char *name, *value;
|
char *name, *value;
|
||||||
|
|
||||||
name = ap_getword_conf(cmd->pool, &arg);
|
name = ap_getword_conf(cmd->pool, &arg);
|
||||||
@@ -234,10 +234,10 @@ static const command_rec env_module_cmds[] =
|
|||||||
|
|
||||||
static int fixup_env_module(request_rec *r)
|
static int fixup_env_module(request_rec *r)
|
||||||
{
|
{
|
||||||
table *e = r->subprocess_env;
|
ap_table_t *e = r->subprocess_env;
|
||||||
env_dir_config_rec *sconf = ap_get_module_config(r->per_dir_config,
|
env_dir_config_rec *sconf = ap_get_module_config(r->per_dir_config,
|
||||||
&env_module);
|
&env_module);
|
||||||
table *vars = sconf->vars;
|
ap_table_t *vars = sconf->vars;
|
||||||
|
|
||||||
if (!sconf->vars_present)
|
if (!sconf->vars_present)
|
||||||
return DECLINED;
|
return DECLINED;
|
||||||
@@ -260,7 +260,7 @@ module MODULE_VAR_EXPORT env_module =
|
|||||||
merge_env_dir_configs, /* dir merger --- default is to override */
|
merge_env_dir_configs, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server configs */
|
NULL, /* merge server configs */
|
||||||
env_module_cmds, /* command table */
|
env_module_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -200,7 +200,7 @@
|
|||||||
typedef struct {
|
typedef struct {
|
||||||
int active;
|
int active;
|
||||||
char *expiresdefault;
|
char *expiresdefault;
|
||||||
table *expiresbytype;
|
ap_table_t *expiresbytype;
|
||||||
} expires_dir_config;
|
} expires_dir_config;
|
||||||
|
|
||||||
/* from mod_dir, why is this alias used?
|
/* from mod_dir, why is this alias used?
|
||||||
@@ -213,7 +213,7 @@ typedef struct {
|
|||||||
|
|
||||||
module MODULE_VAR_EXPORT expires_module;
|
module MODULE_VAR_EXPORT expires_module;
|
||||||
|
|
||||||
static void *create_dir_expires_config(pool *p, char *dummy)
|
static void *create_dir_expires_config(ap_context_t *p, char *dummy)
|
||||||
{
|
{
|
||||||
expires_dir_config *new =
|
expires_dir_config *new =
|
||||||
(expires_dir_config *) ap_pcalloc(p, sizeof(expires_dir_config));
|
(expires_dir_config *) ap_pcalloc(p, sizeof(expires_dir_config));
|
||||||
@@ -239,7 +239,7 @@ static const char *set_expiresactive(cmd_parms *cmd, expires_dir_config * dir_co
|
|||||||
* string. If we return NULL then real_code contains code converted
|
* string. If we return NULL then real_code contains code converted
|
||||||
* to the cnnnn format.
|
* to the cnnnn format.
|
||||||
*/
|
*/
|
||||||
static char *check_code(pool *p, const char *code, char **real_code)
|
static char *check_code(ap_context_t *p, const char *code, char **real_code)
|
||||||
{
|
{
|
||||||
char *word;
|
char *word;
|
||||||
char base = 'X';
|
char base = 'X';
|
||||||
@@ -376,7 +376,7 @@ static const command_rec expires_cmds[] =
|
|||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void *merge_expires_dir_configs(pool *p, void *basev, void *addv)
|
static void *merge_expires_dir_configs(ap_context_t *p, void *basev, void *addv)
|
||||||
{
|
{
|
||||||
expires_dir_config *new = (expires_dir_config *) ap_pcalloc(p, sizeof(expires_dir_config));
|
expires_dir_config *new = (expires_dir_config *) ap_pcalloc(p, sizeof(expires_dir_config));
|
||||||
expires_dir_config *base = (expires_dir_config *) basev;
|
expires_dir_config *base = (expires_dir_config *) basev;
|
||||||
@@ -496,7 +496,7 @@ module MODULE_VAR_EXPORT expires_module =
|
|||||||
merge_expires_dir_configs, /* dir merger --- default is to override */
|
merge_expires_dir_configs, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server configs */
|
NULL, /* merge server configs */
|
||||||
expires_cmds, /* command table */
|
expires_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -122,12 +122,12 @@ typedef struct {
|
|||||||
* a per-dir and per-server config
|
* a per-dir and per-server config
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
array_header *headers;
|
ap_array_header_t *headers;
|
||||||
} headers_conf;
|
} headers_conf;
|
||||||
|
|
||||||
module MODULE_VAR_EXPORT headers_module;
|
module MODULE_VAR_EXPORT headers_module;
|
||||||
|
|
||||||
static void *create_headers_config(pool *p, server_rec *s)
|
static void *create_headers_config(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
headers_conf *a =
|
headers_conf *a =
|
||||||
(headers_conf *) ap_pcalloc(p, sizeof(headers_conf));
|
(headers_conf *) ap_pcalloc(p, sizeof(headers_conf));
|
||||||
@@ -136,12 +136,12 @@ static void *create_headers_config(pool *p, server_rec *s)
|
|||||||
return a;
|
return a;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *create_headers_dir_config(pool *p, char *d)
|
static void *create_headers_dir_config(ap_context_t *p, char *d)
|
||||||
{
|
{
|
||||||
return (headers_conf *) create_headers_config(p, NULL);
|
return (headers_conf *) create_headers_config(p, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_headers_config(pool *p, void *basev, void *overridesv)
|
static void *merge_headers_config(ap_context_t *p, void *basev, void *overridesv)
|
||||||
{
|
{
|
||||||
headers_conf *a =
|
headers_conf *a =
|
||||||
(headers_conf *) ap_pcalloc(p, sizeof(headers_conf));
|
(headers_conf *) ap_pcalloc(p, sizeof(headers_conf));
|
||||||
@@ -202,7 +202,7 @@ static const command_rec headers_cmds[] =
|
|||||||
{NULL}
|
{NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
static void do_headers_fixup(request_rec *r, array_header *headers)
|
static void do_headers_fixup(request_rec *r, ap_array_header_t *headers)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@@ -251,7 +251,7 @@ module MODULE_VAR_EXPORT headers_module =
|
|||||||
merge_headers_config, /* dir merger --- default is to override */
|
merge_headers_config, /* dir merger --- default is to override */
|
||||||
create_headers_config, /* server config */
|
create_headers_config, /* server config */
|
||||||
merge_headers_config, /* merge server configs */
|
merge_headers_config, /* merge server configs */
|
||||||
headers_cmds, /* command table */
|
headers_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -93,9 +93,9 @@
|
|||||||
*
|
*
|
||||||
* For compliance with Mr Darwin's terms: this has been very significantly
|
* For compliance with Mr Darwin's terms: this has been very significantly
|
||||||
* modified from the free "file" command.
|
* modified from the free "file" command.
|
||||||
* - all-in-one file for compilation convenience when moving from one
|
* - all ap_context_t n-one file for compilation convenience when moving from one
|
||||||
* version of Apache to the next.
|
* version of Apache to the next.
|
||||||
* - Memory allocation is done through the Apache API's pool structure.
|
* - Memory allocation is done through the Apache API's ap_context_t structure.
|
||||||
* - All functions have had necessary Apache API request or server
|
* - All functions have had necessary Apache API request or server
|
||||||
* structures passed to them where necessary to call other Apache API
|
* structures passed to them where necessary to call other Apache API
|
||||||
* routines. (i.e. usually for logging, files, or memory allocation in
|
* routines. (i.e. usually for logging, files, or memory allocation in
|
||||||
@@ -248,7 +248,7 @@ static int zmagic(request_rec *, unsigned char *, int);
|
|||||||
static int getvalue(server_rec *, struct magic *, char **);
|
static int getvalue(server_rec *, struct magic *, char **);
|
||||||
static int hextoint(int);
|
static int hextoint(int);
|
||||||
static char *getstr(server_rec *, char *, char *, int, int *);
|
static char *getstr(server_rec *, char *, char *, int, int *);
|
||||||
static int parse(server_rec *, pool *p, char *, int);
|
static int parse(server_rec *, ap_context_t *p, char *, int);
|
||||||
|
|
||||||
static int match(request_rec *, unsigned char *, int);
|
static int match(request_rec *, unsigned char *, int);
|
||||||
static int mget(request_rec *, union VALUETYPE *, unsigned char *,
|
static int mget(request_rec *, union VALUETYPE *, unsigned char *,
|
||||||
@@ -271,7 +271,7 @@ static int fsmagic(request_rec *r, const char *fn);
|
|||||||
* make HOWMANY too high unless you have a very fast CPU.
|
* make HOWMANY too high unless you have a very fast CPU.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* these types are used to index the table 'types': keep em in sync! */
|
/* these types are used to index the ap_table_t 'types': keep em in sync! */
|
||||||
/* HTML inserted in first because this is a web server module now */
|
/* HTML inserted in first because this is a web server module now */
|
||||||
#define L_HTML 0 /* HTML */
|
#define L_HTML 0 /* HTML */
|
||||||
#define L_C 1 /* first and foremost on UNIX */
|
#define L_C 1 /* first and foremost on UNIX */
|
||||||
@@ -498,13 +498,13 @@ typedef struct {
|
|||||||
|
|
||||||
module mime_magic_module;
|
module mime_magic_module;
|
||||||
|
|
||||||
static void *create_magic_server_config(pool *p, server_rec *d)
|
static void *create_magic_server_config(ap_context_t *p, server_rec *d)
|
||||||
{
|
{
|
||||||
/* allocate the config - use pcalloc because it needs to be zeroed */
|
/* allocate the config - use pcalloc because it needs to be zeroed */
|
||||||
return ap_pcalloc(p, sizeof(magic_server_config_rec));
|
return ap_pcalloc(p, sizeof(magic_server_config_rec));
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_magic_server_config(pool *p, void *basev, void *addv)
|
static void *merge_magic_server_config(ap_context_t *p, void *basev, void *addv)
|
||||||
{
|
{
|
||||||
magic_server_config_rec *base = (magic_server_config_rec *) basev;
|
magic_server_config_rec *base = (magic_server_config_rec *) basev;
|
||||||
magic_server_config_rec *add = (magic_server_config_rec *) addv;
|
magic_server_config_rec *add = (magic_server_config_rec *) addv;
|
||||||
@@ -931,7 +931,7 @@ static void tryit(request_rec *r, unsigned char *buf, int nb, int checkzmagic)
|
|||||||
* apprentice - load configuration from the magic file r
|
* apprentice - load configuration from the magic file r
|
||||||
* API request record
|
* API request record
|
||||||
*/
|
*/
|
||||||
static int apprentice(server_rec *s, pool *p)
|
static int apprentice(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char line[BUFSIZ + 1];
|
char line[BUFSIZ + 1];
|
||||||
@@ -1072,7 +1072,7 @@ static unsigned long signextend(server_rec *s, struct magic *m, unsigned long v)
|
|||||||
/*
|
/*
|
||||||
* parse one line from magic file, put into magic[index++] if valid
|
* parse one line from magic file, put into magic[index++] if valid
|
||||||
*/
|
*/
|
||||||
static int parse(server_rec *serv, pool *p, char *l, int lineno)
|
static int parse(server_rec *serv, ap_context_t *p, char *l, int lineno)
|
||||||
{
|
{
|
||||||
struct magic *m;
|
struct magic *m;
|
||||||
char *t, *s;
|
char *t, *s;
|
||||||
@@ -2172,7 +2172,7 @@ static int uncompress(request_rec *r, int method,
|
|||||||
{
|
{
|
||||||
struct uncompress_parms parm;
|
struct uncompress_parms parm;
|
||||||
BUFF *bout;
|
BUFF *bout;
|
||||||
pool *sub_pool;
|
ap_context_t *sub_pool;
|
||||||
|
|
||||||
parm.r = r;
|
parm.r = r;
|
||||||
parm.method = method;
|
parm.method = method;
|
||||||
@@ -2235,7 +2235,7 @@ static int is_tar(unsigned char *buf, int nbytes)
|
|||||||
|
|
||||||
sum = 0;
|
sum = 0;
|
||||||
p = header->charptr;
|
p = header->charptr;
|
||||||
for (i = sizeof(union record); --i >= 0;) {
|
for (i = sizeof(union record); - ap_context_t >= 0;) {
|
||||||
/*
|
/*
|
||||||
* We can't use unsigned char here because of old compilers, e.g. V7.
|
* We can't use unsigned char here because of old compilers, e.g. V7.
|
||||||
*/
|
*/
|
||||||
@@ -2243,7 +2243,7 @@ static int is_tar(unsigned char *buf, int nbytes)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Adjust checksum to count the "chksum" field as blanks. */
|
/* Adjust checksum to count the "chksum" field as blanks. */
|
||||||
for (i = sizeof(header->header.chksum); --i >= 0;)
|
for (i = sizeof(header->header.chksum); - ap_context_t >= 0;)
|
||||||
sum -= 0xFF & header->header.chksum[i];
|
sum -= 0xFF & header->header.chksum[i];
|
||||||
sum += ' ' * sizeof header->header.chksum;
|
sum += ' ' * sizeof header->header.chksum;
|
||||||
|
|
||||||
@@ -2351,7 +2351,7 @@ static int revision_suffix(request_rec *r)
|
|||||||
* initialize the module
|
* initialize the module
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void magic_init(server_rec *main_server, pool *p)
|
static void magic_init(server_rec *main_server, ap_context_t *p)
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
magic_server_config_rec *conf;
|
magic_server_config_rec *conf;
|
||||||
@@ -2451,7 +2451,7 @@ module mime_magic_module =
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
create_magic_server_config, /* server config */
|
create_magic_server_config, /* server config */
|
||||||
merge_magic_server_config, /* merge server config */
|
merge_magic_server_config, /* merge server config */
|
||||||
mime_magic_cmds, /* command table */
|
mime_magic_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
NULL, /* filename translation */
|
NULL, /* filename translation */
|
||||||
NULL, /* check_user_id */
|
NULL, /* check_user_id */
|
||||||
|
@@ -133,7 +133,7 @@ typedef struct {
|
|||||||
char *name; /* header name */
|
char *name; /* header name */
|
||||||
char *regex; /* regex to match against */
|
char *regex; /* regex to match against */
|
||||||
regex_t *preg; /* compiled regex */
|
regex_t *preg; /* compiled regex */
|
||||||
table *features; /* env vars to set (or unset) */
|
ap_table_t *features; /* env vars to set (or unset) */
|
||||||
ENUM_BITFIELD( /* is it a "special" header ? */
|
ENUM_BITFIELD( /* is it a "special" header ? */
|
||||||
enum special,
|
enum special,
|
||||||
special_type,4);
|
special_type,4);
|
||||||
@@ -141,12 +141,12 @@ typedef struct {
|
|||||||
} sei_entry;
|
} sei_entry;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
array_header *conditionals;
|
ap_array_header_t *conditionals;
|
||||||
} sei_cfg_rec;
|
} sei_cfg_rec;
|
||||||
|
|
||||||
module MODULE_VAR_EXPORT setenvif_module;
|
module MODULE_VAR_EXPORT setenvif_module;
|
||||||
|
|
||||||
static void *create_setenvif_config(pool *p, server_rec *dummy)
|
static void *create_setenvif_config(ap_context_t *p, server_rec *dummy)
|
||||||
{
|
{
|
||||||
sei_cfg_rec *new = (sei_cfg_rec *) ap_palloc(p, sizeof(sei_cfg_rec));
|
sei_cfg_rec *new = (sei_cfg_rec *) ap_palloc(p, sizeof(sei_cfg_rec));
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ static void *create_setenvif_config(pool *p, server_rec *dummy)
|
|||||||
return (void *) new;
|
return (void *) new;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *merge_setenvif_config(pool *p, void *basev, void *overridesv)
|
static void *merge_setenvif_config(ap_context_t *p, void *basev, void *overridesv)
|
||||||
{
|
{
|
||||||
sei_cfg_rec *a = ap_pcalloc(p, sizeof(sei_cfg_rec));
|
sei_cfg_rec *a = ap_pcalloc(p, sizeof(sei_cfg_rec));
|
||||||
sei_cfg_rec *base = basev, *overrides = overridesv;
|
sei_cfg_rec *base = basev, *overrides = overridesv;
|
||||||
@@ -323,7 +323,7 @@ static int match_headers(request_rec *r)
|
|||||||
server_rec *s = r->server;
|
server_rec *s = r->server;
|
||||||
sei_cfg_rec *sconf;
|
sei_cfg_rec *sconf;
|
||||||
sei_entry *entries;
|
sei_entry *entries;
|
||||||
table_entry *elts;
|
ap_table_entry_t *elts;
|
||||||
const char *val;
|
const char *val;
|
||||||
int i, j;
|
int i, j;
|
||||||
char *last_name;
|
char *last_name;
|
||||||
@@ -383,8 +383,8 @@ static int match_headers(request_rec *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!ap_regexec(b->preg, val, 0, NULL, 0)) {
|
if (!ap_regexec(b->preg, val, 0, NULL, 0)) {
|
||||||
array_header *arr = ap_table_elts(b->features);
|
ap_array_header_t *arr = ap_table_elts(b->features);
|
||||||
elts = (table_entry *) arr->elts;
|
elts = (ap_table_entry_t *) arr->elts;
|
||||||
|
|
||||||
for (j = 0; j < arr->nelts; ++j) {
|
for (j = 0; j < arr->nelts; ++j) {
|
||||||
if (!strcmp(elts[j].val, "!")) {
|
if (!strcmp(elts[j].val, "!")) {
|
||||||
@@ -412,7 +412,7 @@ module MODULE_VAR_EXPORT setenvif_module =
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
create_setenvif_config, /* server config */
|
create_setenvif_config, /* server config */
|
||||||
merge_setenvif_config, /* merge server configs */
|
merge_setenvif_config, /* merge server configs */
|
||||||
setenvif_module_cmds, /* command table */
|
setenvif_module_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -161,7 +161,7 @@ static unsigned short unique_id_rec_offset[UNIQUE_ID_REC_MAX],
|
|||||||
unique_id_rec_total_size,
|
unique_id_rec_total_size,
|
||||||
unique_id_rec_size_uu;
|
unique_id_rec_size_uu;
|
||||||
|
|
||||||
static void unique_id_global_init(server_rec *s, pool *p)
|
static void unique_id_global_init(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
#ifndef MAXHOSTNAMELEN
|
#ifndef MAXHOSTNAMELEN
|
||||||
#define MAXHOSTNAMELEN 256
|
#define MAXHOSTNAMELEN 256
|
||||||
@@ -245,7 +245,7 @@ static void unique_id_global_init(server_rec *s, pool *p)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void unique_id_child_init(server_rec *s, pool *p)
|
static void unique_id_child_init(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
#ifndef NO_GETTIMEOFDAY
|
#ifndef NO_GETTIMEOFDAY
|
||||||
@@ -400,7 +400,7 @@ module MODULE_VAR_EXPORT unique_id_module = {
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server configs */
|
NULL, /* merge server configs */
|
||||||
NULL, /* command table */
|
NULL, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
NULL, /* filename translation */
|
NULL, /* filename translation */
|
||||||
NULL, /* check_user_id */
|
NULL, /* check_user_id */
|
||||||
|
@@ -241,7 +241,7 @@ static int spot_cookie(request_rec *r)
|
|||||||
return OK; /* We set our cookie */
|
return OK; /* We set our cookie */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *make_cookie_log_state(pool *p, server_rec *s)
|
static void *make_cookie_log_state(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
cookie_log_state *cls =
|
cookie_log_state *cls =
|
||||||
(cookie_log_state *) ap_palloc(p, sizeof(cookie_log_state));
|
(cookie_log_state *) ap_palloc(p, sizeof(cookie_log_state));
|
||||||
@@ -251,7 +251,7 @@ static void *make_cookie_log_state(pool *p, server_rec *s)
|
|||||||
return (void *) cls;
|
return (void *) cls;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *make_cookie_dir(pool *p, char *d)
|
static void *make_cookie_dir(ap_context_t *p, char *d)
|
||||||
{
|
{
|
||||||
cookie_dir_rec *dcfg;
|
cookie_dir_rec *dcfg;
|
||||||
|
|
||||||
@@ -363,7 +363,7 @@ module MODULE_VAR_EXPORT usertrack_module = {
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
make_cookie_log_state, /* server config */
|
make_cookie_log_state, /* server config */
|
||||||
NULL, /* merge server configs */
|
NULL, /* merge server configs */
|
||||||
cookie_log_cmds, /* command table */
|
cookie_log_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
register_hooks /* register hooks */
|
register_hooks /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -233,7 +233,7 @@ static int proxy_fixup(request_rec *r)
|
|||||||
return OK; /* otherwise; we've done the best we can */
|
return OK; /* otherwise; we've done the best we can */
|
||||||
}
|
}
|
||||||
|
|
||||||
static void proxy_init(server_rec *r, pool *p)
|
static void proxy_init(server_rec *r, ap_context_t *p)
|
||||||
{
|
{
|
||||||
ap_proxy_garbage_init(r, p);
|
ap_proxy_garbage_init(r, p);
|
||||||
}
|
}
|
||||||
@@ -289,7 +289,7 @@ static int proxy_handler(request_rec *r)
|
|||||||
void *sconf = r->server->module_config;
|
void *sconf = r->server->module_config;
|
||||||
proxy_server_conf *conf =
|
proxy_server_conf *conf =
|
||||||
(proxy_server_conf *) ap_get_module_config(sconf, &proxy_module);
|
(proxy_server_conf *) ap_get_module_config(sconf, &proxy_module);
|
||||||
array_header *proxies = conf->proxies;
|
ap_array_header_t *proxies = conf->proxies;
|
||||||
struct proxy_remote *ents = (struct proxy_remote *) proxies->elts;
|
struct proxy_remote *ents = (struct proxy_remote *) proxies->elts;
|
||||||
int i, rc;
|
int i, rc;
|
||||||
cache_req *cr;
|
cache_req *cr;
|
||||||
@@ -404,7 +404,7 @@ static int proxy_handler(request_rec *r)
|
|||||||
/* Setup configurable data */
|
/* Setup configurable data */
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
create_proxy_config(pool *p, server_rec *s)
|
create_proxy_config(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
proxy_server_conf *ps = ap_pcalloc(p, sizeof(proxy_server_conf));
|
proxy_server_conf *ps = ap_pcalloc(p, sizeof(proxy_server_conf));
|
||||||
|
|
||||||
@@ -882,7 +882,7 @@ module MODULE_VAR_EXPORT proxy_module =
|
|||||||
NULL, /* merge per-directory config structures */
|
NULL, /* merge per-directory config structures */
|
||||||
create_proxy_config, /* create per-server config structure */
|
create_proxy_config, /* create per-server config structure */
|
||||||
NULL, /* merge per-server config structures */
|
NULL, /* merge per-server config structures */
|
||||||
proxy_cmds, /* command table */
|
proxy_cmds, /* command ap_table_t */
|
||||||
proxy_handlers, /* handlers */
|
proxy_handlers, /* handlers */
|
||||||
proxy_trans, /* translate_handler */
|
proxy_trans, /* translate_handler */
|
||||||
NULL, /* check_user_id */
|
NULL, /* check_user_id */
|
||||||
|
@@ -204,13 +204,13 @@ struct cache_conf {
|
|||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct cache_conf cache; /* cache configuration */
|
struct cache_conf cache; /* cache configuration */
|
||||||
array_header *proxies;
|
ap_array_header_t *proxies;
|
||||||
array_header *aliases;
|
ap_array_header_t *aliases;
|
||||||
array_header *raliases;
|
ap_array_header_t *raliases;
|
||||||
array_header *noproxies;
|
ap_array_header_t *noproxies;
|
||||||
array_header *dirconn;
|
ap_array_header_t *dirconn;
|
||||||
array_header *nocaches;
|
ap_array_header_t *nocaches;
|
||||||
array_header *allowed_connect_ports;
|
ap_array_header_t *allowed_connect_ports;
|
||||||
char *domain; /* domain name to use in absence of a domain name in the request */
|
char *domain; /* domain name to use in absence of a domain name in the request */
|
||||||
int req; /* true if proxy requests are enabled */
|
int req; /* true if proxy requests are enabled */
|
||||||
enum {
|
enum {
|
||||||
@@ -247,7 +247,7 @@ typedef struct {
|
|||||||
unsigned int written; /* total *content* bytes written to cache */
|
unsigned int written; /* total *content* bytes written to cache */
|
||||||
float cache_completion; /* specific to this request */
|
float cache_completion; /* specific to this request */
|
||||||
char *resp_line; /* the whole status like (protocol, code + message) */
|
char *resp_line; /* the whole status like (protocol, code + message) */
|
||||||
table *hdrs; /* the HTTP headers of the file */
|
ap_table_t *hdrs; /* the HTTP headers of the file */
|
||||||
} cache_req;
|
} cache_req;
|
||||||
|
|
||||||
/* Additional information passed to the function called by ap_table_do() */
|
/* Additional information passed to the function called by ap_table_do() */
|
||||||
@@ -263,7 +263,7 @@ struct tbl_do_args {
|
|||||||
void ap_proxy_cache_tidy(cache_req *c);
|
void ap_proxy_cache_tidy(cache_req *c);
|
||||||
int ap_proxy_cache_check(request_rec *r, char *url, struct cache_conf *conf,
|
int ap_proxy_cache_check(request_rec *r, char *url, struct cache_conf *conf,
|
||||||
cache_req **cr);
|
cache_req **cr);
|
||||||
int ap_proxy_cache_update(cache_req *c, table *resp_hdrs,
|
int ap_proxy_cache_update(cache_req *c, ap_table_t *resp_hdrs,
|
||||||
const int is_HTTP1, int nocache);
|
const int is_HTTP1, int nocache);
|
||||||
void ap_proxy_garbage_coll(request_rec *r);
|
void ap_proxy_garbage_coll(request_rec *r);
|
||||||
|
|
||||||
@@ -288,14 +288,14 @@ int ap_proxy_http_handler(request_rec *r, cache_req *c, char *url,
|
|||||||
|
|
||||||
int ap_proxy_hex2c(const char *x);
|
int ap_proxy_hex2c(const char *x);
|
||||||
void ap_proxy_c2hex(int ch, char *x);
|
void ap_proxy_c2hex(int ch, char *x);
|
||||||
char *ap_proxy_canonenc(pool *p, const char *x, int len, enum enctype t,
|
char *ap_proxy_canonenc(ap_context_t *p, const char *x, int len, enum enctype t,
|
||||||
int isenc);
|
int isenc);
|
||||||
char *ap_proxy_canon_netloc(pool *p, char **const urlp, char **userp,
|
char *ap_proxy_canon_netloc(ap_context_t *p, char **const urlp, char **userp,
|
||||||
char **passwordp, char **hostp, int *port);
|
char **passwordp, char **hostp, int *port);
|
||||||
const char *ap_proxy_date_canon(pool *p, const char *x);
|
const char *ap_proxy_date_canon(ap_context_t *p, const char *x);
|
||||||
table *ap_proxy_read_headers(request_rec *r, char *buffer, int size, BUFF *f);
|
table *ap_proxy_read_headers(request_rec *r, char *buffer, int size, BUFF *f);
|
||||||
long int ap_proxy_send_fb(BUFF *f, request_rec *r, cache_req *c);
|
long int ap_proxy_send_fb(BUFF *f, request_rec *r, cache_req *c);
|
||||||
void ap_proxy_send_headers(request_rec *r, const char *respline, table *hdrs);
|
void ap_proxy_send_headers(request_rec *r, const char *respline, ap_table_t *hdrs);
|
||||||
int ap_proxy_liststr(const char *list, const char *val);
|
int ap_proxy_liststr(const char *list, const char *val);
|
||||||
void ap_proxy_hash(const char *it, char *val, int ndepth, int nlength);
|
void ap_proxy_hash(const char *it, char *val, int ndepth, int nlength);
|
||||||
int ap_proxy_hex2sec(const char *x);
|
int ap_proxy_hex2sec(const char *x);
|
||||||
@@ -303,12 +303,12 @@ void ap_proxy_sec2hex(int t, char *y);
|
|||||||
cache_req *ap_proxy_cache_error(cache_req *r);
|
cache_req *ap_proxy_cache_error(cache_req *r);
|
||||||
int ap_proxyerror(request_rec *r, int statuscode, const char *message);
|
int ap_proxyerror(request_rec *r, int statuscode, const char *message);
|
||||||
const char *ap_proxy_host2addr(const char *host, struct hostent *reqhp);
|
const char *ap_proxy_host2addr(const char *host, struct hostent *reqhp);
|
||||||
int ap_proxy_is_ipaddr(struct dirconn_entry *This, pool *p);
|
int ap_proxy_is_ipaddr(struct dirconn_entry *This, ap_context_t *p);
|
||||||
int ap_proxy_is_domainname(struct dirconn_entry *This, pool *p);
|
int ap_proxy_is_domainname(struct dirconn_entry *This, ap_context_t *p);
|
||||||
int ap_proxy_is_hostname(struct dirconn_entry *This, pool *p);
|
int ap_proxy_is_hostname(struct dirconn_entry *This, ap_context_t *p);
|
||||||
int ap_proxy_is_word(struct dirconn_entry *This, pool *p);
|
int ap_proxy_is_word(struct dirconn_entry *This, ap_context_t *p);
|
||||||
int ap_proxy_doconnect(int sock, struct sockaddr_in *addr, request_rec *r);
|
int ap_proxy_doconnect(int sock, struct sockaddr_in *addr, request_rec *r);
|
||||||
int ap_proxy_garbage_init(server_rec *, pool *);
|
int ap_proxy_garbage_init(server_rec *, ap_context_t *);
|
||||||
/* This function is called by ap_table_do() for all header lines */
|
/* This function is called by ap_table_do() for all header lines */
|
||||||
int ap_proxy_send_hdr_line(void *p, const char *key, const char *value);
|
int ap_proxy_send_hdr_line(void *p, const char *key, const char *value);
|
||||||
unsigned ap_proxy_bputs2(const char *data, BUFF *client, cache_req *cache);
|
unsigned ap_proxy_bputs2(const char *data, BUFF *client, cache_req *cache);
|
||||||
|
@@ -118,7 +118,7 @@ static int ftp_check_string(const char *x)
|
|||||||
int ap_proxy_ftp_canon(request_rec *r, char *url)
|
int ap_proxy_ftp_canon(request_rec *r, char *url)
|
||||||
{
|
{
|
||||||
char *user, *password, *host, *path, *parms, *strp, sport[7];
|
char *user, *password, *host, *path, *parms, *strp, sport[7];
|
||||||
pool *p = r->pool;
|
ap_context_t *p = r->pool;
|
||||||
const char *err;
|
const char *err;
|
||||||
int port;
|
int port;
|
||||||
|
|
||||||
@@ -415,7 +415,7 @@ static long int send_dir(BUFF *f, request_rec *r, cache_req *c, char *cwd)
|
|||||||
* with username and password (which was presumably queried from the user)
|
* with username and password (which was presumably queried from the user)
|
||||||
* supplied in the Authorization: header.
|
* supplied in the Authorization: header.
|
||||||
* Note that we "invent" a realm name which consists of the
|
* Note that we "invent" a realm name which consists of the
|
||||||
* ftp://user@host part of the reqest (sans password -if supplied but invalid-)
|
* ftp://user@host part of the reqest (sans password ap_context_t f supplied but invalid-)
|
||||||
*/
|
*/
|
||||||
static int ftp_unauthorized (request_rec *r, int log_it)
|
static int ftp_unauthorized (request_rec *r, int log_it)
|
||||||
{
|
{
|
||||||
@@ -457,10 +457,10 @@ int ap_proxy_ftp_handler(request_rec *r, cache_req *c, char *url)
|
|||||||
struct sockaddr_in server;
|
struct sockaddr_in server;
|
||||||
struct hostent server_hp;
|
struct hostent server_hp;
|
||||||
struct in_addr destaddr;
|
struct in_addr destaddr;
|
||||||
table *resp_hdrs;
|
ap_table_t *resp_hdrs;
|
||||||
BUFF *f;
|
BUFF *f;
|
||||||
BUFF *data = NULL;
|
BUFF *data = NULL;
|
||||||
pool *p = r->pool;
|
ap_context_t *p = r->pool;
|
||||||
int one = 1;
|
int one = 1;
|
||||||
const long int zero = 0L;
|
const long int zero = 0L;
|
||||||
NET_SIZE_T clen;
|
NET_SIZE_T clen;
|
||||||
|
@@ -133,8 +133,8 @@ static const char *proxy_location_reverse_map(request_rec *r, const char *url)
|
|||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Clear all connection-based headers from the incoming headers table */
|
/* Clear all connection-based headers from the incoming headers ap_table_t */
|
||||||
static void clear_connection(pool *p, table *headers)
|
static void clear_connection(ap_context_t *p, ap_table_t *headers)
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
char *next = ap_pstrdup(p, ap_table_get(headers, "Connection"));
|
char *next = ap_pstrdup(p, ap_table_get(headers, "Connection"));
|
||||||
@@ -172,8 +172,8 @@ int ap_proxy_http_handler(request_rec *r, cache_req *c, char *url,
|
|||||||
char *strp2;
|
char *strp2;
|
||||||
const char *err, *desthost;
|
const char *err, *desthost;
|
||||||
int i, j, sock, len, backasswards;
|
int i, j, sock, len, backasswards;
|
||||||
array_header *reqhdrs_arr;
|
ap_array_header_t *reqhdrs_arr;
|
||||||
table *resp_hdrs;
|
ap_table_t *resp_hdrs;
|
||||||
table_entry *reqhdrs;
|
table_entry *reqhdrs;
|
||||||
struct sockaddr_in server;
|
struct sockaddr_in server;
|
||||||
struct in_addr destaddr;
|
struct in_addr destaddr;
|
||||||
@@ -181,7 +181,7 @@ int ap_proxy_http_handler(request_rec *r, cache_req *c, char *url,
|
|||||||
BUFF *f;
|
BUFF *f;
|
||||||
char buffer[HUGE_STRING_LEN];
|
char buffer[HUGE_STRING_LEN];
|
||||||
char portstr[32];
|
char portstr[32];
|
||||||
pool *p = r->pool;
|
ap_context_t *p = r->pool;
|
||||||
const long int zero = 0L;
|
const long int zero = 0L;
|
||||||
int destport = 0;
|
int destport = 0;
|
||||||
char *destportstr = NULL;
|
char *destportstr = NULL;
|
||||||
|
@@ -136,7 +136,7 @@ void ap_proxy_c2hex(int ch, char *x)
|
|||||||
* those which must not be touched.
|
* those which must not be touched.
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
ap_proxy_canonenc(pool *p, const char *x, int len, enum enctype t, int isenc)
|
ap_proxy_canonenc(ap_context_t *p, const char *x, int len, enum enctype t, int isenc)
|
||||||
{
|
{
|
||||||
int i, j, ch;
|
int i, j, ch;
|
||||||
char *y;
|
char *y;
|
||||||
@@ -212,7 +212,7 @@ char *
|
|||||||
* Returns an error string.
|
* Returns an error string.
|
||||||
*/
|
*/
|
||||||
char *
|
char *
|
||||||
ap_proxy_canon_netloc(pool *p, char **const urlp, char **userp,
|
ap_proxy_canon_netloc(ap_context_t *p, char **const urlp, char **userp,
|
||||||
char **passwordp, char **hostp, int *port)
|
char **passwordp, char **hostp, int *port)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
@@ -273,7 +273,7 @@ char *
|
|||||||
return "Port number in URL > 65535";
|
return "Port number in URL > 65535";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ap_str_tolower(host); /* DNS names are case-insensitive */
|
ap_str_tolower(host); /* DNS names are case ap_context_t nsensitive */
|
||||||
if (*host == '\0')
|
if (*host == '\0')
|
||||||
return "Missing host in URL";
|
return "Missing host in URL";
|
||||||
/* check hostname syntax */
|
/* check hostname syntax */
|
||||||
@@ -310,7 +310,7 @@ static const char * const lwday[7] =
|
|||||||
* formatted, then it exits very quickly.
|
* formatted, then it exits very quickly.
|
||||||
*/
|
*/
|
||||||
const char *
|
const char *
|
||||||
ap_proxy_date_canon(pool *p, const char *x)
|
ap_proxy_date_canon(ap_context_t *p, const char *x)
|
||||||
{
|
{
|
||||||
int wk, mday, year, hour, min, sec, mon;
|
int wk, mday, year, hour, min, sec, mon;
|
||||||
char *q, month[4], zone[4], week[4];
|
char *q, month[4], zone[4], week[4];
|
||||||
@@ -431,7 +431,7 @@ static int proxy_getline(char *s, int n, BUFF *in, int fold)
|
|||||||
*/
|
*/
|
||||||
table *ap_proxy_read_headers(request_rec *r, char *buffer, int size, BUFF *f)
|
table *ap_proxy_read_headers(request_rec *r, char *buffer, int size, BUFF *f)
|
||||||
{
|
{
|
||||||
table *resp_hdrs;
|
ap_table_t *resp_hdrs;
|
||||||
int len;
|
int len;
|
||||||
char *value, *end;
|
char *value, *end;
|
||||||
char field[MAX_STRING_LEN];
|
char field[MAX_STRING_LEN];
|
||||||
@@ -606,7 +606,7 @@ long int ap_proxy_send_fb(BUFF *f, request_rec *r, cache_req *c)
|
|||||||
*
|
*
|
||||||
* A timeout should be set before calling this routine.
|
* A timeout should be set before calling this routine.
|
||||||
*/
|
*/
|
||||||
void ap_proxy_send_headers(request_rec *r, const char *respline, table *t)
|
void ap_proxy_send_headers(request_rec *r, const char *respline, ap_table_t *t)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
BUFF *fp = r->connection->client;
|
BUFF *fp = r->connection->client;
|
||||||
@@ -626,7 +626,7 @@ void ap_proxy_send_headers(request_rec *r, const char *respline, table *t)
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* list is a comma-separated list of case-insensitive tokens, with
|
* list is a comma-separated list of case ap_context_t nsensitive tokens, with
|
||||||
* optional whitespace around the tokens.
|
* optional whitespace around the tokens.
|
||||||
* The return returns 1 if the token val is found in the list, or 0
|
* The return returns 1 if the token val is found in the list, or 0
|
||||||
* otherwise.
|
* otherwise.
|
||||||
@@ -902,7 +902,7 @@ static const char *
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Return TRUE if addr represents an IP address (or an IP network address) */
|
/* Return TRUE if addr represents an IP address (or an IP network address) */
|
||||||
int ap_proxy_is_ipaddr(struct dirconn_entry *This, pool *p)
|
int ap_proxy_is_ipaddr(struct dirconn_entry *This, ap_context_t *p)
|
||||||
{
|
{
|
||||||
const char *addr = This->name;
|
const char *addr = This->name;
|
||||||
long ip_addr[4];
|
long ip_addr[4];
|
||||||
@@ -1083,7 +1083,7 @@ static int proxy_match_ipaddr(struct dirconn_entry *This, request_rec *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Return TRUE if addr represents a domain name */
|
/* Return TRUE if addr represents a domain name */
|
||||||
int ap_proxy_is_domainname(struct dirconn_entry *This, pool *p)
|
int ap_proxy_is_domainname(struct dirconn_entry *This, ap_context_t *p)
|
||||||
{
|
{
|
||||||
char *addr = This->name;
|
char *addr = This->name;
|
||||||
int i;
|
int i;
|
||||||
@@ -1107,7 +1107,7 @@ int ap_proxy_is_domainname(struct dirconn_entry *This, pool *p)
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
/* Strip trailing dots */
|
/* Strip trailing dots */
|
||||||
for (i = strlen(addr) - 1; i > 0 && addr[i] == '.'; --i)
|
for (i = strlen(addr) - 1; i > 0 && addr[i] == '.'; - ap_context_t )
|
||||||
addr[i] = '\0';
|
addr[i] = '\0';
|
||||||
|
|
||||||
This->matcher = proxy_match_domainname;
|
This->matcher = proxy_match_domainname;
|
||||||
@@ -1136,7 +1136,7 @@ static int proxy_match_domainname(struct dirconn_entry *This, request_rec *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Return TRUE if addr represents a host name */
|
/* Return TRUE if addr represents a host name */
|
||||||
int ap_proxy_is_hostname(struct dirconn_entry *This, pool *p)
|
int ap_proxy_is_hostname(struct dirconn_entry *This, ap_context_t *p)
|
||||||
{
|
{
|
||||||
struct hostent host;
|
struct hostent host;
|
||||||
char *addr = This->name;
|
char *addr = This->name;
|
||||||
@@ -1162,7 +1162,7 @@ int ap_proxy_is_hostname(struct dirconn_entry *This, pool *p)
|
|||||||
This->hostentry = ap_pduphostent (p, &host);
|
This->hostentry = ap_pduphostent (p, &host);
|
||||||
|
|
||||||
/* Strip trailing dots */
|
/* Strip trailing dots */
|
||||||
for (i = strlen(addr) - 1; i > 0 && addr[i] == '.'; --i)
|
for (i = strlen(addr) - 1; i > 0 && addr[i] == '.'; - ap_context_t )
|
||||||
addr[i] = '\0';
|
addr[i] = '\0';
|
||||||
|
|
||||||
This->matcher = proxy_match_hostname;
|
This->matcher = proxy_match_hostname;
|
||||||
@@ -1202,7 +1202,7 @@ static int proxy_match_hostname(struct dirconn_entry *This, request_rec *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Return TRUE if addr is to be matched as a word */
|
/* Return TRUE if addr is to be matched as a word */
|
||||||
int ap_proxy_is_word(struct dirconn_entry *This, pool *p)
|
int ap_proxy_is_word(struct dirconn_entry *This, ap_context_t *p)
|
||||||
{
|
{
|
||||||
This->matcher = proxy_match_word;
|
This->matcher = proxy_match_word;
|
||||||
return 1;
|
return 1;
|
||||||
|
@@ -166,7 +166,7 @@ module rndchunk_module = {
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
NULL, /* command table */
|
NULL, /* command ap_table_t */
|
||||||
rndchunk_handlers, /* handlers */
|
rndchunk_handlers, /* handlers */
|
||||||
NULL, /* filename translation */
|
NULL, /* filename translation */
|
||||||
NULL, /* check_user_id */
|
NULL, /* check_user_id */
|
||||||
|
@@ -66,7 +66,7 @@
|
|||||||
* SetHandler test-util-uri
|
* SetHandler test-util-uri
|
||||||
* </Location>
|
* </Location>
|
||||||
*
|
*
|
||||||
* Then make a request to /test-util-uri. An html table of errors will
|
* Then make a request to /test-util-uri. An html ap_table_t of errors will
|
||||||
* be output... and a total count of errors.
|
* be output... and a total count of errors.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ static char *my_stpcpy(char *d, const char *s)
|
|||||||
static unsigned iterate_pieces(request_rec *r, const test_uri_t *pieces, int row)
|
static unsigned iterate_pieces(request_rec *r, const test_uri_t *pieces, int row)
|
||||||
{
|
{
|
||||||
unsigned u;
|
unsigned u;
|
||||||
pool *sub;
|
ap_context_t *sub;
|
||||||
char *input_uri;
|
char *input_uri;
|
||||||
char *strp;
|
char *strp;
|
||||||
uri_components result;
|
uri_components result;
|
||||||
@@ -341,7 +341,7 @@ module test_util_uri_module = {
|
|||||||
NULL, /* dir merger --- default is to override */
|
NULL, /* dir merger --- default is to override */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
NULL, /* command table */
|
NULL, /* command ap_table_t */
|
||||||
test_util_uri_handlers, /* handlers */
|
test_util_uri_handlers, /* handlers */
|
||||||
NULL, /* filename translation */
|
NULL, /* filename translation */
|
||||||
NULL, /* check_user_id */
|
NULL, /* check_user_id */
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* This file will include OS specific functions which are not inlineable.
|
* This file will include OS specific functions which are not inlineable.
|
||||||
* Any inlineable functions should be defined in os-inline.c instead.
|
* Any inlineable functions should be defined in os ap_context_t nline.c instead.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ap_config.h"
|
#include "ap_config.h"
|
||||||
|
@@ -68,7 +68,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file in included in all Apache source code. It contains definitions
|
* This file in included in all Apache source code. It contains definitions
|
||||||
* of facilities available on _this_ operating system (HAVE_* macros),
|
* of facilities available on _this_ operating system (HAVE_* macros),
|
||||||
* and prototypes of OS specific functions defined in os.c or os-inline.c
|
* and prototypes of OS specific functions defined in os.c or os ap_context_t nline.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
extern int ap_os_is_path_absolute(const char *file);
|
extern int ap_os_is_path_absolute(const char *file);
|
||||||
|
@@ -168,7 +168,7 @@ static bs2_ForkType os_forktype(void)
|
|||||||
|
|
||||||
/* This routine is called by http_core for the BS2000Account directive */
|
/* This routine is called by http_core for the BS2000Account directive */
|
||||||
/* It stores the account name for later use */
|
/* It stores the account name for later use */
|
||||||
const char *os_set_account(pool *p, const char *account)
|
const char *os_set_account(ap_context_t *p, const char *account)
|
||||||
{
|
{
|
||||||
char account_temp[ACCT_LEN+1];
|
char account_temp[ACCT_LEN+1];
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ Within the POSIX subsystem, the same character set was chosen as in
|
|||||||
"native BS2000", namely EBCDIC.
|
"native BS2000", namely EBCDIC.
|
||||||
|
|
||||||
EBCDIC Table. (Yes, in EBCDIC, the letters 'a'..'z' are not contiguous!)
|
EBCDIC Table. (Yes, in EBCDIC, the letters 'a'..'z' are not contiguous!)
|
||||||
This table is bijective, i.e. there are no ambigous or duplicate characters
|
This ap_table_t is bijective, i.e. there are no ambigous or duplicate characters
|
||||||
00 00 01 02 03 85 09 86 7f 87 8d 8e 0b 0c 0d 0e 0f *................*
|
00 00 01 02 03 85 09 86 7f 87 8d 8e 0b 0c 0d 0e 0f *................*
|
||||||
10 10 11 12 13 8f 0a 08 97 18 19 9c 9d 1c 1d 1e 1f *................*
|
10 10 11 12 13 8f 0a 08 97 18 19 9c 9d 1c 1d 1e 1f *................*
|
||||||
20 80 81 82 83 84 92 17 1b 88 89 8a 8b 8c 05 06 07 *................*
|
20 80 81 82 83 84 92 17 1b 88 89 8a 8b 8c 05 06 07 *................*
|
||||||
@@ -122,17 +122,17 @@ const unsigned char os_toascii_strictly[256] = {
|
|||||||
0x38, 0x39, 0xb3, 0x7b, 0xdc, 0x7d, 0xda, 0x7e /*0123456789.{.}.~*/
|
0x38, 0x39, 0xb3, 0x7b, 0xdc, 0x7d, 0xda, 0x7e /*0123456789.{.}.~*/
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This table is (almost) identical to the previous one. The only difference
|
/* This ap_table_t is (almost) identical to the previous one. The only difference
|
||||||
* is the fact that it maps every EBCDIC *except 0x0A* to its ASCII
|
* is the fact that it maps every EBCDIC *except 0x0A* to its ASCII
|
||||||
* equivalent. The reason for this table is simple: Throughout the
|
* equivalent. The reason for this ap_table_t is simple: Throughout the
|
||||||
* server, protocol strings are used in the form
|
* server, protocol strings are used in the form
|
||||||
* "Content-Type: text/plain\015\012". Now all the characters in the string
|
* "Content-Type: text/plain\015\012". Now all the characters in the string
|
||||||
* are stored as EBCDIC, only the semantics of \012 is completely
|
* are stored as EBCDIC, only the semantics of \012 is completely
|
||||||
* different from LF (look it up in the table above). \015 happens to be
|
* different from LF (look it up in the ap_table_t above). \015 happens to be
|
||||||
* mapped to \015 anyway, so there's no special case for it.
|
* mapped to \015 anyway, so there's no special case for it.
|
||||||
*
|
*
|
||||||
* In THIS table, EBCDIC-\012 is mapped to ASCII-\012.
|
* In THIS table, EBCDIC-\012 is mapped to ASCII-\012.
|
||||||
* This table is therefore used wherever an EBCDIC to ASCII conversion is
|
* This ap_table_t is therefore used wherever an EBCDIC to ASCII conversion is
|
||||||
* needed in the server.
|
* needed in the server.
|
||||||
*/
|
*/
|
||||||
/* ebcdic-to-ascii with \012 mapped to ASCII-\n */
|
/* ebcdic-to-ascii with \012 mapped to ASCII-\n */
|
||||||
|
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file will include OS specific functions which are not inlineable.
|
* This file will include OS specific functions which are not inlineable.
|
||||||
* Any inlineable functions should be defined in os-inline.c instead.
|
* Any inlineable functions should be defined in os ap_context_t nline.c instead.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "httpd.h"
|
#include "httpd.h"
|
||||||
|
@@ -6,7 +6,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file in included in all Apache source code. It contains definitions
|
* This file in included in all Apache source code. It contains definitions
|
||||||
* of facilities available on _this_ operating system (HAVE_* macros),
|
* of facilities available on _this_ operating system (HAVE_* macros),
|
||||||
* and prototypes of OS specific functions defined in os.c or os-inline.c
|
* and prototypes of OS specific functions defined in os.c or os ap_context_t nline.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(INLINE) && defined(USE_GNU_INLINE)
|
#if !defined(INLINE) && defined(USE_GNU_INLINE)
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
INLINE int ap_os_is_path_absolute(const char *file);
|
INLINE int ap_os_is_path_absolute(const char *file);
|
||||||
|
|
||||||
#include "os-inline.c"
|
#include "os ap_context_t nline.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef INLINE
|
#ifndef INLINE
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file in included in all Apache source code. It contains definitions
|
* This file in included in all Apache source code. It contains definitions
|
||||||
* of facilities available on _this_ operating system (HAVE_* macros),
|
* of facilities available on _this_ operating system (HAVE_* macros),
|
||||||
* and prototypes of OS specific functions defined in os.c or os-inline.c
|
* and prototypes of OS specific functions defined in os.c or os ap_context_t nline.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if defined(__GNUC__) && !defined(INLINE)
|
#if defined(__GNUC__) && !defined(INLINE)
|
||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
INLINE int ap_os_is_path_absolute(const char *file);
|
INLINE int ap_os_is_path_absolute(const char *file);
|
||||||
|
|
||||||
#include "os-inline.c"
|
#include "os ap_context_t nline.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef INLINE
|
#ifndef INLINE
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#include "http_log.h"
|
#include "http_log.h"
|
||||||
|
|
||||||
|
|
||||||
API_EXPORT(char *)ap_os_canonical_filename(pool *pPool, const char *szFile)
|
API_EXPORT(char *)ap_os_canonical_filename(ap_context_t *pPool, const char *szFile)
|
||||||
{
|
{
|
||||||
char buf[HUGE_STRING_LEN];
|
char buf[HUGE_STRING_LEN];
|
||||||
char buf2[HUGE_STRING_LEN];
|
char buf2[HUGE_STRING_LEN];
|
||||||
|
@@ -67,7 +67,7 @@ the BS2000 (apache/src/os/bs2000/ebcdic.c).
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Bijective EBCDIC (character set IBM-1047) to US-ASCII table:
|
Bijective EBCDIC (character set IBM-1047) to US-ASCII table:
|
||||||
This table is bijective - there are no ambigous or duplicate characters.
|
This ap_table_t is bijective - there are no ambigous or duplicate characters.
|
||||||
*/
|
*/
|
||||||
const unsigned char os_toascii_strictly[256] = {
|
const unsigned char os_toascii_strictly[256] = {
|
||||||
0x00, 0x01, 0x02, 0x03, 0x85, 0x09, 0x86, 0x7f, /* 00-0f: */
|
0x00, 0x01, 0x02, 0x03, 0x85, 0x09, 0x86, 0x7f, /* 00-0f: */
|
||||||
@@ -106,7 +106,7 @@ const unsigned char os_toascii_strictly[256] = {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Server EBCDIC (character set IBM-1047) to US-ASCII table:
|
Server EBCDIC (character set IBM-1047) to US-ASCII table:
|
||||||
This table is a copy of the os_toascii_strictly bijective table above.
|
This ap_table_t is a copy of the os_toascii_strictly bijective ap_table_t above.
|
||||||
The only change is that hex 0a (\012 octal) is mapped to hex 0a
|
The only change is that hex 0a (\012 octal) is mapped to hex 0a
|
||||||
(ASCII's line feed) instead of hex 8e. This is done because throughout
|
(ASCII's line feed) instead of hex 8e. This is done because throughout
|
||||||
Apache, protocol string definitions hardcode the linefeed as \012 (octal):
|
Apache, protocol string definitions hardcode the linefeed as \012 (octal):
|
||||||
@@ -150,7 +150,7 @@ const unsigned char os_toascii[256] = {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
The US-ASCII to EBCDIC (character set IBM-1047) table:
|
The US-ASCII to EBCDIC (character set IBM-1047) table:
|
||||||
This table is bijective (no ambiguous or duplicate characters)
|
This ap_table_t is bijective (no ambiguous or duplicate characters)
|
||||||
*/
|
*/
|
||||||
const unsigned char os_toebcdic[256] = {
|
const unsigned char os_toebcdic[256] = {
|
||||||
0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f, /* 00-0f: */
|
0x00, 0x01, 0x02, 0x03, 0x37, 0x2d, 0x2e, 0x2f, /* 00-0f: */
|
||||||
|
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* This file will include OS specific functions which are not inlineable.
|
* This file will include OS specific functions which are not inlineable.
|
||||||
* Any inlineable functions should be defined in os-inline.c instead.
|
* Any inlineable functions should be defined in os ap_context_t nline.c instead.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "httpd.h"
|
#include "httpd.h"
|
||||||
@@ -211,7 +211,7 @@ int execvp(const char *file, char *const argv[])
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int ap_tpf_spawn_child(pool *p, int (*func) (void *, child_info *),
|
int ap_tpf_spawn_child(ap_context_t *p, int (*func) (void *, child_info *),
|
||||||
void *data, enum kill_conditions kill_how,
|
void *data, enum kill_conditions kill_how,
|
||||||
int *pipe_in, int *pipe_out, int *pipe_err,
|
int *pipe_in, int *pipe_out, int *pipe_err,
|
||||||
int out_fds[], int in_fds[], int err_fds[])
|
int out_fds[], int in_fds[], int err_fds[])
|
||||||
@@ -222,7 +222,7 @@ int ap_tpf_spawn_child(pool *p, int (*func) (void *, child_info *),
|
|||||||
int fd_flags_out, fd_flags_in, fd_flags_err;
|
int fd_flags_out, fd_flags_in, fd_flags_err;
|
||||||
struct tpf_fork_input fork_input;
|
struct tpf_fork_input fork_input;
|
||||||
TPF_FORK_CHILD *cld = (TPF_FORK_CHILD *) data;
|
TPF_FORK_CHILD *cld = (TPF_FORK_CHILD *) data;
|
||||||
array_header *env_arr = ap_table_elts ((array_header *) cld->subprocess_env);
|
ap_array_header_t *env_arr = ap_table_elts ((array_header *) cld->subprocess_env);
|
||||||
table_entry *elts = (table_entry *) env_arr->elts;
|
table_entry *elts = (table_entry *) env_arr->elts;
|
||||||
|
|
||||||
|
|
||||||
@@ -395,7 +395,7 @@ int os_check_server(char *server) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void os_note_additional_cleanups(pool *p, int sd) {
|
void os_note_additional_cleanups(ap_context_t *p, int sd) {
|
||||||
char sockfilename[50];
|
char sockfilename[50];
|
||||||
/* write the socket to file so that TPF socket device driver will close socket in case
|
/* write the socket to file so that TPF socket device driver will close socket in case
|
||||||
we happen to abend. */
|
we happen to abend. */
|
||||||
|
@@ -10,7 +10,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file in included in all Apache source code. It contains definitions
|
* This file in included in all Apache source code. It contains definitions
|
||||||
* of facilities available on _this_ operating system (HAVE_* macros),
|
* of facilities available on _this_ operating system (HAVE_* macros),
|
||||||
* and prototypes of OS specific functions defined in os.c or os-inline.c
|
* and prototypes of OS specific functions defined in os.c or os ap_context_t nline.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ap_config.h"
|
#include "ap_config.h"
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
* part of the header
|
* part of the header
|
||||||
*/
|
*/
|
||||||
#define INLINE extern ap_inline
|
#define INLINE extern ap_inline
|
||||||
#include "os-inline.c"
|
#include "os ap_context_t nline.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef INLINE
|
#ifndef INLINE
|
||||||
|
@@ -67,7 +67,7 @@
|
|||||||
/*
|
/*
|
||||||
* This file in included in all Apache source code. It contains definitions
|
* This file in included in all Apache source code. It contains definitions
|
||||||
* of facilities available on _this_ operating system (HAVE_* macros),
|
* of facilities available on _this_ operating system (HAVE_* macros),
|
||||||
* and prototypes of OS specific functions defined in os.c or os-inline.c
|
* and prototypes of OS specific functions defined in os.c or os ap_context_t nline.c
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#if !defined(INLINE) && defined(USE_GNU_INLINE)
|
#if !defined(INLINE) && defined(USE_GNU_INLINE)
|
||||||
|
@@ -68,7 +68,7 @@
|
|||||||
* function as well).
|
* function as well).
|
||||||
*
|
*
|
||||||
* To load, simply place the ISA in a location in the document tree.
|
* To load, simply place the ISA in a location in the document tree.
|
||||||
* Then add an "AddHandler isapi-isa dll" into your config file.
|
* Then add an "AddHandler isapi ap_context_t sa dll" into your config file.
|
||||||
* You should now be able to load ISAPI DLLs just be reffering to their
|
* You should now be able to load ISAPI DLLs just be reffering to their
|
||||||
* URLs. Make sure the ExecCGI option is active in the directory
|
* URLs. Make sure the ExecCGI option is active in the directory
|
||||||
* the ISA is in.
|
* the ISA is in.
|
||||||
@@ -129,7 +129,7 @@ int isapi_handler (request_rec *r) {
|
|||||||
BOOL (*isapi_term)(DWORD); /* optional entry point 3 */
|
BOOL (*isapi_term)(DWORD); /* optional entry point 3 */
|
||||||
|
|
||||||
isapi_cid *cid = ap_pcalloc(r->pool, sizeof(isapi_cid));
|
isapi_cid *cid = ap_pcalloc(r->pool, sizeof(isapi_cid));
|
||||||
table *e = r->subprocess_env;
|
ap_table_t *e = r->subprocess_env;
|
||||||
int retval;
|
int retval;
|
||||||
|
|
||||||
/* Use similar restrictions as CGIs */
|
/* Use similar restrictions as CGIs */
|
||||||
@@ -296,7 +296,7 @@ int isapi_handler (request_rec *r) {
|
|||||||
BOOL WINAPI GetServerVariable (HCONN hConn, LPSTR lpszVariableName,
|
BOOL WINAPI GetServerVariable (HCONN hConn, LPSTR lpszVariableName,
|
||||||
LPVOID lpvBuffer, LPDWORD lpdwSizeofBuffer) {
|
LPVOID lpvBuffer, LPDWORD lpdwSizeofBuffer) {
|
||||||
request_rec *r = ((isapi_cid *)hConn)->r;
|
request_rec *r = ((isapi_cid *)hConn)->r;
|
||||||
table *e = r->subprocess_env;
|
ap_table_t *e = r->subprocess_env;
|
||||||
const char *result;
|
const char *result;
|
||||||
|
|
||||||
/* Mostly, we just grab it from the environment, but there are
|
/* Mostly, we just grab it from the environment, but there are
|
||||||
@@ -546,7 +546,7 @@ BOOL WINAPI ServerSupportFunction (HCONN hConn, DWORD dwHSERequest,
|
|||||||
}
|
}
|
||||||
|
|
||||||
handler_rec isapi_handlers[] = {
|
handler_rec isapi_handlers[] = {
|
||||||
{ "isapi-isa", isapi_handler },
|
{ "isapi ap_context_t sa", isapi_handler },
|
||||||
{ NULL}
|
{ NULL}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -557,7 +557,7 @@ module isapi_module = {
|
|||||||
NULL, /* merge per-dir config */
|
NULL, /* merge per-dir config */
|
||||||
NULL, /* server config */
|
NULL, /* server config */
|
||||||
NULL, /* merge server config */
|
NULL, /* merge server config */
|
||||||
NULL, /* command table */
|
NULL, /* command ap_table_t */
|
||||||
isapi_handlers, /* handlers */
|
isapi_handlers, /* handlers */
|
||||||
NULL, /* filename translation */
|
NULL, /* filename translation */
|
||||||
NULL, /* check_user_id */
|
NULL, /* check_user_id */
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
/* char *crypt(const char *pw, const char *salt); */
|
/* char *crypt(const char *pw, const char *salt); */
|
||||||
#define crypt(buf,salt) (buf)
|
#define crypt(buf,salt) (buf)
|
||||||
|
|
||||||
/* Use the Windows built-in spawnvp */
|
/* Use the Windows built ap_context_t n spawnvp */
|
||||||
#define ap_spawnvp(file, argv) (spawnvp(file, argv))
|
#define ap_spawnvp(file, argv) (spawnvp(file, argv))
|
||||||
|
|
||||||
/* Although DIR_TYPE is dirent (see nt/readdir.h) we need direct.h for
|
/* Although DIR_TYPE is dirent (see nt/readdir.h) we need direct.h for
|
||||||
|
@@ -29,7 +29,7 @@ static BOOL OnlyDots(char *pString)
|
|||||||
* is present on the existing path. This routine also
|
* is present on the existing path. This routine also
|
||||||
* converts alias names to long names.
|
* converts alias names to long names.
|
||||||
*/
|
*/
|
||||||
API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool,
|
API_EXPORT(char *) ap_os_systemcase_filename(ap_context_t *pPool,
|
||||||
const char *szFile)
|
const char *szFile)
|
||||||
{
|
{
|
||||||
char buf[HUGE_STRING_LEN];
|
char buf[HUGE_STRING_LEN];
|
||||||
@@ -149,7 +149,7 @@ API_EXPORT(char *) ap_os_systemcase_filename(pool *pPool,
|
|||||||
/* Perform canonicalization with the exception that the
|
/* Perform canonicalization with the exception that the
|
||||||
* input case is preserved.
|
* input case is preserved.
|
||||||
*/
|
*/
|
||||||
API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool,
|
API_EXPORT(char *) ap_os_case_canonical_filename(ap_context_t *pPool,
|
||||||
const char *szFile)
|
const char *szFile)
|
||||||
{
|
{
|
||||||
char *pNewStr;
|
char *pNewStr;
|
||||||
@@ -268,7 +268,7 @@ API_EXPORT(char *) ap_os_case_canonical_filename(pool *pPool,
|
|||||||
|
|
||||||
/* Perform complete canonicalization.
|
/* Perform complete canonicalization.
|
||||||
*/
|
*/
|
||||||
API_EXPORT(char *) ap_os_canonical_filename(pool *pPool, const char *szFile)
|
API_EXPORT(char *) ap_os_canonical_filename(ap_context_t *pPool, const char *szFile)
|
||||||
{
|
{
|
||||||
char *pNewName;
|
char *pNewName;
|
||||||
pNewName = ap_os_case_canonical_filename(pPool, szFile);
|
pNewName = ap_os_case_canonical_filename(pPool, szFile);
|
||||||
|
@@ -90,15 +90,15 @@ HOOK_STRUCT(
|
|||||||
)
|
)
|
||||||
|
|
||||||
IMPLEMENT_HOOK_RUN_ALL(int,header_parser,(request_rec *r),(r),OK,DECLINED)
|
IMPLEMENT_HOOK_RUN_ALL(int,header_parser,(request_rec *r),(r),OK,DECLINED)
|
||||||
IMPLEMENT_HOOK_VOID(pre_config,(pool *pconf,pool *plog,pool *ptemp),
|
IMPLEMENT_HOOK_VOID(pre_config,(ap_context_t *pconf,ap_context_t *plog,ap_context_t *ptemp),
|
||||||
(pconf,plog,ptemp))
|
(pconf,plog,ptemp))
|
||||||
IMPLEMENT_HOOK_VOID(post_config,
|
IMPLEMENT_HOOK_VOID(post_config,
|
||||||
(pool *pconf, pool *plog, pool *ptemp, server_rec *s),
|
(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s),
|
||||||
(pconf,plog,ptemp,s))
|
(pconf,plog,ptemp,s))
|
||||||
IMPLEMENT_HOOK_VOID(open_logs,
|
IMPLEMENT_HOOK_VOID(open_logs,
|
||||||
(pool *pconf, pool *plog, pool *ptemp, server_rec *s),
|
(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s),
|
||||||
(pconf,plog,ptemp,s))
|
(pconf,plog,ptemp,s))
|
||||||
IMPLEMENT_HOOK_VOID(child_init,(pool *pchild, server_rec *s),(pchild,s))
|
IMPLEMENT_HOOK_VOID(child_init,(ap_context_t *pchild, server_rec *s),(pchild,s))
|
||||||
|
|
||||||
DEF_Explain
|
DEF_Explain
|
||||||
|
|
||||||
@@ -121,8 +121,8 @@ API_VAR_EXPORT module *top_module = NULL;
|
|||||||
API_VAR_EXPORT module **ap_loaded_modules=NULL;
|
API_VAR_EXPORT module **ap_loaded_modules=NULL;
|
||||||
|
|
||||||
typedef int (*handler_func) (request_rec *);
|
typedef int (*handler_func) (request_rec *);
|
||||||
typedef void *(*dir_maker_func) (pool *, char *);
|
typedef void *(*dir_maker_func) (ap_context_t *, char *);
|
||||||
typedef void *(*merger_func) (pool *, void *, void *);
|
typedef void *(*merger_func) (ap_context_t *, void *, void *);
|
||||||
|
|
||||||
/* Dealing with config vectors. These are associated with per-directory,
|
/* Dealing with config vectors. These are associated with per-directory,
|
||||||
* per-server, and per-request configuration, and have a void* pointer for
|
* per-server, and per-request configuration, and have a void* pointer for
|
||||||
@@ -151,14 +151,14 @@ API_EXPORT(void) ap_set_module_config(void *conf_vector, module *m, void *val)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void *create_empty_config(pool *p)
|
static void *create_empty_config(ap_context_t *p)
|
||||||
{
|
{
|
||||||
void **conf_vector = (void **) ap_pcalloc(p, sizeof(void *) *
|
void **conf_vector = (void **) ap_pcalloc(p, sizeof(void *) *
|
||||||
(total_modules + DYNAMIC_MODULE_LIMIT));
|
(total_modules + DYNAMIC_MODULE_LIMIT));
|
||||||
return (void *) conf_vector;
|
return (void *) conf_vector;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *create_default_per_dir_config(pool *p)
|
static void *create_default_per_dir_config(ap_context_t *p)
|
||||||
{
|
{
|
||||||
void **conf_vector = (void **) ap_pcalloc(p, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT));
|
void **conf_vector = (void **) ap_pcalloc(p, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT));
|
||||||
module *modp;
|
module *modp;
|
||||||
@@ -174,7 +174,7 @@ static void *create_default_per_dir_config(pool *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void *
|
void *
|
||||||
ap_merge_per_dir_configs(pool *p, void *base, void *new)
|
ap_merge_per_dir_configs(ap_context_t *p, void *base, void *new)
|
||||||
{
|
{
|
||||||
void **conf_vector = (void **) ap_palloc(p, sizeof(void *) * total_modules);
|
void **conf_vector = (void **) ap_palloc(p, sizeof(void *) * total_modules);
|
||||||
void **base_vector = (void **) base;
|
void **base_vector = (void **) base;
|
||||||
@@ -194,7 +194,7 @@ void *
|
|||||||
return (void *) conf_vector;
|
return (void *) conf_vector;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void *create_server_config(pool *p, server_rec *s)
|
static void *create_server_config(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
void **conf_vector = (void **) ap_pcalloc(p, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT));
|
void **conf_vector = (void **) ap_pcalloc(p, sizeof(void *) * (total_modules + DYNAMIC_MODULE_LIMIT));
|
||||||
module *modp;
|
module *modp;
|
||||||
@@ -207,7 +207,7 @@ static void *create_server_config(pool *p, server_rec *s)
|
|||||||
return (void *) conf_vector;
|
return (void *) conf_vector;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void merge_server_configs(pool *p, void *base, void *virt)
|
static void merge_server_configs(ap_context_t *p, void *base, void *virt)
|
||||||
{
|
{
|
||||||
/* Can reuse the 'virt' vector for the spine of it, since we don't
|
/* Can reuse the 'virt' vector for the spine of it, since we don't
|
||||||
* have to deal with the moral equivalent of .htaccess files here...
|
* have to deal with the moral equivalent of .htaccess files here...
|
||||||
@@ -228,17 +228,17 @@ static void merge_server_configs(pool *p, void *base, void *virt)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void *ap_create_request_config(pool *p)
|
void *ap_create_request_config(ap_context_t *p)
|
||||||
{
|
{
|
||||||
return create_empty_config(p);
|
return create_empty_config(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *ap_create_conn_config(pool *p)
|
void *ap_create_conn_config(ap_context_t *p)
|
||||||
{
|
{
|
||||||
return create_empty_config(p);
|
return create_empty_config(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
CORE_EXPORT(void *) ap_create_per_dir_config(pool *p)
|
CORE_EXPORT(void *) ap_create_per_dir_config(ap_context_t *p)
|
||||||
{
|
{
|
||||||
return create_empty_config(p);
|
return create_empty_config(p);
|
||||||
}
|
}
|
||||||
@@ -257,7 +257,7 @@ typedef struct {
|
|||||||
static fast_handler_rec *handlers;
|
static fast_handler_rec *handlers;
|
||||||
static fast_handler_rec *wildhandlers;
|
static fast_handler_rec *wildhandlers;
|
||||||
|
|
||||||
static void init_handlers(pool *p)
|
static void init_handlers(ap_context_t *p)
|
||||||
{
|
{
|
||||||
module *modp;
|
module *modp;
|
||||||
int nhandlers = 0;
|
int nhandlers = 0;
|
||||||
@@ -487,7 +487,7 @@ API_EXPORT(void) ap_add_loaded_module(module *mod)
|
|||||||
*
|
*
|
||||||
* Notes: 1. ap_add_module() would already complain if no more space
|
* Notes: 1. ap_add_module() would already complain if no more space
|
||||||
* exists for adding a dynamically loaded module
|
* exists for adding a dynamically loaded module
|
||||||
* 2. ap_add_module() accepts double-inclusion, so we have
|
* 2. ap_add_module() accepts double ap_context_t nclusion, so we have
|
||||||
* to accept this, too.
|
* to accept this, too.
|
||||||
*/
|
*/
|
||||||
for (m = ap_loaded_modules; *m != NULL; m++)
|
for (m = ap_loaded_modules; *m != NULL; m++)
|
||||||
@@ -933,7 +933,7 @@ API_EXPORT_NONSTD(const char *) ap_set_file_slot(cmd_parms *cmd, char *struct_pt
|
|||||||
static cmd_parms default_parms =
|
static cmd_parms default_parms =
|
||||||
{NULL, 0, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
|
{NULL, 0, -1, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
|
||||||
|
|
||||||
API_EXPORT(const char *) ap_server_root_relative(pool *p, const char *file)
|
API_EXPORT(const char *) ap_server_root_relative(ap_context_t *p, const char *file)
|
||||||
{
|
{
|
||||||
if(ap_os_is_path_absolute(file))
|
if(ap_os_is_path_absolute(file))
|
||||||
return file;
|
return file;
|
||||||
@@ -949,10 +949,10 @@ API_EXPORT(const char *) ap_server_root_relative(pool *p, const char *file)
|
|||||||
/* Structure to be passed to cfg_open_custom(): it contains an
|
/* Structure to be passed to cfg_open_custom(): it contains an
|
||||||
* index which is incremented from 0 to nelts on each call to
|
* index which is incremented from 0 to nelts on each call to
|
||||||
* cfg_getline() (which in turn calls arr_elts_getstr())
|
* cfg_getline() (which in turn calls arr_elts_getstr())
|
||||||
* and an array_header pointer for the string array.
|
* and an ap_array_header_t pointer for the string array.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
array_header *array;
|
ap_array_header_t *array;
|
||||||
int curr_idx;
|
int curr_idx;
|
||||||
} arr_elts_param_t;
|
} arr_elts_param_t;
|
||||||
|
|
||||||
@@ -981,8 +981,8 @@ static int arr_elts_close(void *param)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void process_command_config(server_rec *s, array_header *arr, pool *p,
|
static void process_command_config(server_rec *s, ap_array_header_t *arr, ap_context_t *p,
|
||||||
pool *ptemp)
|
ap_context_t *ptemp)
|
||||||
{
|
{
|
||||||
const char *errmsg;
|
const char *errmsg;
|
||||||
cmd_parms parms;
|
cmd_parms parms;
|
||||||
@@ -1010,7 +1010,7 @@ static void process_command_config(server_rec *s, array_header *arr, pool *p,
|
|||||||
ap_cfg_closefile(parms.config_file);
|
ap_cfg_closefile(parms.config_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ap_process_resource_config(server_rec *s, const char *fname, pool *p, pool *ptemp)
|
void ap_process_resource_config(server_rec *s, const char *fname, ap_context_t *p, ap_context_t *ptemp)
|
||||||
{
|
{
|
||||||
const char *errmsg;
|
const char *errmsg;
|
||||||
cmd_parms parms;
|
cmd_parms parms;
|
||||||
@@ -1134,7 +1134,7 @@ int ap_parse_htaccess(void **result, request_rec *r, int override,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CORE_EXPORT(const char *) ap_init_virtual_host(pool *p, const char *hostname,
|
CORE_EXPORT(const char *) ap_init_virtual_host(ap_context_t *p, const char *hostname,
|
||||||
server_rec *main_server, server_rec **ps)
|
server_rec *main_server, server_rec **ps)
|
||||||
{
|
{
|
||||||
server_rec *s = (server_rec *) ap_pcalloc(p, sizeof(server_rec));
|
server_rec *s = (server_rec *) ap_pcalloc(p, sizeof(server_rec));
|
||||||
@@ -1190,7 +1190,7 @@ CORE_EXPORT(const char *) ap_init_virtual_host(pool *p, const char *hostname,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void fixup_virtual_hosts(pool *p, server_rec *main_server)
|
static void fixup_virtual_hosts(ap_context_t *p, server_rec *main_server)
|
||||||
{
|
{
|
||||||
server_rec *virt;
|
server_rec *virt;
|
||||||
|
|
||||||
@@ -1235,13 +1235,13 @@ static void fixup_virtual_hosts(pool *p, server_rec *main_server)
|
|||||||
* Getting *everything* configured...
|
* Getting *everything* configured...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void init_config_globals(pool *p)
|
static void init_config_globals(ap_context_t *p)
|
||||||
{
|
{
|
||||||
/* Global virtual host hash bucket pointers. Init to null. */
|
/* Global virtual host hash bucket pointers. Init to null. */
|
||||||
ap_init_vhost_config(p);
|
ap_init_vhost_config(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
static server_rec *init_server_config(pool *p)
|
static server_rec *init_server_config(ap_context_t *p)
|
||||||
{
|
{
|
||||||
server_rec *s = (server_rec *) ap_pcalloc(p, sizeof(server_rec));
|
server_rec *s = (server_rec *) ap_pcalloc(p, sizeof(server_rec));
|
||||||
|
|
||||||
@@ -1276,7 +1276,7 @@ static server_rec *init_server_config(pool *p)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
server_rec *ap_read_config(pool *p, pool *ptemp, const char *confname)
|
server_rec *ap_read_config(ap_context_t *p, ap_context_t *ptemp, const char *confname)
|
||||||
{
|
{
|
||||||
server_rec *s = init_server_config(p);
|
server_rec *s = init_server_config(p);
|
||||||
|
|
||||||
@@ -1298,7 +1298,7 @@ server_rec *ap_read_config(pool *p, pool *ptemp, const char *confname)
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ap_single_module_configure(pool *p, server_rec *s, module *m)
|
void ap_single_module_configure(ap_context_t *p, server_rec *s, module *m)
|
||||||
{
|
{
|
||||||
if (m->create_server_config)
|
if (m->create_server_config)
|
||||||
ap_set_module_config(s->module_config, m,
|
ap_set_module_config(s->module_config, m,
|
||||||
@@ -1308,16 +1308,16 @@ void ap_single_module_configure(pool *p, server_rec *s, module *m)
|
|||||||
(*m->create_dir_config)(p, NULL));
|
(*m->create_dir_config)(p, NULL));
|
||||||
}
|
}
|
||||||
|
|
||||||
void ap_post_config_hook(pool *pconf, pool *plog, pool *ptemp, server_rec *s)
|
void ap_post_config_hook(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec *s)
|
||||||
{
|
{
|
||||||
ap_run_post_config(pconf,plog,ptemp,s);
|
ap_run_post_config(pconf,plog,ptemp,s);
|
||||||
init_handlers(pconf);
|
init_handlers(pconf);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ap_child_init_hook(pool *pchild, server_rec *s)
|
void ap_child_init_hook(ap_context_t *pchild, server_rec *s)
|
||||||
{
|
{
|
||||||
/* TODO: uh this seems ugly, is there a better way? */
|
/* TODO: uh this seems ugly, is there a better way? */
|
||||||
ap_child_init_alloc();
|
/*ap_child_init_alloc(); PUT THIS BACK IN XXXXX */
|
||||||
|
|
||||||
ap_run_child_init(pchild,s);
|
ap_run_child_init(pchild,s);
|
||||||
}
|
}
|
||||||
@@ -1419,7 +1419,7 @@ void ap_show_modules()
|
|||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
printf("Compiled-in modules:\n");
|
printf("Compiled ap_context_t n modules:\n");
|
||||||
for (n = 0; ap_loaded_modules[n]; ++n)
|
for (n = 0; ap_loaded_modules[n]; ++n)
|
||||||
printf(" %s\n", ap_loaded_modules[n]->name);
|
printf(" %s\n", ap_loaded_modules[n]->name);
|
||||||
}
|
}
|
||||||
|
@@ -72,7 +72,7 @@ HOOK_STRUCT(
|
|||||||
IMPLEMENT_HOOK_VOID(pre_connection,(conn_rec *c),(c))
|
IMPLEMENT_HOOK_VOID(pre_connection,(conn_rec *c),(c))
|
||||||
IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec *c),(c),DECLINED)
|
IMPLEMENT_HOOK_RUN_FIRST(int,process_connection,(conn_rec *c),(c),DECLINED)
|
||||||
|
|
||||||
/* TODO: re-implement the lingering close stuff */
|
/* TODO: re ap_context_t mplement the lingering close stuff */
|
||||||
#define NO_LINGCLOSE
|
#define NO_LINGCLOSE
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -256,7 +256,7 @@ int ap_process_http_connection(conn_rec *c)
|
|||||||
structure, but for now...
|
structure, but for now...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
conn_rec *ap_new_connection(pool *p, server_rec *server, BUFF *inout,
|
conn_rec *ap_new_connection(ap_context_t *p, server_rec *server, BUFF *inout,
|
||||||
const struct sockaddr_in *remaddr,
|
const struct sockaddr_in *remaddr,
|
||||||
const struct sockaddr_in *saddr, long id)
|
const struct sockaddr_in *saddr, long id)
|
||||||
{
|
{
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
/* generate a table of 256 values, where certain characters are
|
/* generate a ap_table_t of 256 values, where certain characters are
|
||||||
* marked "interesting"... for the uri parsing process.
|
* marked "interesting"... for the uri parsing process.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@@ -160,13 +160,14 @@ static int make_sock(const struct sockaddr_in *server)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void close_listeners_on_exec(void *v)
|
static ap_status_t close_listeners_on_exec(void *v)
|
||||||
{
|
{
|
||||||
ap_listen_rec *lr;
|
ap_listen_rec *lr;
|
||||||
|
|
||||||
for (lr = ap_listeners; lr; lr = lr->next) {
|
for (lr = ap_listeners; lr; lr = lr->next) {
|
||||||
close(lr->fd);
|
close(lr->fd);
|
||||||
}
|
}
|
||||||
|
return APR_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -196,7 +197,7 @@ static void alloc_listener(struct sockaddr_in *local_addr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int ap_listen_open(pool *pconf, unsigned port)
|
int ap_listen_open(ap_context_t *pconf, unsigned port)
|
||||||
{
|
{
|
||||||
ap_listen_rec *lr;
|
ap_listen_rec *lr;
|
||||||
ap_listen_rec *next;
|
ap_listen_rec *next;
|
||||||
|
15
server/log.c
15
server/log.c
@@ -64,6 +64,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define CORE_PRIVATE
|
#define CORE_PRIVATE
|
||||||
|
#include "apr_lib.h"
|
||||||
#include "httpd.h"
|
#include "httpd.h"
|
||||||
#include "http_config.h"
|
#include "http_config.h"
|
||||||
#include "http_core.h"
|
#include "http_core.h"
|
||||||
@@ -154,7 +155,7 @@ static const TRANS priorities[] = {
|
|||||||
{NULL, -1},
|
{NULL, -1},
|
||||||
};
|
};
|
||||||
|
|
||||||
static int error_log_child(void *cmd, child_info *pinfo)
|
static int error_log_child(void *cmd, ap_child_info_t *pinfo)
|
||||||
{
|
{
|
||||||
/* Child process code for 'ErrorLog "|..."';
|
/* Child process code for 'ErrorLog "|..."';
|
||||||
* may want a common framework for this, since I expect it will
|
* may want a common framework for this, since I expect it will
|
||||||
@@ -183,7 +184,7 @@ static int error_log_child(void *cmd, child_info *pinfo)
|
|||||||
return(child_pid);
|
return(child_pid);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void open_error_log(server_rec *s, pool *p)
|
static void open_error_log(server_rec *s, ap_context_t *p)
|
||||||
{
|
{
|
||||||
const char *fname;
|
const char *fname;
|
||||||
|
|
||||||
@@ -241,7 +242,7 @@ static void open_error_log(server_rec *s, pool *p)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ap_open_logs(server_rec *s_main, pool *p)
|
void ap_open_logs(server_rec *s_main, ap_context_t *p)
|
||||||
{
|
{
|
||||||
server_rec *virt, *q;
|
server_rec *virt, *q;
|
||||||
int replace_stderr;
|
int replace_stderr;
|
||||||
@@ -493,7 +494,7 @@ API_EXPORT(void) ap_log_rerror(const char *file, int line, int level,
|
|||||||
va_end(args);
|
va_end(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ap_log_pid(pool *p, const char *fname)
|
void ap_log_pid(ap_context_t *p, const char *fname)
|
||||||
{
|
{
|
||||||
FILE *pid_file;
|
FILE *pid_file;
|
||||||
struct stat finfo;
|
struct stat finfo;
|
||||||
@@ -677,7 +678,7 @@ static void piped_log_cleanup_for_exec(void *data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
API_EXPORT(piped_log *) ap_open_piped_log(pool *p, const char *program)
|
API_EXPORT(piped_log *) ap_open_piped_log(ap_context_t *p, const char *program)
|
||||||
{
|
{
|
||||||
piped_log *pl;
|
piped_log *pl;
|
||||||
|
|
||||||
@@ -709,7 +710,7 @@ API_EXPORT(void) ap_close_piped_log(piped_log *pl)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
static int piped_log_child(void *cmd, child_info *pinfo)
|
static int piped_log_child(void *cmd, ap_child_info_t *pinfo)
|
||||||
{
|
{
|
||||||
/* Child process code for 'TransferLog "|..."';
|
/* Child process code for 'TransferLog "|..."';
|
||||||
* may want a common framework for this, since I expect it will
|
* may want a common framework for this, since I expect it will
|
||||||
@@ -738,7 +739,7 @@ static int piped_log_child(void *cmd, child_info *pinfo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
API_EXPORT(piped_log *) ap_open_piped_log(pool *p, const char *program)
|
API_EXPORT(piped_log *) ap_open_piped_log(ap_context_t *p, const char *program)
|
||||||
{
|
{
|
||||||
piped_log *pl;
|
piped_log *pl;
|
||||||
FILE *dummy;
|
FILE *dummy;
|
||||||
|
@@ -66,9 +66,9 @@ char *ap_server_argv0;
|
|||||||
|
|
||||||
API_VAR_EXPORT const char *ap_server_root;
|
API_VAR_EXPORT const char *ap_server_root;
|
||||||
|
|
||||||
array_header *ap_server_pre_read_config;
|
ap_array_header_t *ap_server_pre_read_config;
|
||||||
array_header *ap_server_post_read_config;
|
ap_array_header_t *ap_server_post_read_config;
|
||||||
array_header *ap_server_config_defines;
|
ap_array_header_t *ap_server_config_defines;
|
||||||
|
|
||||||
static void show_compile_settings(void)
|
static void show_compile_settings(void)
|
||||||
{
|
{
|
||||||
@@ -156,7 +156,7 @@ static void show_compile_settings(void)
|
|||||||
printf(" -D SHARED_CORE\n");
|
printf(" -D SHARED_CORE\n");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* This list displays the compiled-in default paths: */
|
/* This list displays the compiled ap_context_t n default paths: */
|
||||||
#ifdef HTTPD_ROOT
|
#ifdef HTTPD_ROOT
|
||||||
printf(" -D HTTPD_ROOT=\"" HTTPD_ROOT "\"\n");
|
printf(" -D HTTPD_ROOT=\"" HTTPD_ROOT "\"\n");
|
||||||
#endif
|
#endif
|
||||||
@@ -222,7 +222,7 @@ static void usage(char *bin)
|
|||||||
fprintf(stderr, " -v : show version number\n");
|
fprintf(stderr, " -v : show version number\n");
|
||||||
fprintf(stderr, " -V : show compile settings\n");
|
fprintf(stderr, " -V : show compile settings\n");
|
||||||
fprintf(stderr, " -h : list available command line options (this page)\n");
|
fprintf(stderr, " -h : list available command line options (this page)\n");
|
||||||
fprintf(stderr, " -l : list compiled-in modules\n");
|
fprintf(stderr, " -l : list compiled ap_context_t n modules\n");
|
||||||
fprintf(stderr, " -L : list available configuration directives\n");
|
fprintf(stderr, " -L : list available configuration directives\n");
|
||||||
/* TODOC: -S has been replaced by '-t -D DUMP_VHOSTS' */
|
/* TODOC: -S has been replaced by '-t -D DUMP_VHOSTS' */
|
||||||
/* fprintf(stderr, " -S : show parsed settings (currently only vhost settings)\n"); */
|
/* fprintf(stderr, " -S : show parsed settings (currently only vhost settings)\n"); */
|
||||||
@@ -232,7 +232,7 @@ static void usage(char *bin)
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
pool *g_pHookPool;
|
ap_context_t *g_pHookPool;
|
||||||
|
|
||||||
extern char *optarg;
|
extern char *optarg;
|
||||||
|
|
||||||
@@ -249,11 +249,11 @@ int main(int argc, char **argv)
|
|||||||
const char *confname = SERVER_CONFIG_FILE;
|
const char *confname = SERVER_CONFIG_FILE;
|
||||||
const char *def_server_root = HTTPD_ROOT;
|
const char *def_server_root = HTTPD_ROOT;
|
||||||
server_rec *server_conf;
|
server_rec *server_conf;
|
||||||
pool *pglobal; /* Global pool */
|
ap_context_t *pglobal; /* Global pool */
|
||||||
pool *pconf; /* Pool for config stuff */
|
ap_context_t *pconf; /* Pool for config stuff */
|
||||||
pool *plog; /* Pool for error-logging files */
|
ap_context_t *plog; /* Pool for error-logging files */
|
||||||
pool *ptemp; /* Pool for temporart config stuff */
|
ap_context_t *ptemp; /* Pool for temporart config stuff */
|
||||||
pool *pcommands; /* Pool for -C and -c switches */
|
ap_context_t *pcommands; /* Pool for -C and -c switches */
|
||||||
|
|
||||||
/* TODO: PATHSEPARATOR should be one of the os defines */
|
/* TODO: PATHSEPARATOR should be one of the os defines */
|
||||||
#define PATHSEPARATOR '/'
|
#define PATHSEPARATOR '/'
|
||||||
@@ -267,10 +267,10 @@ int main(int argc, char **argv)
|
|||||||
ap_util_init();
|
ap_util_init();
|
||||||
ap_util_uri_init();
|
ap_util_uri_init();
|
||||||
|
|
||||||
pglobal = ap_init_alloc();
|
ap_create_context(NULL, NULL, &pglobal);
|
||||||
g_pHookPool=pglobal;
|
g_pHookPool=pglobal;
|
||||||
|
|
||||||
pcommands = ap_make_sub_pool(pglobal);
|
ap_create_context(pglobal, NULL, &pcommands);
|
||||||
ap_server_pre_read_config = ap_make_array(pcommands, 1, sizeof(char *));
|
ap_server_pre_read_config = ap_make_array(pcommands, 1, sizeof(char *));
|
||||||
ap_server_post_read_config = ap_make_array(pcommands, 1, sizeof(char *));
|
ap_server_post_read_config = ap_make_array(pcommands, 1, sizeof(char *));
|
||||||
ap_server_config_defines = ap_make_array(pcommands, 1, sizeof(char *));
|
ap_server_config_defines = ap_make_array(pcommands, 1, sizeof(char *));
|
||||||
@@ -317,9 +317,9 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pconf = ap_make_sub_pool(pglobal);
|
ap_create_context(pglobal, NULL, &pconf);
|
||||||
plog = ap_make_sub_pool(pglobal);
|
ap_create_context(pglobal, NULL, &plog);
|
||||||
ptemp = ap_make_sub_pool(pconf);
|
ap_create_context(pconf, NULL, &ptemp);
|
||||||
|
|
||||||
/* for legacy reasons, we read the configuration twice before
|
/* for legacy reasons, we read the configuration twice before
|
||||||
we actually serve any requests */
|
we actually serve any requests */
|
||||||
@@ -340,7 +340,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
ap_clear_pool(pconf);
|
ap_clear_pool(pconf);
|
||||||
ptemp = ap_make_sub_pool(pconf);
|
ap_create_context(pconf, NULL, &ptemp);
|
||||||
ap_server_root = def_server_root;
|
ap_server_root = def_server_root;
|
||||||
ap_run_pre_config(pconf, plog, ptemp);
|
ap_run_pre_config(pconf, plog, ptemp);
|
||||||
server_conf = ap_read_config(pconf, ptemp, confname);
|
server_conf = ap_read_config(pconf, ptemp, confname);
|
||||||
|
@@ -157,9 +157,9 @@ struct other_child_rec {
|
|||||||
static other_child_rec *other_children;
|
static other_child_rec *other_children;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static pool *pconf; /* Pool for config stuff */
|
static ap_context_t *pconf; /* Pool for config stuff */
|
||||||
static pool *pchild; /* Pool for httpd child stuff */
|
static ap_context_t *pchild; /* Pool for httpd child stuff */
|
||||||
static pool *thread_pool_parent; /* Parent of per-thread pools */
|
static ap_context_t *thread_pool_parent; /* Parent of per-thread pools */
|
||||||
static pthread_mutex_t thread_pool_create_mutex;
|
static pthread_mutex_t thread_pool_create_mutex;
|
||||||
|
|
||||||
static int child_num;
|
static int child_num;
|
||||||
@@ -680,7 +680,7 @@ static void process_child_status(int pid, ap_wait_t status)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int setup_listeners(pool *p, server_rec *s)
|
static int setup_listeners(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
ap_listen_rec *lr;
|
ap_listen_rec *lr;
|
||||||
int num_listeners = 0;
|
int num_listeners = 0;
|
||||||
@@ -733,7 +733,7 @@ int ap_graceful_stop_signalled(void)
|
|||||||
* Child process main loop.
|
* Child process main loop.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void process_socket(pool *p, struct sockaddr *sa_client, int csd,
|
static void process_socket(ap_context_t *p, struct sockaddr *sa_client, int csd,
|
||||||
int conn_id)
|
int conn_id)
|
||||||
{
|
{
|
||||||
struct sockaddr sa_server; /* ZZZZ */
|
struct sockaddr sa_server; /* ZZZZ */
|
||||||
@@ -846,8 +846,8 @@ static void *worker_thread(void *arg)
|
|||||||
{
|
{
|
||||||
struct sockaddr sa_client;
|
struct sockaddr sa_client;
|
||||||
int csd = -1;
|
int csd = -1;
|
||||||
pool *tpool; /* Pool for this thread */
|
ap_context_t *tpool; /* Pool for this thread */
|
||||||
pool *ptrans; /* Pool for per-transaction stuff */
|
ap_context_t *ptrans; /* Pool for per-transaction stuff */
|
||||||
int sd = -1;
|
int sd = -1;
|
||||||
int srv;
|
int srv;
|
||||||
int curr_pollfd, last_pollfd = 0;
|
int curr_pollfd, last_pollfd = 0;
|
||||||
@@ -1261,7 +1261,7 @@ static void server_main_loop(int remaining_children_to_start)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s)
|
int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s)
|
||||||
{
|
{
|
||||||
int remaining_children_to_start;
|
int remaining_children_to_start;
|
||||||
int i;
|
int i;
|
||||||
@@ -1401,7 +1401,7 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void dexter_pre_config(pool *p, pool *plog, pool *ptemp)
|
static void dexter_pre_config(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp)
|
||||||
{
|
{
|
||||||
static int restart_num = 0;
|
static int restart_num = 0;
|
||||||
|
|
||||||
@@ -1653,7 +1653,7 @@ module MODULE_VAR_EXPORT mpm_dexter_module = {
|
|||||||
NULL, /* merge per-directory config structures */
|
NULL, /* merge per-directory config structures */
|
||||||
NULL, /* create per-server config structure */
|
NULL, /* create per-server config structure */
|
||||||
NULL, /* merge per-server config structures */
|
NULL, /* merge per-server config structures */
|
||||||
dexter_cmds, /* command table */
|
dexter_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
dexter_hooks /* register_hooks */
|
dexter_hooks /* register_hooks */
|
||||||
};
|
};
|
||||||
|
@@ -98,7 +98,7 @@ typedef struct {
|
|||||||
int pid;
|
int pid;
|
||||||
int tid;
|
int tid;
|
||||||
int sd;
|
int sd;
|
||||||
pool *tpool; /* "pthread" would be confusing */
|
ap_context_t *tpool; /* "pthread" would be confusing */
|
||||||
} proc_info;
|
} proc_info;
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@@ -153,8 +153,8 @@ struct other_child_rec {
|
|||||||
static other_child_rec *other_children;
|
static other_child_rec *other_children;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static pool *pconf; /* Pool for config stuff */
|
static ap_context_t *pconf; /* Pool for config stuff */
|
||||||
static pool *pchild; /* Pool for httpd child stuff */
|
static ap_context_t *pchild; /* Pool for httpd child stuff */
|
||||||
|
|
||||||
static int my_pid; /* Linux getpid() doesn't work except in main thread. Use
|
static int my_pid; /* Linux getpid() doesn't work except in main thread. Use
|
||||||
this instead */
|
this instead */
|
||||||
@@ -673,7 +673,7 @@ static void process_child_status(int pid, ap_wait_t status)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int setup_listeners(pool *pconf, server_rec *s)
|
static int setup_listeners(ap_context_t *pconf, server_rec *s)
|
||||||
{
|
{
|
||||||
ap_listen_rec *lr;
|
ap_listen_rec *lr;
|
||||||
int num_listeners = 0;
|
int num_listeners = 0;
|
||||||
@@ -726,7 +726,7 @@ int ap_graceful_stop_signalled(void)
|
|||||||
* Child process main loop.
|
* Child process main loop.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static void process_socket(pool *p, struct sockaddr *sa_client, int csd, int my_child_num, int my_thread_num)
|
static void process_socket(ap_context_t *p, struct sockaddr *sa_client, int csd, int my_child_num, int my_thread_num)
|
||||||
{
|
{
|
||||||
struct sockaddr sa_server; /* ZZZZ */
|
struct sockaddr sa_server; /* ZZZZ */
|
||||||
size_t len = sizeof(struct sockaddr);
|
size_t len = sizeof(struct sockaddr);
|
||||||
@@ -798,10 +798,10 @@ static void * worker_thread(void * dummy)
|
|||||||
proc_info * ti = dummy;
|
proc_info * ti = dummy;
|
||||||
int process_slot = ti->pid;
|
int process_slot = ti->pid;
|
||||||
int thread_slot = ti->tid;
|
int thread_slot = ti->tid;
|
||||||
pool *tpool = ti->tpool;
|
ap_context_t *tpool = ti->tpool;
|
||||||
struct sockaddr sa_client;
|
struct sockaddr sa_client;
|
||||||
int csd = -1;
|
int csd = -1;
|
||||||
pool *ptrans; /* Pool for per-transaction stuff */
|
ap_context_t *ptrans; /* Pool for per-transaction stuff */
|
||||||
int sd = -1;
|
int sd = -1;
|
||||||
int srv;
|
int srv;
|
||||||
int curr_pollfd, last_pollfd = 0;
|
int curr_pollfd, last_pollfd = 0;
|
||||||
@@ -809,7 +809,7 @@ static void * worker_thread(void * dummy)
|
|||||||
|
|
||||||
free(ti);
|
free(ti);
|
||||||
|
|
||||||
ptrans = ap_make_sub_pool(tpool);
|
ap_create_context(tpool, NULL, &ptrans);
|
||||||
|
|
||||||
pthread_mutex_lock(&worker_thread_count_mutex);
|
pthread_mutex_lock(&worker_thread_count_mutex);
|
||||||
worker_thread_count++;
|
worker_thread_count++;
|
||||||
@@ -917,7 +917,7 @@ static void child_main(int child_num_arg)
|
|||||||
ap_listen_rec *lr;
|
ap_listen_rec *lr;
|
||||||
|
|
||||||
my_pid = getpid();
|
my_pid = getpid();
|
||||||
pchild = ap_make_sub_pool(pconf);
|
ap_create_context(pconf, NULL, &pchild);
|
||||||
|
|
||||||
/*stuff to do before we switch id's, so we have permissions.*/
|
/*stuff to do before we switch id's, so we have permissions.*/
|
||||||
reopen_scoreboard(pchild);
|
reopen_scoreboard(pchild);
|
||||||
@@ -971,7 +971,7 @@ static void child_main(int child_num_arg)
|
|||||||
my_info->pid = my_child_num;
|
my_info->pid = my_child_num;
|
||||||
my_info->tid = i;
|
my_info->tid = i;
|
||||||
my_info->sd = 0;
|
my_info->sd = 0;
|
||||||
my_info->tpool = ap_make_sub_pool(pchild);
|
ap_create_context(pchild, NULL, &my_info->tpool);
|
||||||
|
|
||||||
/* We are creating threads right now */
|
/* We are creating threads right now */
|
||||||
(void) ap_update_child_status(my_child_num, i, SERVER_STARTING,
|
(void) ap_update_child_status(my_child_num, i, SERVER_STARTING,
|
||||||
@@ -1276,7 +1276,7 @@ static void server_main_loop(int remaining_children_to_start)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s)
|
int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s)
|
||||||
{
|
{
|
||||||
int remaining_children_to_start;
|
int remaining_children_to_start;
|
||||||
|
|
||||||
@@ -1434,7 +1434,7 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void mpmt_pthread_pre_config(pool *pconf, pool *plog, pool *ptemp)
|
static void mpmt_pthread_pre_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp)
|
||||||
{
|
{
|
||||||
static int restart_num = 0;
|
static int restart_num = 0;
|
||||||
|
|
||||||
@@ -1693,7 +1693,7 @@ module MODULE_VAR_EXPORT mpm_mpmt_pthread_module = {
|
|||||||
NULL, /* merge per-directory config structures */
|
NULL, /* merge per-directory config structures */
|
||||||
NULL, /* create per-server config structure */
|
NULL, /* create per-server config structure */
|
||||||
NULL, /* merge per-server config structures */
|
NULL, /* merge per-server config structures */
|
||||||
mpmt_pthread_cmds, /* command table */
|
mpmt_pthread_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
mpmt_pthread_hooks /* register_hooks */
|
mpmt_pthread_hooks /* register_hooks */
|
||||||
};
|
};
|
||||||
|
@@ -27,7 +27,7 @@ caddr_t get_shared_heap(const char *);
|
|||||||
|
|
||||||
scoreboard *ap_scoreboard_image = NULL;
|
scoreboard *ap_scoreboard_image = NULL;
|
||||||
static char *ap_server_argv0=NULL;
|
static char *ap_server_argv0=NULL;
|
||||||
extern pool * pconf;
|
extern ap_context_t * pconf;
|
||||||
|
|
||||||
/*****************************************************************
|
/*****************************************************************
|
||||||
*
|
*
|
||||||
@@ -46,7 +46,7 @@ extern pool * pconf;
|
|||||||
* shared memory (so they use memcpy etc.)
|
* shared memory (so they use memcpy etc.)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void reinit_scoreboard(pool *p)
|
void reinit_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
ap_assert(!ap_scoreboard_image);
|
ap_assert(!ap_scoreboard_image);
|
||||||
ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE);
|
ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE);
|
||||||
@@ -114,7 +114,7 @@ caddr_t get_shared_heap(const char *Name)
|
|||||||
return BaseAddress;
|
return BaseAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_shared_mem(pool *p)
|
static void setup_shared_mem(ap_context_t *p)
|
||||||
{
|
{
|
||||||
caddr_t m;
|
caddr_t m;
|
||||||
|
|
||||||
@@ -137,7 +137,7 @@ static void setup_shared_mem(pool *p)
|
|||||||
ap_scoreboard_image->global.running_generation = 0;
|
ap_scoreboard_image->global.running_generation = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(void) reopen_scoreboard(pool *p)
|
API_EXPORT(void) reopen_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
caddr_t m;
|
caddr_t m;
|
||||||
int rc;
|
int rc;
|
||||||
@@ -189,7 +189,7 @@ static void cleanup_shared_mem(void *d)
|
|||||||
shm_unlink(ap_scoreboard_fname);
|
shm_unlink(ap_scoreboard_fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_shared_mem(pool *p)
|
static void setup_shared_mem(ap_context_t *p)
|
||||||
{
|
{
|
||||||
char buf[512];
|
char buf[512];
|
||||||
caddr_t m;
|
caddr_t m;
|
||||||
@@ -224,13 +224,13 @@ static void setup_shared_mem(pool *p)
|
|||||||
ap_scoreboard_image->global.running_generation = 0;
|
ap_scoreboard_image->global.running_generation = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(void) reopen_scoreboard(pool *p)
|
API_EXPORT(void) reopen_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(USE_MMAP_SCOREBOARD)
|
#elif defined(USE_MMAP_SCOREBOARD)
|
||||||
|
|
||||||
static void setup_shared_mem(pool *p)
|
static void setup_shared_mem(ap_context_t *p)
|
||||||
{
|
{
|
||||||
caddr_t m;
|
caddr_t m;
|
||||||
|
|
||||||
@@ -304,7 +304,7 @@ static void setup_shared_mem(pool *p)
|
|||||||
ap_scoreboard_image->global.running_generation = 0;
|
ap_scoreboard_image->global.running_generation = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(void) reopen_scoreboard(pool *p)
|
API_EXPORT(void) reopen_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -312,7 +312,7 @@ API_EXPORT(void) reopen_scoreboard(pool *p)
|
|||||||
static key_t shmkey = IPC_PRIVATE;
|
static key_t shmkey = IPC_PRIVATE;
|
||||||
static int shmid = -1;
|
static int shmid = -1;
|
||||||
|
|
||||||
static void setup_shared_mem(pool *p)
|
static void setup_shared_mem(ap_context_t *p)
|
||||||
{
|
{
|
||||||
struct shmid_ds shmbuf;
|
struct shmid_ds shmbuf;
|
||||||
const server_rec * server_conf = ap_get_server_conf();
|
const server_rec * server_conf = ap_get_server_conf();
|
||||||
@@ -397,7 +397,7 @@ static void setup_shared_mem(pool *p)
|
|||||||
ap_scoreboard_image->global.running_generation = 0;
|
ap_scoreboard_image->global.running_generation = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(void) reopen_scoreboard(pool *p)
|
API_EXPORT(void) reopen_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,7 +444,7 @@ static void cleanup_scoreboard_file(void *foo)
|
|||||||
unlink(ap_scoreboard_fname);
|
unlink(ap_scoreboard_fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(void) reopen_scoreboard(pool *p)
|
API_EXPORT(void) reopen_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
if (scoreboard_fd != -1)
|
if (scoreboard_fd != -1)
|
||||||
ap_pclosef(p, scoreboard_fd);
|
ap_pclosef(p, scoreboard_fd);
|
||||||
@@ -459,7 +459,7 @@ API_EXPORT(void) reopen_scoreboard(pool *p)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Called by parent process */
|
/* Called by parent process */
|
||||||
void reinit_scoreboard(pool *p)
|
void reinit_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
int running_gen = 0;
|
int running_gen = 0;
|
||||||
if (ap_scoreboard_image)
|
if (ap_scoreboard_image)
|
||||||
|
@@ -195,7 +195,7 @@ typedef struct {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
API_EXPORT(int) ap_exists_scoreboard_image(void);
|
API_EXPORT(int) ap_exists_scoreboard_image(void);
|
||||||
void reinit_scoareboard(pool *p);
|
void reinit_scoareboard(ap_context_t *p);
|
||||||
void cleanup_scoreboard(void);
|
void cleanup_scoreboard(void);
|
||||||
API_EXPORT(void) ap_sync_scoreboard_image(void);
|
API_EXPORT(void) ap_sync_scoreboard_image(void);
|
||||||
|
|
||||||
@@ -205,10 +205,10 @@ caddr_t get_shared_heap(const char *Name);
|
|||||||
#elif defined(USE_POSIX_SCOREBOARD)
|
#elif defined(USE_POSIX_SCOREBOARD)
|
||||||
static void cleanup_shared_mem(void *d);
|
static void cleanup_shared_mem(void *d);
|
||||||
#else
|
#else
|
||||||
void reinit_scoreboard(pool *p);
|
void reinit_scoreboard(ap_context_t *p);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
API_EXPORT(void) reopen_scoreboard(pool *p);
|
API_EXPORT(void) reopen_scoreboard(ap_context_t *p);
|
||||||
|
|
||||||
ap_inline void ap_sync_scoreboard_image(void);
|
ap_inline void ap_sync_scoreboard_image(void);
|
||||||
void increment_counts(int child_num, int thread_num, request_rec *r);
|
void increment_counts(int child_num, int thread_num, request_rec *r);
|
||||||
|
@@ -165,8 +165,8 @@ struct other_child_rec {
|
|||||||
static other_child_rec *other_children;
|
static other_child_rec *other_children;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static pool *pconf; /* Pool for config stuff */
|
static ap_context_t *pconf; /* Pool for config stuff */
|
||||||
static pool *pchild; /* Pool for httpd child stuff */
|
static ap_context_t *pchild; /* Pool for httpd child stuff */
|
||||||
|
|
||||||
static int my_pid; /* it seems silly to call getpid all the time */
|
static int my_pid; /* it seems silly to call getpid all the time */
|
||||||
#ifndef MULTITHREAD
|
#ifndef MULTITHREAD
|
||||||
@@ -228,7 +228,7 @@ static void clean_child_exit(int code)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USE_FCNTL_SERIALIZED_ACCEPT) || defined(USE_FLOCK_SERIALIZED_ACCEPT)
|
#if defined(USE_FCNTL_SERIALIZED_ACCEPT) || defined(USE_FLOCK_SERIALIZED_ACCEPT)
|
||||||
static void expand_lock_fname(pool *p)
|
static void expand_lock_fname(ap_context_t *p)
|
||||||
{
|
{
|
||||||
/* XXXX possibly bogus cast */
|
/* XXXX possibly bogus cast */
|
||||||
ap_lock_fname = ap_psprintf(p, "%s.%lu",
|
ap_lock_fname = ap_psprintf(p, "%s.%lu",
|
||||||
@@ -244,7 +244,7 @@ static ulock_t uslock = NULL;
|
|||||||
|
|
||||||
#define accept_mutex_child_init(x)
|
#define accept_mutex_child_init(x)
|
||||||
|
|
||||||
static void accept_mutex_init(pool *p)
|
static void accept_mutex_init(ap_context_t *p)
|
||||||
{
|
{
|
||||||
ptrdiff_t old;
|
ptrdiff_t old;
|
||||||
usptr_t *us;
|
usptr_t *us;
|
||||||
@@ -321,7 +321,7 @@ static void accept_mutex_child_cleanup(void *foo)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void accept_mutex_child_init(pool *p)
|
static void accept_mutex_child_init(ap_context_t *p)
|
||||||
{
|
{
|
||||||
ap_register_cleanup(p, NULL, accept_mutex_child_cleanup, ap_null_cleanup);
|
ap_register_cleanup(p, NULL, accept_mutex_child_cleanup, ap_null_cleanup);
|
||||||
}
|
}
|
||||||
@@ -335,7 +335,7 @@ static void accept_mutex_cleanup(void *foo)
|
|||||||
accept_mutex = (void *)(caddr_t)-1;
|
accept_mutex = (void *)(caddr_t)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void accept_mutex_init(pool *p)
|
static void accept_mutex_init(ap_context_t *p)
|
||||||
{
|
{
|
||||||
pthread_mutexattr_t mattr;
|
pthread_mutexattr_t mattr;
|
||||||
int fd;
|
int fd;
|
||||||
@@ -454,7 +454,7 @@ static void accept_mutex_cleanup(void *foo)
|
|||||||
|
|
||||||
#define accept_mutex_child_init(x)
|
#define accept_mutex_child_init(x)
|
||||||
|
|
||||||
static void accept_mutex_init(pool *p)
|
static void accept_mutex_init(ap_context_t *p)
|
||||||
{
|
{
|
||||||
union semun ick;
|
union semun ick;
|
||||||
struct semid_ds buf;
|
struct semid_ds buf;
|
||||||
@@ -485,7 +485,7 @@ static void accept_mutex_init(pool *p)
|
|||||||
}
|
}
|
||||||
ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup);
|
ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup);
|
||||||
|
|
||||||
/* pre-initialize these */
|
/* pre ap_context_t nitialize these */
|
||||||
op_on.sem_num = 0;
|
op_on.sem_num = 0;
|
||||||
op_on.sem_op = -1;
|
op_on.sem_op = -1;
|
||||||
op_on.sem_flg = SEM_UNDO;
|
op_on.sem_flg = SEM_UNDO;
|
||||||
@@ -526,7 +526,7 @@ static int lock_fd = -1;
|
|||||||
* Initialize mutex lock.
|
* Initialize mutex lock.
|
||||||
* Must be safe to call this on a restart.
|
* Must be safe to call this on a restart.
|
||||||
*/
|
*/
|
||||||
static void accept_mutex_init(pool *p)
|
static void accept_mutex_init(ap_context_t *p)
|
||||||
{
|
{
|
||||||
|
|
||||||
lock_it.l_whence = SEEK_SET; /* from current point */
|
lock_it.l_whence = SEEK_SET; /* from current point */
|
||||||
@@ -596,7 +596,7 @@ static void accept_mutex_cleanup(void *foo)
|
|||||||
* Initialize mutex lock.
|
* Initialize mutex lock.
|
||||||
* Done by each child at it's birth
|
* Done by each child at it's birth
|
||||||
*/
|
*/
|
||||||
static void accept_mutex_child_init(pool *p)
|
static void accept_mutex_child_init(ap_context_t *p)
|
||||||
{
|
{
|
||||||
|
|
||||||
lock_fd = ap_popenf(p, ap_lock_fname, O_WRONLY, 0600);
|
lock_fd = ap_popenf(p, ap_lock_fname, O_WRONLY, 0600);
|
||||||
@@ -611,7 +611,7 @@ static void accept_mutex_child_init(pool *p)
|
|||||||
* Initialize mutex lock.
|
* Initialize mutex lock.
|
||||||
* Must be safe to call this on a restart.
|
* Must be safe to call this on a restart.
|
||||||
*/
|
*/
|
||||||
static void accept_mutex_init(pool *p)
|
static void accept_mutex_init(ap_context_t *p)
|
||||||
{
|
{
|
||||||
expand_lock_fname(p);
|
expand_lock_fname(p);
|
||||||
unlink(ap_lock_fname);
|
unlink(ap_lock_fname);
|
||||||
@@ -661,7 +661,7 @@ static void accept_mutex_cleanup(void *foo)
|
|||||||
* Initialize mutex lock.
|
* Initialize mutex lock.
|
||||||
* Done by each child at it's birth
|
* Done by each child at it's birth
|
||||||
*/
|
*/
|
||||||
static void accept_mutex_child_init(pool *p)
|
static void accept_mutex_child_init(ap_context_t *p)
|
||||||
{
|
{
|
||||||
int rc = DosOpenMutexSem(NULL, &lock_sem);
|
int rc = DosOpenMutexSem(NULL, &lock_sem);
|
||||||
|
|
||||||
@@ -678,7 +678,7 @@ static void accept_mutex_child_init(pool *p)
|
|||||||
* Initialize mutex lock.
|
* Initialize mutex lock.
|
||||||
* Must be safe to call this on a restart.
|
* Must be safe to call this on a restart.
|
||||||
*/
|
*/
|
||||||
static void accept_mutex_init(pool *p)
|
static void accept_mutex_init(ap_context_t *p)
|
||||||
{
|
{
|
||||||
int rc = DosCreateMutexSem(NULL, &lock_sem, DC_SEM_SHARED, FALSE);
|
int rc = DosCreateMutexSem(NULL, &lock_sem, DC_SEM_SHARED, FALSE);
|
||||||
|
|
||||||
@@ -725,7 +725,7 @@ static void accept_mutex_cleanup(void *foo)
|
|||||||
|
|
||||||
#define accept_mutex_init(x)
|
#define accept_mutex_init(x)
|
||||||
|
|
||||||
static void accept_mutex_child_init(pool *p)
|
static void accept_mutex_child_init(ap_context_t *p)
|
||||||
{
|
{
|
||||||
ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup);
|
ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup);
|
||||||
tpf_core_held = 0;
|
tpf_core_held = 0;
|
||||||
@@ -934,7 +934,7 @@ caddr_t get_shared_heap(const char *Name)
|
|||||||
return BaseAddress;
|
return BaseAddress;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_shared_mem(pool *p)
|
static void setup_shared_mem(ap_context_t *p)
|
||||||
{
|
{
|
||||||
caddr_t m;
|
caddr_t m;
|
||||||
|
|
||||||
@@ -957,7 +957,7 @@ static void setup_shared_mem(pool *p)
|
|||||||
ap_scoreboard_image->global.running_generation = 0;
|
ap_scoreboard_image->global.running_generation = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reopen_scoreboard(pool *p)
|
static void reopen_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
caddr_t m;
|
caddr_t m;
|
||||||
int rc;
|
int rc;
|
||||||
@@ -1009,7 +1009,7 @@ static void cleanup_shared_mem(void *d)
|
|||||||
shm_unlink(ap_scoreboard_fname);
|
shm_unlink(ap_scoreboard_fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_shared_mem(pool *p)
|
static void setup_shared_mem(ap_context_t *p)
|
||||||
{
|
{
|
||||||
char buf[512];
|
char buf[512];
|
||||||
caddr_t m;
|
caddr_t m;
|
||||||
@@ -1044,13 +1044,13 @@ static void setup_shared_mem(pool *p)
|
|||||||
ap_scoreboard_image->global.running_generation = 0;
|
ap_scoreboard_image->global.running_generation = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reopen_scoreboard(pool *p)
|
static void reopen_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(USE_MMAP_SCOREBOARD)
|
#elif defined(USE_MMAP_SCOREBOARD)
|
||||||
|
|
||||||
static void setup_shared_mem(pool *p)
|
static void setup_shared_mem(ap_context_t *p)
|
||||||
{
|
{
|
||||||
caddr_t m;
|
caddr_t m;
|
||||||
|
|
||||||
@@ -1124,7 +1124,7 @@ static void setup_shared_mem(pool *p)
|
|||||||
ap_scoreboard_image->global.running_generation = 0;
|
ap_scoreboard_image->global.running_generation = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reopen_scoreboard(pool *p)
|
static void reopen_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1132,7 +1132,7 @@ static void reopen_scoreboard(pool *p)
|
|||||||
static key_t shmkey = IPC_PRIVATE;
|
static key_t shmkey = IPC_PRIVATE;
|
||||||
static int shmid = -1;
|
static int shmid = -1;
|
||||||
|
|
||||||
static void setup_shared_mem(pool *p)
|
static void setup_shared_mem(ap_context_t *p)
|
||||||
{
|
{
|
||||||
struct shmid_ds shmbuf;
|
struct shmid_ds shmbuf;
|
||||||
#ifdef MOVEBREAK
|
#ifdef MOVEBREAK
|
||||||
@@ -1216,7 +1216,7 @@ static void setup_shared_mem(pool *p)
|
|||||||
ap_scoreboard_image->global.running_generation = 0;
|
ap_scoreboard_image->global.running_generation = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reopen_scoreboard(pool *p)
|
static void reopen_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1232,7 +1232,7 @@ static void cleanup_scoreboard_heap()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void setup_shared_mem(pool *p)
|
static void setup_shared_mem(ap_context_t *p)
|
||||||
{
|
{
|
||||||
cinfc(CINFC_WRITE, CINFC_CMMCTK2);
|
cinfc(CINFC_WRITE, CINFC_CMMCTK2);
|
||||||
ap_scoreboard_image = (scoreboard *) gsysc(SCOREBOARD_FRAMES, SCOREBOARD_NAME);
|
ap_scoreboard_image = (scoreboard *) gsysc(SCOREBOARD_FRAMES, SCOREBOARD_NAME);
|
||||||
@@ -1246,7 +1246,7 @@ static void setup_shared_mem(pool *p)
|
|||||||
ap_scoreboard_image->global.running_generation = 0;
|
ap_scoreboard_image->global.running_generation = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void reopen_scoreboard(pool *p)
|
static void reopen_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
cinfc(CINFC_WRITE, CINFC_CMMCTK2);
|
cinfc(CINFC_WRITE, CINFC_CMMCTK2);
|
||||||
}
|
}
|
||||||
@@ -1294,7 +1294,7 @@ static void cleanup_scoreboard_file(void *foo)
|
|||||||
unlink(ap_scoreboard_fname);
|
unlink(ap_scoreboard_fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
void reopen_scoreboard(pool *p)
|
void reopen_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
if (scoreboard_fd != -1)
|
if (scoreboard_fd != -1)
|
||||||
ap_pclosef(p, scoreboard_fd);
|
ap_pclosef(p, scoreboard_fd);
|
||||||
@@ -1312,7 +1312,7 @@ void reopen_scoreboard(pool *p)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Called by parent process */
|
/* Called by parent process */
|
||||||
static void reinit_scoreboard(pool *p)
|
static void reinit_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
int running_gen = 0;
|
int running_gen = 0;
|
||||||
if (ap_scoreboard_image)
|
if (ap_scoreboard_image)
|
||||||
@@ -1931,7 +1931,7 @@ static void child_main(int child_num_arg)
|
|||||||
ap_listen_rec *lr;
|
ap_listen_rec *lr;
|
||||||
ap_listen_rec *last_lr;
|
ap_listen_rec *last_lr;
|
||||||
ap_listen_rec *first_lr;
|
ap_listen_rec *first_lr;
|
||||||
pool *ptrans;
|
ap_context_t *ptrans;
|
||||||
conn_rec *current_conn;
|
conn_rec *current_conn;
|
||||||
ap_iol *iol;
|
ap_iol *iol;
|
||||||
|
|
||||||
@@ -1941,12 +1941,12 @@ static void child_main(int child_num_arg)
|
|||||||
requests_this_child = 0;
|
requests_this_child = 0;
|
||||||
last_lr = NULL;
|
last_lr = NULL;
|
||||||
|
|
||||||
/* Get a sub pool for global allocations in this child, so that
|
/* Get a sub ap_context_t for global allocations in this child, so that
|
||||||
* we can have cleanups occur when the child exits.
|
* we can have cleanups occur when the child exits.
|
||||||
*/
|
*/
|
||||||
pchild = ap_make_sub_pool(pconf);
|
ap_create_context(pconf, NULL, &pchild);
|
||||||
|
|
||||||
ptrans = ap_make_sub_pool(pchild);
|
ap_create_context(pchild, NULL, &ptrans);
|
||||||
|
|
||||||
/* needs to be done before we switch UIDs so we have permissions */
|
/* needs to be done before we switch UIDs so we have permissions */
|
||||||
reopen_scoreboard(pchild);
|
reopen_scoreboard(pchild);
|
||||||
@@ -2514,7 +2514,7 @@ static void process_child_status(int pid, ap_wait_t status)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int setup_listeners(pool *p, server_rec *s)
|
static int setup_listeners(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
ap_listen_rec *lr;
|
ap_listen_rec *lr;
|
||||||
|
|
||||||
@@ -2540,7 +2540,7 @@ static int setup_listeners(pool *p, server_rec *s)
|
|||||||
* Executive routines.
|
* Executive routines.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s)
|
int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s)
|
||||||
{
|
{
|
||||||
int remaining_children_to_start;
|
int remaining_children_to_start;
|
||||||
|
|
||||||
@@ -2752,7 +2752,7 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void prefork_pre_config(pool *p, pool *plog, pool *ptemp)
|
static void prefork_pre_config(ap_context_t *p, ap_context_t *plog, ap_context_t *ptemp)
|
||||||
{
|
{
|
||||||
static int restart_num = 0;
|
static int restart_num = 0;
|
||||||
|
|
||||||
@@ -2981,7 +2981,7 @@ module MODULE_VAR_EXPORT mpm_prefork_module = {
|
|||||||
NULL, /* merge per-directory config structures */
|
NULL, /* merge per-directory config structures */
|
||||||
NULL, /* create per-server config structure */
|
NULL, /* create per-server config structure */
|
||||||
NULL, /* merge per-server config structures */
|
NULL, /* merge per-server config structures */
|
||||||
prefork_cmds, /* command table */
|
prefork_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
prefork_hooks, /* register hooks */
|
prefork_hooks, /* register hooks */
|
||||||
};
|
};
|
||||||
|
@@ -128,12 +128,12 @@ struct other_child_rec {
|
|||||||
static other_child_rec *other_children;
|
static other_child_rec *other_children;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static pool *pconf; /* Pool for config stuff */
|
static ap_context_t *pconf; /* Pool for config stuff */
|
||||||
static scoreboard *ap_scoreboard_image = NULL;
|
static scoreboard *ap_scoreboard_image = NULL;
|
||||||
|
|
||||||
struct thread_globals {
|
struct thread_globals {
|
||||||
int child_num;
|
int child_num;
|
||||||
pool *pchild; /* Pool for httpd child stuff */
|
ap_context_t *pchild; /* Pool for httpd child stuff */
|
||||||
int usr1_just_die;
|
int usr1_just_die;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ static struct thread_globals **ppthread_globals = NULL;
|
|||||||
#define THREAD_GLOBAL(gvar) ((*ppthread_globals)->gvar)
|
#define THREAD_GLOBAL(gvar) ((*ppthread_globals)->gvar)
|
||||||
|
|
||||||
|
|
||||||
void reinit_scoreboard(pool *p)
|
void reinit_scoreboard(ap_context_t *p)
|
||||||
{
|
{
|
||||||
if (ap_scoreboard_image == NULL) {
|
if (ap_scoreboard_image == NULL) {
|
||||||
ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE);
|
ap_scoreboard_image = (scoreboard *) malloc(SCOREBOARD_SIZE);
|
||||||
@@ -189,7 +189,7 @@ static void accept_mutex_cleanup(void *foo)
|
|||||||
* Initialize mutex lock.
|
* Initialize mutex lock.
|
||||||
* Done by each child at it's birth
|
* Done by each child at it's birth
|
||||||
*/
|
*/
|
||||||
static void accept_mutex_child_init(pool *p)
|
static void accept_mutex_child_init(ap_context_t *p)
|
||||||
{
|
{
|
||||||
int rc = DosOpenMutexSem(NULL, &lock_sem);
|
int rc = DosOpenMutexSem(NULL, &lock_sem);
|
||||||
|
|
||||||
@@ -206,7 +206,7 @@ static void accept_mutex_child_init(pool *p)
|
|||||||
* Initialize mutex lock.
|
* Initialize mutex lock.
|
||||||
* Must be safe to call this on a restart.
|
* Must be safe to call this on a restart.
|
||||||
*/
|
*/
|
||||||
static void accept_mutex_init(pool *p)
|
static void accept_mutex_init(ap_context_t *p)
|
||||||
{
|
{
|
||||||
int rc = DosCreateMutexSem(NULL, &lock_sem, DC_SEM_SHARED, FALSE);
|
int rc = DosCreateMutexSem(NULL, &lock_sem, DC_SEM_SHARED, FALSE);
|
||||||
|
|
||||||
@@ -884,10 +884,10 @@ static void child_main(void *child_num_arg)
|
|||||||
struct sockaddr sa_client;
|
struct sockaddr sa_client;
|
||||||
ap_listen_rec *lr = NULL;
|
ap_listen_rec *lr = NULL;
|
||||||
ap_listen_rec *first_lr = NULL;
|
ap_listen_rec *first_lr = NULL;
|
||||||
pool *ptrans;
|
ap_context_t *ptrans;
|
||||||
conn_rec *current_conn;
|
conn_rec *current_conn;
|
||||||
ap_iol *iol;
|
ap_iol *iol;
|
||||||
pool *pchild;
|
ap_context_t *pchild;
|
||||||
parent_score *sc_parent_rec;
|
parent_score *sc_parent_rec;
|
||||||
int csd = -1, requests_this_child = 0;
|
int csd = -1, requests_this_child = 0;
|
||||||
fd_set main_fds;
|
fd_set main_fds;
|
||||||
@@ -902,7 +902,7 @@ static void child_main(void *child_num_arg)
|
|||||||
signal(SIGUSR1, just_die);
|
signal(SIGUSR1, just_die);
|
||||||
signal(SIGTERM, just_die);
|
signal(SIGTERM, just_die);
|
||||||
|
|
||||||
/* Get a sub pool for global allocations in this child, so that
|
/* Get a sub ap_context_t for global allocations in this child, so that
|
||||||
* we can have cleanups occur when the child exits.
|
* we can have cleanups occur when the child exits.
|
||||||
*/
|
*/
|
||||||
pchild = ap_make_sub_pool(pconf);
|
pchild = ap_make_sub_pool(pconf);
|
||||||
@@ -1378,7 +1378,7 @@ static void process_child_status(int tid, ap_wait_t status)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int setup_listeners(pool *pconf, server_rec *s)
|
static int setup_listeners(ap_context_t *pconf, server_rec *s)
|
||||||
{
|
{
|
||||||
ap_listen_rec *lr;
|
ap_listen_rec *lr;
|
||||||
|
|
||||||
@@ -1404,7 +1404,7 @@ static int setup_listeners(pool *pconf, server_rec *s)
|
|||||||
* Executive routines.
|
* Executive routines.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s)
|
int ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s)
|
||||||
{
|
{
|
||||||
int remaining_children_to_start;
|
int remaining_children_to_start;
|
||||||
int i;
|
int i;
|
||||||
@@ -1603,7 +1603,7 @@ int ap_mpm_run(pool *_pconf, pool *plog, server_rec *s)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void spmt_os2_pre_config(pool *pconf, pool *plog, pool *ptemp)
|
static void spmt_os2_pre_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp)
|
||||||
{
|
{
|
||||||
one_process = !!getenv("ONE_PROCESS");
|
one_process = !!getenv("ONE_PROCESS");
|
||||||
|
|
||||||
@@ -1797,7 +1797,7 @@ module MODULE_VAR_EXPORT mpm_spmt_os2_module = {
|
|||||||
NULL, /* merge per-directory config structures */
|
NULL, /* merge per-directory config structures */
|
||||||
NULL, /* create per-server config structure */
|
NULL, /* create per-server config structure */
|
||||||
NULL, /* merge per-server config structures */
|
NULL, /* merge per-server config structures */
|
||||||
spmt_os2_cmds, /* command table */
|
spmt_os2_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
spmt_os2_hooks, /* register_hooks */
|
spmt_os2_hooks, /* register_hooks */
|
||||||
};
|
};
|
||||||
|
@@ -86,7 +86,7 @@ static struct pollfd *listenfds;
|
|||||||
static int num_listenfds = 0;
|
static int num_listenfds = 0;
|
||||||
int listenmaxfd = -1;
|
int listenmaxfd = -1;
|
||||||
|
|
||||||
static pool *pconf; /* Pool for config stuff */
|
static ap_context_t *pconf; /* Pool for config stuff */
|
||||||
|
|
||||||
static char ap_coredump_dir[MAX_STRING_LEN];
|
static char ap_coredump_dir[MAX_STRING_LEN];
|
||||||
|
|
||||||
@@ -268,7 +268,7 @@ static ap_inline ap_listen_rec *find_ready_listener(fd_set * main_fds)
|
|||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
static int setup_listeners(pool *pconf, server_rec *s)
|
static int setup_listeners(ap_context_t *pconf, server_rec *s)
|
||||||
{
|
{
|
||||||
ap_listen_rec *lr;
|
ap_listen_rec *lr;
|
||||||
int num_listeners = 0;
|
int num_listeners = 0;
|
||||||
@@ -294,7 +294,7 @@ static int setup_listeners(pool *pconf, server_rec *s)
|
|||||||
return num_listeners;
|
return num_listeners;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int setup_inherited_listeners(pool *p, server_rec *s)
|
static int setup_inherited_listeners(ap_context_t *p, server_rec *s)
|
||||||
{
|
{
|
||||||
WSAPROTOCOL_INFO WSAProtocolInfo;
|
WSAPROTOCOL_INFO WSAProtocolInfo;
|
||||||
HANDLE pipe;
|
HANDLE pipe;
|
||||||
@@ -761,7 +761,7 @@ static void child_main(int child_num)
|
|||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
BUFF *conn_io;
|
BUFF *conn_io;
|
||||||
pool *ptrans;
|
ap_context_t *ptrans;
|
||||||
int csd = -1;
|
int csd = -1;
|
||||||
conn_rec *current_conn;
|
conn_rec *current_conn;
|
||||||
|
|
||||||
@@ -896,7 +896,7 @@ static void worker_main()
|
|||||||
int rv;
|
int rv;
|
||||||
time_t end_time;
|
time_t end_time;
|
||||||
int i;
|
int i;
|
||||||
pool *pchild;
|
ap_context_t *pchild;
|
||||||
|
|
||||||
pchild = ap_make_sub_pool(pconf);
|
pchild = ap_make_sub_pool(pconf);
|
||||||
|
|
||||||
@@ -1054,7 +1054,7 @@ static void cleanup_process(HANDLE *handles, HANDLE *events, int position, int *
|
|||||||
(*processes)--;
|
(*processes)--;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int create_process(pool *p, HANDLE *handles, HANDLE *events, int *processes)
|
static int create_process(ap_context_t *p, HANDLE *handles, HANDLE *events, int *processes)
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
@@ -1301,7 +1301,7 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even
|
|||||||
* We are making a big assumption here that the child process, once signaled,
|
* We are making a big assumption here that the child process, once signaled,
|
||||||
* will REALLY go away. Since this is a restart, we do not want to hold the
|
* will REALLY go away. Since this is a restart, we do not want to hold the
|
||||||
* new child process up waiting for the old child to die. Remove the old
|
* new child process up waiting for the old child to die. Remove the old
|
||||||
* child out of the process_handles table and hope for the best...
|
* child out of the process_handles ap_table_t and hope for the best...
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < children_to_kill; i++) {
|
for (i = 0; i < children_to_kill; i++) {
|
||||||
/* APD3("master_main: signalling child #%d handle %d to die", i, process_handles[i]); */
|
/* APD3("master_main: signalling child #%d handle %d to die", i, process_handles[i]); */
|
||||||
@@ -1314,7 +1314,7 @@ static int master_main(server_rec *s, HANDLE shutdown_event, HANDLE restart_even
|
|||||||
else {
|
else {
|
||||||
/* A child process must have exited because of MaxRequestPerChild being hit
|
/* A child process must have exited because of MaxRequestPerChild being hit
|
||||||
* or a fatal error condition (seg fault, etc.). Remove the dead process
|
* or a fatal error condition (seg fault, etc.). Remove the dead process
|
||||||
* from the process_handles and process_kill_events table and create a new
|
* from the process_handles and process_kill_events ap_table_t and create a new
|
||||||
* child process.
|
* child process.
|
||||||
* TODO: Consider restarting the child immediately without looping through http_main
|
* TODO: Consider restarting the child immediately without looping through http_main
|
||||||
* and without rereading the configuration. Will need this if we ever support multiple
|
* and without rereading the configuration. Will need this if we ever support multiple
|
||||||
@@ -1362,7 +1362,7 @@ die_now:
|
|||||||
/*
|
/*
|
||||||
* winnt_pre_config()
|
* winnt_pre_config()
|
||||||
*/
|
*/
|
||||||
static void winnt_pre_config(pool *pconf, pool *plog, pool *ptemp)
|
static void winnt_pre_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp)
|
||||||
{
|
{
|
||||||
char *pid;
|
char *pid;
|
||||||
one_process=1;//!!getenv("ONE_PROCESS");
|
one_process=1;//!!getenv("ONE_PROCESS");
|
||||||
@@ -1393,12 +1393,12 @@ static void winnt_pre_config(pool *pconf, pool *plog, pool *ptemp)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void winnt_post_config(pool *pconf, pool *plog, pool *ptemp, server_rec* server_conf)
|
static void winnt_post_config(ap_context_t *pconf, ap_context_t *plog, ap_context_t *ptemp, server_rec* server_conf)
|
||||||
{
|
{
|
||||||
server_conf = server_conf;
|
server_conf = server_conf;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(int) ap_mpm_run(pool *_pconf, pool *plog, server_rec *s )
|
API_EXPORT(int) ap_mpm_run(ap_context_t *_pconf, ap_context_t *plog, server_rec *s )
|
||||||
{
|
{
|
||||||
|
|
||||||
char* exit_event_name;
|
char* exit_event_name;
|
||||||
@@ -1662,7 +1662,7 @@ module MODULE_VAR_EXPORT mpm_winnt_module = {
|
|||||||
NULL, /* merge per-directory config structures */
|
NULL, /* merge per-directory config structures */
|
||||||
NULL, /* create per-server config structure */
|
NULL, /* create per-server config structure */
|
||||||
NULL, /* merge per-server config structures */
|
NULL, /* merge per-server config structures */
|
||||||
winnt_cmds, /* command table */
|
winnt_cmds, /* command ap_table_t */
|
||||||
NULL, /* handlers */
|
NULL, /* handlers */
|
||||||
winnt_hooks /* register_hooks */
|
winnt_hooks /* register_hooks */
|
||||||
};
|
};
|
||||||
|
@@ -68,7 +68,7 @@ typedef struct CompContext {
|
|||||||
OVERLAPPED Overlapped;
|
OVERLAPPED Overlapped;
|
||||||
SOCKET accept_socket;
|
SOCKET accept_socket;
|
||||||
BUFF* conn_io;
|
BUFF* conn_io;
|
||||||
pool *ptrans;
|
ap_context_t *ptrans;
|
||||||
struct sockaddr sa_server;
|
struct sockaddr sa_server;
|
||||||
int sa_server_len;
|
int sa_server_len;
|
||||||
struct sockaddr sa_client;
|
struct sockaddr sa_client;
|
||||||
|
@@ -59,7 +59,7 @@
|
|||||||
/*
|
/*
|
||||||
* Get the data for registry key value. This is a generic function that
|
* Get the data for registry key value. This is a generic function that
|
||||||
* can either get a value into a caller-supplied buffer, or it can
|
* can either get a value into a caller-supplied buffer, or it can
|
||||||
* allocate space for the value from the pass-in pool. It will normally
|
* allocate space for the value from the pass ap_context_t n pool. It will normally
|
||||||
* be used by other functions within this file to get specific key values
|
* be used by other functions within this file to get specific key values
|
||||||
* (e.g. registry_get_server_root()). This function returns a number of
|
* (e.g. registry_get_server_root()). This function returns a number of
|
||||||
* different error statuses, allowing the caller to differentiate
|
* different error statuses, allowing the caller to differentiate
|
||||||
@@ -69,13 +69,13 @@
|
|||||||
*
|
*
|
||||||
* If ppValue is NULL, allocate space for the value and return it in
|
* If ppValue is NULL, allocate space for the value and return it in
|
||||||
* *pValue. The return value is the number of bytes in the value.
|
* *pValue. The return value is the number of bytes in the value.
|
||||||
* The first argument is the pool to use to allocate space for the value.
|
* The first argument is the ap_context_t to use to allocate space for the value.
|
||||||
*
|
*
|
||||||
* If pValue is not NULL, assume it is a buffer of nSizeValue bytes,
|
* If pValue is not NULL, assume it is a buffer of nSizeValue bytes,
|
||||||
* and write the value into the buffer. The return value is the number
|
* and write the value into the buffer. The return value is the number
|
||||||
* of bytes in the value (so if the return value is greater than
|
* of bytes in the value (so if the return value is greater than
|
||||||
* the supplied nSizeValue, the caller knows that *pValue is truncated).
|
* the supplied nSizeValue, the caller knows that *pValue is truncated).
|
||||||
* The pool argument is ignored.
|
* The ap_context_t argument is ignored.
|
||||||
*
|
*
|
||||||
* The return value is the number of bytes in the successfully retreived
|
* The return value is the number of bytes in the successfully retreived
|
||||||
* key if everything worked, or:
|
* key if everything worked, or:
|
||||||
@@ -92,7 +92,7 @@
|
|||||||
* message will be logged at priority "warning".
|
* message will be logged at priority "warning".
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int ap_registry_get_key_int(pool *p, char *key, char *name, char *pBuffer, int nSizeBuffer, char **ppValue)
|
static int ap_registry_get_key_int(ap_context_t *p, char *key, char *name, char *pBuffer, int nSizeBuffer, char **ppValue)
|
||||||
{
|
{
|
||||||
long rv;
|
long rv;
|
||||||
HKEY hKey;
|
HKEY hKey;
|
||||||
@@ -199,7 +199,7 @@ static int ap_registry_get_key_int(pool *p, char *key, char *name, char *pBuffer
|
|||||||
* an error getting the key.
|
* an error getting the key.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int ap_registry_get_server_root(pool *p, char *dir, int size)
|
int ap_registry_get_server_root(ap_context_t *p, char *dir, int size)
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ char *ap_get_service_key(char *service_name)
|
|||||||
return(key);
|
return(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ap_registry_get_service_conf(pool *p, char *dir, int size, char *service_name)
|
int ap_registry_get_service_conf(ap_context_t *p, char *dir, int size, char *service_name)
|
||||||
{
|
{
|
||||||
int rv;
|
int rv;
|
||||||
char *key = ap_get_service_key(service_name);
|
char *key = ap_get_service_key(service_name);
|
||||||
|
@@ -126,7 +126,7 @@ API_EXPORT(char *) ap_get_time()
|
|||||||
* Examine a field value (such as a media-/content-type) string and return
|
* Examine a field value (such as a media-/content-type) string and return
|
||||||
* it sans any parameters; e.g., strip off any ';charset=foo' and the like.
|
* it sans any parameters; e.g., strip off any ';charset=foo' and the like.
|
||||||
*/
|
*/
|
||||||
API_EXPORT(char *) ap_field_noparam(pool *p, const char *intype)
|
API_EXPORT(char *) ap_field_noparam(ap_context_t *p, const char *intype)
|
||||||
{
|
{
|
||||||
const char *semi;
|
const char *semi;
|
||||||
|
|
||||||
@@ -142,7 +142,7 @@ API_EXPORT(char *) ap_field_noparam(pool *p, const char *intype)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_ht_time(pool *p, time_t t, const char *fmt, int gmt)
|
API_EXPORT(char *) ap_ht_time(ap_context_t *p, time_t t, const char *fmt, int gmt)
|
||||||
{
|
{
|
||||||
/* ZZZ this function can be replaced by calls to time formatting routines
|
/* ZZZ this function can be replaced by calls to time formatting routines
|
||||||
in APR. */
|
in APR. */
|
||||||
@@ -191,7 +191,7 @@ API_EXPORT(char *) ap_ht_time(pool *p, time_t t, const char *fmt, int gmt)
|
|||||||
return ap_pstrdup(p, ts);
|
return ap_pstrdup(p, ts);
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_gm_timestr_822(pool *p, time_t sec)
|
API_EXPORT(char *) ap_gm_timestr_822(ap_context_t *p, time_t sec)
|
||||||
{
|
{
|
||||||
struct tm *tms;
|
struct tm *tms;
|
||||||
char *date_str = ap_palloc(p, 48 * sizeof(char));
|
char *date_str = ap_palloc(p, 48 * sizeof(char));
|
||||||
@@ -380,7 +380,7 @@ API_EXPORT(size_t) ap_regerror(int errcode, const regex_t *preg, char *errbuf, s
|
|||||||
* AT&T V8 regexp package.
|
* AT&T V8 regexp package.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
API_EXPORT(char *) ap_pregsub(pool *p, const char *input, const char *source,
|
API_EXPORT(char *) ap_pregsub(ap_context_t *p, const char *input, const char *source,
|
||||||
size_t nmatch, regmatch_t pmatch[])
|
size_t nmatch, regmatch_t pmatch[])
|
||||||
{
|
{
|
||||||
const char *src = input;
|
const char *src = input;
|
||||||
@@ -567,7 +567,7 @@ API_EXPORT(char *) ap_make_dirstr_prefix(char *d, const char *s, int n)
|
|||||||
/*
|
/*
|
||||||
* return the parent directory name including trailing / of the file s
|
* return the parent directory name including trailing / of the file s
|
||||||
*/
|
*/
|
||||||
API_EXPORT(char *) ap_make_dirstr_parent(pool *p, const char *s)
|
API_EXPORT(char *) ap_make_dirstr_parent(ap_context_t *p, const char *s)
|
||||||
{
|
{
|
||||||
char *last_slash = strrchr(s, '/');
|
char *last_slash = strrchr(s, '/');
|
||||||
char *d;
|
char *d;
|
||||||
@@ -589,7 +589,7 @@ API_EXPORT(char *) ap_make_dirstr_parent(pool *p, const char *s)
|
|||||||
* This function is deprecated. Use one of the preceeding two functions
|
* This function is deprecated. Use one of the preceeding two functions
|
||||||
* which are faster.
|
* which are faster.
|
||||||
*/
|
*/
|
||||||
API_EXPORT(char *) ap_make_dirstr(pool *p, const char *s, int n)
|
API_EXPORT(char *) ap_make_dirstr(ap_context_t *p, const char *s, int n)
|
||||||
{
|
{
|
||||||
register int x, f;
|
register int x, f;
|
||||||
char *res;
|
char *res;
|
||||||
@@ -640,12 +640,12 @@ API_EXPORT(void) ap_chdir_file(const char *file)
|
|||||||
* error... ah well. */
|
* error... ah well. */
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_getword_nc(pool *atrans, char **line, char stop)
|
API_EXPORT(char *) ap_getword_nc(ap_context_t *atrans, char **line, char stop)
|
||||||
{
|
{
|
||||||
return ap_getword(atrans, (const char **) line, stop);
|
return ap_getword(atrans, (const char **) line, stop);
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_getword(pool *atrans, const char **line, char stop)
|
API_EXPORT(char *) ap_getword(ap_context_t *atrans, const char **line, char stop)
|
||||||
{
|
{
|
||||||
char *pos = strchr(*line, stop);
|
char *pos = strchr(*line, stop);
|
||||||
char *res;
|
char *res;
|
||||||
@@ -667,12 +667,12 @@ API_EXPORT(char *) ap_getword(pool *atrans, const char **line, char stop)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_getword_white_nc(pool *atrans, char **line)
|
API_EXPORT(char *) ap_getword_white_nc(ap_context_t *atrans, char **line)
|
||||||
{
|
{
|
||||||
return ap_getword_white(atrans, (const char **) line);
|
return ap_getword_white(atrans, (const char **) line);
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_getword_white(pool *atrans, const char **line)
|
API_EXPORT(char *) ap_getword_white(ap_context_t *atrans, const char **line)
|
||||||
{
|
{
|
||||||
int pos = -1, x;
|
int pos = -1, x;
|
||||||
char *res;
|
char *res;
|
||||||
@@ -701,12 +701,12 @@ API_EXPORT(char *) ap_getword_white(pool *atrans, const char **line)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_getword_nulls_nc(pool *atrans, char **line, char stop)
|
API_EXPORT(char *) ap_getword_nulls_nc(ap_context_t *atrans, char **line, char stop)
|
||||||
{
|
{
|
||||||
return ap_getword_nulls(atrans, (const char **) line, stop);
|
return ap_getword_nulls(atrans, (const char **) line, stop);
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_getword_nulls(pool *atrans, const char **line, char stop)
|
API_EXPORT(char *) ap_getword_nulls(ap_context_t *atrans, const char **line, char stop)
|
||||||
{
|
{
|
||||||
char *pos = strchr(*line, stop);
|
char *pos = strchr(*line, stop);
|
||||||
char *res;
|
char *res;
|
||||||
@@ -730,7 +730,7 @@ API_EXPORT(char *) ap_getword_nulls(pool *atrans, const char **line, char stop)
|
|||||||
* all honored
|
* all honored
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static char *substring_conf(pool *p, const char *start, int len, char quote)
|
static char *substring_conf(ap_context_t *p, const char *start, int len, char quote)
|
||||||
{
|
{
|
||||||
char *result = ap_palloc(p, len + 2);
|
char *result = ap_palloc(p, len + 2);
|
||||||
char *resp = result;
|
char *resp = result;
|
||||||
@@ -748,12 +748,12 @@ static char *substring_conf(pool *p, const char *start, int len, char quote)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_getword_conf_nc(pool *p, char **line)
|
API_EXPORT(char *) ap_getword_conf_nc(ap_context_t *p, char **line)
|
||||||
{
|
{
|
||||||
return ap_getword_conf(p, (const char **) line);
|
return ap_getword_conf(p, (const char **) line);
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_getword_conf(pool *p, const char **line)
|
API_EXPORT(char *) ap_getword_conf(ap_context_t *p, const char **line)
|
||||||
{
|
{
|
||||||
const char *str = *line, *strend;
|
const char *str = *line, *strend;
|
||||||
char *res;
|
char *res;
|
||||||
@@ -803,9 +803,9 @@ API_EXPORT(int) ap_cfg_closefile(configfile_t *cfp)
|
|||||||
return (cfp->close == NULL) ? 0 : cfp->close(cfp->param);
|
return (cfp->close == NULL) ? 0 : cfp->close(cfp->param);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Common structure that holds the file and pool for ap_pcfg_openfile */
|
/* Common structure that holds the file and ap_context_t for ap_pcfg_openfile */
|
||||||
typedef struct {
|
typedef struct {
|
||||||
struct pool *pool;
|
ap_context_t *pool;
|
||||||
FILE *file;
|
FILE *file;
|
||||||
} poolfile_t;
|
} poolfile_t;
|
||||||
|
|
||||||
@@ -828,7 +828,7 @@ static void *cfg_getstr(void *buf, size_t bufsiz, void *param)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Open a configfile_t as FILE, return open configfile_t struct pointer */
|
/* Open a configfile_t as FILE, return open configfile_t struct pointer */
|
||||||
API_EXPORT(configfile_t *) ap_pcfg_openfile(pool *p, const char *name)
|
API_EXPORT(configfile_t *) ap_pcfg_openfile(ap_context_t *p, const char *name)
|
||||||
{
|
{
|
||||||
configfile_t *new_cfg;
|
configfile_t *new_cfg;
|
||||||
poolfile_t *new_pfile;
|
poolfile_t *new_pfile;
|
||||||
@@ -895,7 +895,7 @@ API_EXPORT(configfile_t *) ap_pcfg_openfile(pool *p, const char *name)
|
|||||||
|
|
||||||
|
|
||||||
/* Allocate a configfile_t handle with user defined functions and params */
|
/* Allocate a configfile_t handle with user defined functions and params */
|
||||||
API_EXPORT(configfile_t *) ap_pcfg_open_custom(pool *p, const char *descr,
|
API_EXPORT(configfile_t *) ap_pcfg_open_custom(ap_context_t *p, const char *descr,
|
||||||
void *param,
|
void *param,
|
||||||
int(*getch)(void *param),
|
int(*getch)(void *param),
|
||||||
void *(*getstr) (void *buf, size_t bufsiz, void *param),
|
void *(*getstr) (void *buf, size_t bufsiz, void *param),
|
||||||
@@ -1126,7 +1126,7 @@ API_EXPORT(const char *) ap_size_list_item(const char **field, int *len)
|
|||||||
* the converted list item (or NULL if none) and the address pointed to by
|
* the converted list item (or NULL if none) and the address pointed to by
|
||||||
* field is shifted to the next non-comma, non-whitespace.
|
* field is shifted to the next non-comma, non-whitespace.
|
||||||
*/
|
*/
|
||||||
API_EXPORT(char *) ap_get_list_item(pool *p, const char **field)
|
API_EXPORT(char *) ap_get_list_item(ap_context_t *p, const char **field)
|
||||||
{
|
{
|
||||||
const char *tok_start;
|
const char *tok_start;
|
||||||
const unsigned char *ptr;
|
const unsigned char *ptr;
|
||||||
@@ -1215,7 +1215,7 @@ API_EXPORT(char *) ap_get_list_item(pool *p, const char **field)
|
|||||||
* This would be much more efficient if we stored header fields as
|
* This would be much more efficient if we stored header fields as
|
||||||
* an array of list items as they are received instead of a plain string.
|
* an array of list items as they are received instead of a plain string.
|
||||||
*/
|
*/
|
||||||
API_EXPORT(int) ap_find_list_item(pool *p, const char *line, const char *tok)
|
API_EXPORT(int) ap_find_list_item(ap_context_t *p, const char *line, const char *tok)
|
||||||
{
|
{
|
||||||
const unsigned char *pos;
|
const unsigned char *pos;
|
||||||
const unsigned char *ptr = (const unsigned char *)line;
|
const unsigned char *ptr = (const unsigned char *)line;
|
||||||
@@ -1318,7 +1318,7 @@ API_EXPORT(int) ap_find_list_item(pool *p, const char *line, const char *tok)
|
|||||||
* by whitespace at the caller's option.
|
* by whitespace at the caller's option.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
API_EXPORT(char *) ap_get_token(pool *p, const char **accept_line, int accept_white)
|
API_EXPORT(char *) ap_get_token(ap_context_t *p, const char **accept_line, int accept_white)
|
||||||
{
|
{
|
||||||
const char *ptr = *accept_line;
|
const char *ptr = *accept_line;
|
||||||
const char *tok_start;
|
const char *tok_start;
|
||||||
@@ -1358,7 +1358,7 @@ API_EXPORT(char *) ap_get_token(pool *p, const char **accept_line, int accept_wh
|
|||||||
|
|
||||||
|
|
||||||
/* find http tokens, see the definition of token from RFC2068 */
|
/* find http tokens, see the definition of token from RFC2068 */
|
||||||
API_EXPORT(int) ap_find_token(pool *p, const char *line, const char *tok)
|
API_EXPORT(int) ap_find_token(ap_context_t *p, const char *line, const char *tok)
|
||||||
{
|
{
|
||||||
const unsigned char *start_token;
|
const unsigned char *start_token;
|
||||||
const unsigned char *s;
|
const unsigned char *s;
|
||||||
@@ -1392,7 +1392,7 @@ API_EXPORT(int) ap_find_token(pool *p, const char *line, const char *tok)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
API_EXPORT(int) ap_find_last_token(pool *p, const char *line, const char *tok)
|
API_EXPORT(int) ap_find_last_token(ap_context_t *p, const char *line, const char *tok)
|
||||||
{
|
{
|
||||||
int llen, tlen, lidx;
|
int llen, tlen, lidx;
|
||||||
|
|
||||||
@@ -1410,7 +1410,7 @@ API_EXPORT(int) ap_find_last_token(pool *p, const char *line, const char *tok)
|
|||||||
return (strncasecmp(&line[lidx], tok, tlen) == 0);
|
return (strncasecmp(&line[lidx], tok, tlen) == 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_escape_shell_cmd(pool *p, const char *str)
|
API_EXPORT(char *) ap_escape_shell_cmd(ap_context_t *p, const char *str)
|
||||||
{
|
{
|
||||||
char *cmd;
|
char *cmd;
|
||||||
unsigned char *d;
|
unsigned char *d;
|
||||||
@@ -1508,7 +1508,7 @@ API_EXPORT(int) ap_unescape_url(char *url)
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_construct_server(pool *p, const char *hostname,
|
API_EXPORT(char *) ap_construct_server(ap_context_t *p, const char *hostname,
|
||||||
unsigned port, const request_rec *r)
|
unsigned port, const request_rec *r)
|
||||||
{
|
{
|
||||||
if (ap_is_default_port(port, r))
|
if (ap_is_default_port(port, r))
|
||||||
@@ -1553,7 +1553,7 @@ static ap_inline unsigned char *c2x(unsigned what, unsigned char *where)
|
|||||||
* something with a '/' in it (and thus does not prefix "./").
|
* something with a '/' in it (and thus does not prefix "./").
|
||||||
*/
|
*/
|
||||||
|
|
||||||
API_EXPORT(char *) ap_escape_path_segment(pool *p, const char *segment)
|
API_EXPORT(char *) ap_escape_path_segment(ap_context_t *p, const char *segment)
|
||||||
{
|
{
|
||||||
char *copy = ap_palloc(p, 3 * strlen(segment) + 1);
|
char *copy = ap_palloc(p, 3 * strlen(segment) + 1);
|
||||||
const unsigned char *s = (const unsigned char *)segment;
|
const unsigned char *s = (const unsigned char *)segment;
|
||||||
@@ -1573,7 +1573,7 @@ API_EXPORT(char *) ap_escape_path_segment(pool *p, const char *segment)
|
|||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_os_escape_path(pool *p, const char *path, int partial)
|
API_EXPORT(char *) ap_os_escape_path(ap_context_t *p, const char *path, int partial)
|
||||||
{
|
{
|
||||||
char *copy = ap_palloc(p, 3 * strlen(path) + 3);
|
char *copy = ap_palloc(p, 3 * strlen(path) + 3);
|
||||||
const unsigned char *s = (const unsigned char *)path;
|
const unsigned char *s = (const unsigned char *)path;
|
||||||
@@ -1604,7 +1604,7 @@ API_EXPORT(char *) ap_os_escape_path(pool *p, const char *path, int partial)
|
|||||||
|
|
||||||
/* ap_escape_uri is now a macro for os_escape_path */
|
/* ap_escape_uri is now a macro for os_escape_path */
|
||||||
|
|
||||||
API_EXPORT(char *) ap_escape_html(pool *p, const char *s)
|
API_EXPORT(char *) ap_escape_html(ap_context_t *p, const char *s)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
char *x;
|
char *x;
|
||||||
@@ -1651,7 +1651,7 @@ API_EXPORT(int) ap_is_directory(const char *path)
|
|||||||
return (S_ISDIR(finfo.st_mode));
|
return (S_ISDIR(finfo.st_mode));
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_make_full_path(pool *a, const char *src1,
|
API_EXPORT(char *) ap_make_full_path(ap_context_t *a, const char *src1,
|
||||||
const char *src2)
|
const char *src2)
|
||||||
{
|
{
|
||||||
register int x;
|
register int x;
|
||||||
@@ -1941,7 +1941,7 @@ unsigned long ap_get_virthost_addr(char *w, unsigned short *ports)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static char *find_fqdn(pool *a, struct hostent *p)
|
static char *find_fqdn(ap_context_t *a, struct hostent *p)
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
@@ -1956,7 +1956,7 @@ static char *find_fqdn(pool *a, struct hostent *p)
|
|||||||
return ap_pstrdup(a, (void *) p->h_name);
|
return ap_pstrdup(a, (void *) p->h_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *ap_get_local_host(pool *a)
|
char *ap_get_local_host(ap_context_t *a)
|
||||||
{
|
{
|
||||||
#ifndef MAXHOSTNAMELEN
|
#ifndef MAXHOSTNAMELEN
|
||||||
#define MAXHOSTNAMELEN 256
|
#define MAXHOSTNAMELEN 256
|
||||||
@@ -1988,7 +1988,7 @@ char *ap_get_local_host(pool *a)
|
|||||||
|
|
||||||
/* simple 'pool' alloc()ing glue to ap_base64.c
|
/* simple 'pool' alloc()ing glue to ap_base64.c
|
||||||
*/
|
*/
|
||||||
API_EXPORT(char *) ap_pbase64decode(pool *p, const char *bufcoded)
|
API_EXPORT(char *) ap_pbase64decode(ap_context_t *p, const char *bufcoded)
|
||||||
{
|
{
|
||||||
char *decoded;
|
char *decoded;
|
||||||
int l;
|
int l;
|
||||||
@@ -2000,7 +2000,7 @@ API_EXPORT(char *) ap_pbase64decode(pool *p, const char *bufcoded)
|
|||||||
return decoded;
|
return decoded;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_pbase64encode(pool *p, char *string)
|
API_EXPORT(char *) ap_pbase64encode(ap_context_t *p, char *string)
|
||||||
{
|
{
|
||||||
char *encoded;
|
char *encoded;
|
||||||
int l = strlen(string);
|
int l = strlen(string);
|
||||||
@@ -2014,12 +2014,12 @@ API_EXPORT(char *) ap_pbase64encode(pool *p, char *string)
|
|||||||
|
|
||||||
/* deprecated names for the above two functions, here for compatibility
|
/* deprecated names for the above two functions, here for compatibility
|
||||||
*/
|
*/
|
||||||
API_EXPORT(char *) ap_uudecode(pool *p, const char *bufcoded)
|
API_EXPORT(char *) ap_uudecode(ap_context_t *p, const char *bufcoded)
|
||||||
{
|
{
|
||||||
return ap_pbase64decode(p, bufcoded);
|
return ap_pbase64decode(p, bufcoded);
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_uuencode(pool *p, char *string)
|
API_EXPORT(char *) ap_uuencode(ap_context_t *p, char *string)
|
||||||
{
|
{
|
||||||
return ap_pbase64encode(p, string);
|
return ap_pbase64encode(p, string);
|
||||||
}
|
}
|
||||||
@@ -2053,7 +2053,7 @@ void os2pathname(char *path)
|
|||||||
/* quotes in the string are doubled up.
|
/* quotes in the string are doubled up.
|
||||||
* Used to escape quotes in args passed to OS/2's cmd.exe
|
* Used to escape quotes in args passed to OS/2's cmd.exe
|
||||||
*/
|
*/
|
||||||
char *ap_double_quotes(pool *p, char *str)
|
char *ap_double_quotes(ap_context_t *p, char *str)
|
||||||
{
|
{
|
||||||
int num_quotes = 0;
|
int num_quotes = 0;
|
||||||
int len = 0;
|
int len = 0;
|
||||||
@@ -2125,7 +2125,7 @@ API_EXPORT(void) ap_content_type_tolower(char *str)
|
|||||||
/*
|
/*
|
||||||
* Given a string, replace any bare " with \" .
|
* Given a string, replace any bare " with \" .
|
||||||
*/
|
*/
|
||||||
API_EXPORT(char *) ap_escape_quotes (pool *p, const char *instring)
|
API_EXPORT(char *) ap_escape_quotes (ap_context_t *p, const char *instring)
|
||||||
{
|
{
|
||||||
int newlen = 0;
|
int newlen = 0;
|
||||||
const char *inchr = instring;
|
const char *inchr = instring;
|
||||||
|
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* util_date.c: date parsing utility routines
|
* util_date.c: date parsing utility routines
|
||||||
* These routines are (hopefully) platform-independent.
|
* These routines are (hopefully) platform ap_context_t ndependent.
|
||||||
*
|
*
|
||||||
* 27 Oct 1996 Roy Fielding
|
* 27 Oct 1996 Roy Fielding
|
||||||
* Extracted (with many modifications) from mod_proxy.c and
|
* Extracted (with many modifications) from mod_proxy.c and
|
||||||
|
@@ -87,7 +87,7 @@
|
|||||||
#include "httpd.h"
|
#include "httpd.h"
|
||||||
#include "util_md5.h"
|
#include "util_md5.h"
|
||||||
|
|
||||||
API_EXPORT(char *) ap_md5_binary(pool *p, const unsigned char *buf, int length)
|
API_EXPORT(char *) ap_md5_binary(ap_context_t *p, const unsigned char *buf, int length)
|
||||||
{
|
{
|
||||||
const char *hex = "0123456789abcdef";
|
const char *hex = "0123456789abcdef";
|
||||||
AP_MD5_CTX my_md5;
|
AP_MD5_CTX my_md5;
|
||||||
@@ -112,7 +112,7 @@ API_EXPORT(char *) ap_md5_binary(pool *p, const unsigned char *buf, int length)
|
|||||||
return ap_pstrdup(p, result);
|
return ap_pstrdup(p, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char *) ap_md5(pool *p, const unsigned char *string)
|
API_EXPORT(char *) ap_md5(ap_context_t *p, const unsigned char *string)
|
||||||
{
|
{
|
||||||
return ap_md5_binary(p, string, (int) strlen((char *)string));
|
return ap_md5_binary(p, string, (int) strlen((char *)string));
|
||||||
}
|
}
|
||||||
@@ -162,7 +162,7 @@ API_EXPORT(char *) ap_md5(pool *p, const unsigned char *string)
|
|||||||
static char basis_64[] =
|
static char basis_64[] =
|
||||||
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
||||||
|
|
||||||
API_EXPORT(char *) ap_md5contextTo64(pool *a, AP_MD5_CTX * context)
|
API_EXPORT(char *) ap_md5contextTo64(ap_context_t *a, AP_MD5_CTX * context)
|
||||||
{
|
{
|
||||||
unsigned char digest[18];
|
unsigned char digest[18];
|
||||||
char *encodedDigest;
|
char *encodedDigest;
|
||||||
@@ -189,7 +189,7 @@ API_EXPORT(char *) ap_md5contextTo64(pool *a, AP_MD5_CTX * context)
|
|||||||
|
|
||||||
#ifdef CHARSET_EBCDIC
|
#ifdef CHARSET_EBCDIC
|
||||||
|
|
||||||
API_EXPORT(char *) ap_md5digest(pool *p, APRFile infile, int convert)
|
API_EXPORT(char *) ap_md5digest(ap_context_t *p, APRFile infile, int convert)
|
||||||
{
|
{
|
||||||
AP_MD5_CTX context;
|
AP_MD5_CTX context;
|
||||||
unsigned char buf[1000];
|
unsigned char buf[1000];
|
||||||
@@ -212,7 +212,7 @@ API_EXPORT(char *) ap_md5digest(pool *p, APRFile infile, int convert)
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
API_EXPORT(char *) ap_md5digest(pool *p, APRFile infile)
|
API_EXPORT(char *) ap_md5digest(ap_context_t *p, APRFile infile)
|
||||||
{
|
{
|
||||||
AP_MD5_CTX context;
|
AP_MD5_CTX context;
|
||||||
unsigned char buf[1000];
|
unsigned char buf[1000];
|
||||||
|
@@ -94,7 +94,7 @@
|
|||||||
* are handled in create_argv.
|
* are handled in create_argv.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
static char **create_argv(pool *p, char *path, char *user, char *group,
|
static char **create_argv(ap_context_t *p, char *path, char *user, char *group,
|
||||||
char *av0, const char *args)
|
char *av0, const char *args)
|
||||||
{
|
{
|
||||||
int x, numwords;
|
int x, numwords;
|
||||||
@@ -137,7 +137,7 @@ static char **create_argv(pool *p, char *path, char *user, char *group,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static char *http2env(pool *a, char *w)
|
static char *http2env(ap_context_t *a, char *w)
|
||||||
{
|
{
|
||||||
char *res = ap_pstrcat(a, "HTTP_", w, NULL);
|
char *res = ap_pstrcat(a, "HTTP_", w, NULL);
|
||||||
char *cp = res;
|
char *cp = res;
|
||||||
@@ -154,10 +154,10 @@ static char *http2env(pool *a, char *w)
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
API_EXPORT(char **) ap_create_environment(pool *p, table *t)
|
API_EXPORT(char **) ap_create_environment(ap_context_t *p, ap_table_t *t)
|
||||||
{
|
{
|
||||||
array_header *env_arr = ap_table_elts(t);
|
ap_array_header_t *env_arr = ap_table_elts(t);
|
||||||
table_entry *elts = (table_entry *) env_arr->elts;
|
ap_table_entry_t *elts = (ap_table_entry_t *) env_arr->elts;
|
||||||
char **env = (char **) ap_palloc(p, (env_arr->nelts + 2) * sizeof(char *));
|
char **env = (char **) ap_palloc(p, (env_arr->nelts + 2) * sizeof(char *));
|
||||||
int i, j;
|
int i, j;
|
||||||
char *tz;
|
char *tz;
|
||||||
@@ -194,7 +194,7 @@ API_EXPORT(char **) ap_create_environment(pool *p, table *t)
|
|||||||
|
|
||||||
API_EXPORT(void) ap_add_common_vars(request_rec *r)
|
API_EXPORT(void) ap_add_common_vars(request_rec *r)
|
||||||
{
|
{
|
||||||
table *e;
|
ap_table_t *e;
|
||||||
server_rec *s = r->server;
|
server_rec *s = r->server;
|
||||||
conn_rec *c = r->connection;
|
conn_rec *c = r->connection;
|
||||||
const char *rem_logname;
|
const char *rem_logname;
|
||||||
@@ -203,11 +203,11 @@ API_EXPORT(void) ap_add_common_vars(request_rec *r)
|
|||||||
char *env_temp;
|
char *env_temp;
|
||||||
#endif
|
#endif
|
||||||
const char *host;
|
const char *host;
|
||||||
array_header *hdrs_arr = ap_table_elts(r->headers_in);
|
ap_array_header_t *hdrs_arr = ap_table_elts(r->headers_in);
|
||||||
table_entry *hdrs = (table_entry *) hdrs_arr->elts;
|
ap_table_entry_t *hdrs = (ap_table_entry_t *) hdrs_arr->elts;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
/* use a temporary table which we'll overlap onto
|
/* use a temporary ap_table_t which we'll overlap onto
|
||||||
* r->subprocess_env later
|
* r->subprocess_env later
|
||||||
*/
|
*/
|
||||||
e = ap_make_table(r->pool, 25 + hdrs_arr->nelts);
|
e = ap_make_table(r->pool, 25 + hdrs_arr->nelts);
|
||||||
@@ -332,7 +332,7 @@ API_EXPORT(int) ap_find_path_info(const char *uri, const char *path_info)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Obtain the Request-URI from the original request-line, returning
|
/* Obtain the Request-URI from the original request-line, returning
|
||||||
* a new string from the request pool containing the URI or "".
|
* a new string from the request ap_context_t containing the URI or "".
|
||||||
*/
|
*/
|
||||||
static char *original_uri(request_rec *r)
|
static char *original_uri(request_rec *r)
|
||||||
{
|
{
|
||||||
@@ -361,7 +361,7 @@ static char *original_uri(request_rec *r)
|
|||||||
|
|
||||||
API_EXPORT(void) ap_add_cgi_vars(request_rec *r)
|
API_EXPORT(void) ap_add_cgi_vars(request_rec *r)
|
||||||
{
|
{
|
||||||
table *e = r->subprocess_env;
|
ap_table_t *e = r->subprocess_env;
|
||||||
|
|
||||||
ap_table_setn(e, "GATEWAY_INTERFACE", "CGI/1.1");
|
ap_table_setn(e, "GATEWAY_INTERFACE", "CGI/1.1");
|
||||||
ap_table_setn(e, "SERVER_PROTOCOL", r->protocol);
|
ap_table_setn(e, "SERVER_PROTOCOL", r->protocol);
|
||||||
@@ -436,8 +436,8 @@ API_EXPORT(int) ap_scan_script_header_err_core(request_rec *r, char *buffer,
|
|||||||
char *w, *l;
|
char *w, *l;
|
||||||
int p;
|
int p;
|
||||||
int cgi_status = HTTP_OK;
|
int cgi_status = HTTP_OK;
|
||||||
table *merge;
|
ap_table_t *merge;
|
||||||
table *cookie_table;
|
ap_table_t *cookie_table;
|
||||||
|
|
||||||
if (buffer) {
|
if (buffer) {
|
||||||
*buffer = '\0';
|
*buffer = '\0';
|
||||||
@@ -649,7 +649,7 @@ API_EXPORT(void) ap_send_size(size_t size, request_rec *r)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if defined(OS2) || defined(WIN32)
|
#if defined(OS2) || defined(WIN32)
|
||||||
static char **create_argv_cmd(pool *p, char *av0, const char *args, char *path)
|
static char **create_argv_cmd(ap_context_t *p, char *av0, const char *args, char *path)
|
||||||
{
|
{
|
||||||
register int x, n;
|
register int x, n;
|
||||||
char **av;
|
char **av;
|
||||||
@@ -684,7 +684,7 @@ static char **create_argv_cmd(pool *p, char *av0, const char *args, char *path)
|
|||||||
/* ZZZ need to look at this in more depth and convert to an AP func so we
|
/* ZZZ need to look at this in more depth and convert to an AP func so we
|
||||||
can get rid of OS specific code.
|
can get rid of OS specific code.
|
||||||
*/
|
*/
|
||||||
API_EXPORT(int) ap_call_exec(request_rec *r, child_info *pinfo, char *argv0,
|
API_EXPORT(int) ap_call_exec(request_rec *r, ap_child_info_t *pinfo, char *argv0,
|
||||||
char **env, int shellcmd)
|
char **env, int shellcmd)
|
||||||
{
|
{
|
||||||
int pid = 0;
|
int pid = 0;
|
||||||
@@ -996,7 +996,7 @@ API_EXPORT(int) ap_call_exec(request_rec *r, child_info *pinfo, char *argv0,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
/* TODO: re-implement suexec */
|
/* TODO: re ap_context_t mplement suexec */
|
||||||
#if 0
|
#if 0
|
||||||
if (ap_suexec_enabled
|
if (ap_suexec_enabled
|
||||||
&& ((r->server->server_uid != ap_user_id)
|
&& ((r->server->server_uid != ap_user_id)
|
||||||
|
@@ -103,7 +103,7 @@ API_EXPORT(unsigned short) ap_default_port_for_request(const request_rec *r)
|
|||||||
* from a call to gethostbyname() and lives in static storage.
|
* from a call to gethostbyname() and lives in static storage.
|
||||||
* By creating a copy we can tuck it away for later use.
|
* By creating a copy we can tuck it away for later use.
|
||||||
*/
|
*/
|
||||||
API_EXPORT(struct hostent *) ap_pduphostent(pool *p, const struct hostent *hp)
|
API_EXPORT(struct hostent *) ap_pduphostent(ap_context_t *p, const struct hostent *hp)
|
||||||
{
|
{
|
||||||
struct hostent *newent;
|
struct hostent *newent;
|
||||||
char **ptrs;
|
char **ptrs;
|
||||||
@@ -156,7 +156,7 @@ API_EXPORT(struct hostent *) ap_pduphostent(pool *p, const struct hostent *hp)
|
|||||||
* COPY OF the hostent structure, intended to be stored and used later.
|
* COPY OF the hostent structure, intended to be stored and used later.
|
||||||
* (gethostbyname() uses static storage that would be overwritten on each call)
|
* (gethostbyname() uses static storage that would be overwritten on each call)
|
||||||
*/
|
*/
|
||||||
API_EXPORT(struct hostent *) ap_pgethostbyname(pool *p, const char *hostname)
|
API_EXPORT(struct hostent *) ap_pgethostbyname(ap_context_t *p, const char *hostname)
|
||||||
{
|
{
|
||||||
struct hostent *hp = gethostbyname(hostname);
|
struct hostent *hp = gethostbyname(hostname);
|
||||||
return (hp == NULL) ? NULL : ap_pduphostent(p, hp);
|
return (hp == NULL) ? NULL : ap_pduphostent(p, hp);
|
||||||
@@ -166,7 +166,7 @@ API_EXPORT(struct hostent *) ap_pgethostbyname(pool *p, const char *hostname)
|
|||||||
/* Unparse a uri_components structure to an URI string.
|
/* Unparse a uri_components structure to an URI string.
|
||||||
* Optionally suppress the password for security reasons.
|
* Optionally suppress the password for security reasons.
|
||||||
*/
|
*/
|
||||||
API_EXPORT(char *) ap_unparse_uri_components(pool *p, const uri_components *uptr, unsigned flags)
|
API_EXPORT(char *) ap_unparse_uri_components(ap_context_t *p, const uri_components *uptr, unsigned flags)
|
||||||
{
|
{
|
||||||
char *ret = "";
|
char *ret = "";
|
||||||
|
|
||||||
@@ -298,7 +298,7 @@ void ap_util_uri_init(void)
|
|||||||
* - fills in fields of uri_components *uptr
|
* - fills in fields of uri_components *uptr
|
||||||
* - none on any of the r->* fields
|
* - none on any of the r->* fields
|
||||||
*/
|
*/
|
||||||
API_EXPORT(int) ap_parse_uri_components(pool *p, const char *uri, uri_components *uptr)
|
API_EXPORT(int) ap_parse_uri_components(ap_context_t *p, const char *uri, uri_components *uptr)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
regmatch_t match[10]; /* This must have at least as much elements
|
regmatch_t match[10]; /* This must have at least as much elements
|
||||||
@@ -400,7 +400,7 @@ API_EXPORT(int) ap_parse_uri_components(pool *p, const char *uri, uri_components
|
|||||||
* that fast memchr()s use. But that would be way non-portable. -djg
|
* that fast memchr()s use. But that would be way non-portable. -djg
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* We have a table that we can index by character and it tells us if the
|
/* We have a ap_table_t that we can index by character and it tells us if the
|
||||||
* character is one of the interesting delimiters. Note that we even get
|
* character is one of the interesting delimiters. Note that we even get
|
||||||
* compares for NUL for free -- it's just another delimiter.
|
* compares for NUL for free -- it's just another delimiter.
|
||||||
*/
|
*/
|
||||||
@@ -440,7 +440,7 @@ void ap_util_uri_init(void)
|
|||||||
* - fills in fields of uri_components *uptr
|
* - fills in fields of uri_components *uptr
|
||||||
* - none on any of the r->* fields
|
* - none on any of the r->* fields
|
||||||
*/
|
*/
|
||||||
API_EXPORT(int) ap_parse_uri_components(pool *p, const char *uri, uri_components *uptr)
|
API_EXPORT(int) ap_parse_uri_components(ap_context_t *p, const char *uri, uri_components *uptr)
|
||||||
{
|
{
|
||||||
const char *s;
|
const char *s;
|
||||||
const char *s1;
|
const char *s1;
|
||||||
@@ -564,7 +564,7 @@ deal_with_host:
|
|||||||
* currently at http://www.mcom.com/newsref/std/tunneling_ssl.html
|
* currently at http://www.mcom.com/newsref/std/tunneling_ssl.html
|
||||||
* for the format of the "CONNECT host:port HTTP/1.0" request
|
* for the format of the "CONNECT host:port HTTP/1.0" request
|
||||||
*/
|
*/
|
||||||
API_EXPORT(int) ap_parse_hostinfo_components(pool *p, const char *hostinfo, uri_components *uptr)
|
API_EXPORT(int) ap_parse_hostinfo_components(ap_context_t *p, const char *hostinfo, uri_components *uptr)
|
||||||
{
|
{
|
||||||
const char *s;
|
const char *s;
|
||||||
char *endstr;
|
char *endstr;
|
||||||
|
@@ -98,7 +98,7 @@ struct ipaddr_chain {
|
|||||||
* sharing this address */
|
* sharing this address */
|
||||||
};
|
};
|
||||||
|
|
||||||
/* This defines the size of the hash table used for hashing ip addresses
|
/* This defines the size of the hash ap_table_t used for hashing ip addresses
|
||||||
* of virtual hosts. It must be a power of two.
|
* of virtual hosts. It must be a power of two.
|
||||||
*/
|
*/
|
||||||
#ifndef IPHASH_TABLE_SIZE
|
#ifndef IPHASH_TABLE_SIZE
|
||||||
@@ -148,7 +148,7 @@ static server_addr_rec **name_vhost_list_tail;
|
|||||||
|
|
||||||
|
|
||||||
/* called at the beginning of the config */
|
/* called at the beginning of the config */
|
||||||
void ap_init_vhost_config(pool *p)
|
void ap_init_vhost_config(ap_context_t *p)
|
||||||
{
|
{
|
||||||
memset(iphash_table, 0, sizeof(iphash_table));
|
memset(iphash_table, 0, sizeof(iphash_table));
|
||||||
default_list = NULL;
|
default_list = NULL;
|
||||||
@@ -164,7 +164,7 @@ void ap_init_vhost_config(pool *p)
|
|||||||
* *paddr is the variable used to keep track of **paddr between calls
|
* *paddr is the variable used to keep track of **paddr between calls
|
||||||
* port is the default port to assume
|
* port is the default port to assume
|
||||||
*/
|
*/
|
||||||
static const char *get_addresses(pool *p, char *w, server_addr_rec ***paddr,
|
static const char *get_addresses(ap_context_t *p, char *w, server_addr_rec ***paddr,
|
||||||
unsigned port)
|
unsigned port)
|
||||||
{
|
{
|
||||||
/* ZZZ redesign to use AP funcs and types. Will see what I can do to make it
|
/* ZZZ redesign to use AP funcs and types. Will see what I can do to make it
|
||||||
@@ -244,7 +244,7 @@ static const char *get_addresses(pool *p, char *w, server_addr_rec ***paddr,
|
|||||||
|
|
||||||
|
|
||||||
/* parse the <VirtualHost> addresses */
|
/* parse the <VirtualHost> addresses */
|
||||||
const char *ap_parse_vhost_addrs(pool *p, const char *hostname, server_rec *s)
|
const char *ap_parse_vhost_addrs(ap_context_t *p, const char *hostname, server_rec *s)
|
||||||
{
|
{
|
||||||
server_addr_rec **addrs;
|
server_addr_rec **addrs;
|
||||||
const char *err;
|
const char *err;
|
||||||
@@ -278,7 +278,7 @@ const char *ap_set_name_virtual_host (cmd_parms *cmd, void *dummy, char *arg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* hash table statistics, keep this in here for the beta period so
|
/* hash ap_table_t statistics, keep this in here for the beta period so
|
||||||
* we can find out if the hash function is ok
|
* we can find out if the hash function is ok
|
||||||
*/
|
*/
|
||||||
#ifdef IPHASH_STATISTICS
|
#ifdef IPHASH_STATISTICS
|
||||||
@@ -349,7 +349,7 @@ static ap_inline unsigned hash_inaddr(unsigned key)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
static ipaddr_chain *new_ipaddr_chain(pool *p,
|
static ipaddr_chain *new_ipaddr_chain(ap_context_t *p,
|
||||||
server_rec *s, server_addr_rec *sar)
|
server_rec *s, server_addr_rec *sar)
|
||||||
{
|
{
|
||||||
ipaddr_chain *new;
|
ipaddr_chain *new;
|
||||||
@@ -363,7 +363,7 @@ static ipaddr_chain *new_ipaddr_chain(pool *p,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static name_chain *new_name_chain(pool *p, server_rec *s, server_addr_rec *sar)
|
static name_chain *new_name_chain(ap_context_t *p, server_rec *s, server_addr_rec *sar)
|
||||||
{
|
{
|
||||||
name_chain *new;
|
name_chain *new;
|
||||||
|
|
||||||
@@ -382,7 +382,7 @@ static ap_inline ipaddr_chain *find_ipaddr(struct in_addr *server_ip,
|
|||||||
ipaddr_chain *trav;
|
ipaddr_chain *trav;
|
||||||
unsigned addr;
|
unsigned addr;
|
||||||
|
|
||||||
/* scan the hash table for an exact match first */
|
/* scan the hash ap_table_t for an exact match first */
|
||||||
addr = server_ip->s_addr;
|
addr = server_ip->s_addr;
|
||||||
bucket = hash_inaddr(addr);
|
bucket = hash_inaddr(addr);
|
||||||
for (trav = iphash_table[bucket]; trav; trav = trav->next) {
|
for (trav = iphash_table[bucket]; trav; trav = trav->next) {
|
||||||
@@ -473,7 +473,7 @@ static void dump_vhost_config(APRFile fd)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* compile the tables and such we need to do the run-time vhost lookups */
|
/* compile the tables and such we need to do the run-time vhost lookups */
|
||||||
void ap_fini_vhost_config(pool *p, server_rec *main_s)
|
void ap_fini_vhost_config(ap_context_t *p, server_rec *main_s)
|
||||||
{
|
{
|
||||||
/* ZZZ need to redesign for use with AP funcs. will look into this later.
|
/* ZZZ need to redesign for use with AP funcs. will look into this later.
|
||||||
*/
|
*/
|
||||||
@@ -498,7 +498,7 @@ void ap_fini_vhost_config(pool *p, server_rec *main_s)
|
|||||||
iphash_table_tail[i] = &iphash_table[i];
|
iphash_table_tail[i] = &iphash_table[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The first things to go into the hash table are the NameVirtualHosts
|
/* The first things to go into the hash ap_table_t are the NameVirtualHosts
|
||||||
* Since name_vhost_list is in the same order that the directives
|
* Since name_vhost_list is in the same order that the directives
|
||||||
* occured in the config file, we'll copy it in that order.
|
* occured in the config file, we'll copy it in that order.
|
||||||
*/
|
*/
|
||||||
@@ -514,7 +514,7 @@ void ap_fini_vhost_config(pool *p, server_rec *main_s)
|
|||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The next things to go into the hash table are the virtual hosts
|
/* The next things to go into the hash ap_table_t are the virtual hosts
|
||||||
* themselves. They're listed off of main_s->next in the reverse
|
* themselves. They're listed off of main_s->next in the reverse
|
||||||
* order they occured in the config file, so we insert them at
|
* order they occured in the config file, so we insert them at
|
||||||
* the iphash_table_tail but don't advance the tail.
|
* the iphash_table_tail but don't advance the tail.
|
||||||
@@ -687,7 +687,7 @@ static void fix_hostname(request_rec *r)
|
|||||||
static int matches_aliases(server_rec *s, const char *host)
|
static int matches_aliases(server_rec *s, const char *host)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
array_header *names;
|
ap_array_header_t *names;
|
||||||
|
|
||||||
/* match ServerName */
|
/* match ServerName */
|
||||||
if (!strcasecmp(host, s->server_hostname)) {
|
if (!strcasecmp(host, s->server_hostname)) {
|
||||||
@@ -902,7 +902,7 @@ void ap_update_vhost_given_ip(conn_rec *conn)
|
|||||||
ipaddr_chain *trav;
|
ipaddr_chain *trav;
|
||||||
unsigned port = ntohs(conn->local_addr.sin_port);
|
unsigned port = ntohs(conn->local_addr.sin_port);
|
||||||
|
|
||||||
/* scan the hash table for an exact match first */
|
/* scan the hash ap_table_t for an exact match first */
|
||||||
trav = find_ipaddr(&conn->local_addr.sin_addr, port);
|
trav = find_ipaddr(&conn->local_addr.sin_addr, port);
|
||||||
if (trav) {
|
if (trav) {
|
||||||
/* save the name_chain for later in case this is a name-vhost */
|
/* save the name_chain for later in case this is a name-vhost */
|
||||||
|
@@ -246,7 +246,7 @@ same byte that represents that character in ASCII.
|
|||||||
3. All characters encoded must have Unicode scalar values <= 0xFFFF,
|
3. All characters encoded must have Unicode scalar values <= 0xFFFF,
|
||||||
(ie characters that would be encoded by surrogates in UTF-16
|
(ie characters that would be encoded by surrogates in UTF-16
|
||||||
are not allowed). Note that this restriction doesn't apply to
|
are not allowed). Note that this restriction doesn't apply to
|
||||||
the built-in support for UTF-8 and UTF-16.
|
the built ap_context_t n support for UTF-8 and UTF-16.
|
||||||
|
|
||||||
4. No Unicode character may be encoded by more than one distinct sequence
|
4. No Unicode character may be encoded by more than one distinct sequence
|
||||||
of bytes. */
|
of bytes. */
|
||||||
|
@@ -80,7 +80,7 @@
|
|||||||
** - Enhanced by Dean Gaudet <dgaudet@apache.org>, November 1997
|
** - Enhanced by Dean Gaudet <dgaudet@apache.org>, November 1997
|
||||||
** - Cleaned up by Ralf S. Engelschall <rse@apache.org>, March 1998
|
** - Cleaned up by Ralf S. Engelschall <rse@apache.org>, March 1998
|
||||||
** - POST and verbosity by Kurt Sussman <kls@merlot.com>, August 1998
|
** - POST and verbosity by Kurt Sussman <kls@merlot.com>, August 1998
|
||||||
** - HTML table output added by David N. Welton <davidw@prosa.it>, January 1999
|
** - HTML ap_table_t output added by David N. Welton <davidw@prosa.it>, January 1999
|
||||||
** - Added Cookie, Arbitrary header and auth support. <dirkx@webweaving.org>, April 199
|
** - Added Cookie, Arbitrary header and auth support. <dirkx@webweaving.org>, April 199
|
||||||
**
|
**
|
||||||
*/
|
*/
|
||||||
@@ -890,7 +890,7 @@ static void usage(char *progname)
|
|||||||
fprintf(stderr, " -T content-type Content-type header for POSTing\n");
|
fprintf(stderr, " -T content-type Content-type header for POSTing\n");
|
||||||
fprintf(stderr, " -v verbosity How much troubleshooting info to print\n");
|
fprintf(stderr, " -v verbosity How much troubleshooting info to print\n");
|
||||||
fprintf(stderr, " -w Print out results in HTML tables\n");
|
fprintf(stderr, " -w Print out results in HTML tables\n");
|
||||||
fprintf(stderr, " -x attributes String to insert as table attributes\n");
|
fprintf(stderr, " -x attributes String to insert as ap_table_t attributes\n");
|
||||||
fprintf(stderr, " -y attributes String to insert as tr attributes\n");
|
fprintf(stderr, " -y attributes String to insert as tr attributes\n");
|
||||||
fprintf(stderr, " -z attributes String to insert as td or th attributes\n");
|
fprintf(stderr, " -z attributes String to insert as td or th attributes\n");
|
||||||
fprintf(stderr, " -C attribute Add cookie, eg. 'Apache=1234. (repeatable)\n");
|
fprintf(stderr, " -C attribute Add cookie, eg. 'Apache=1234. (repeatable)\n");
|
||||||
@@ -975,7 +975,7 @@ int main(int argc, char **argv)
|
|||||||
int c, r,l;
|
int c, r,l;
|
||||||
char tmp[1024];
|
char tmp[1024];
|
||||||
|
|
||||||
/* table defaults */
|
/* ap_table_t defaults */
|
||||||
tablestring = "";
|
tablestring = "";
|
||||||
trstring = "";
|
trstring = "";
|
||||||
tdstring = "bgcolor=white";
|
tdstring = "bgcolor=white";
|
||||||
|
@@ -61,7 +61,7 @@ static void stats(FILE *output);
|
|||||||
#define MAXDNAME 256
|
#define MAXDNAME 256
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* number of buckets in cache hash table */
|
/* number of buckets in cache hash ap_table_t */
|
||||||
#define BUCKETS 256
|
#define BUCKETS 256
|
||||||
|
|
||||||
#if defined(NEED_STRDUP)
|
#if defined(NEED_STRDUP)
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "httpd.h"
|
#include "httpd.h"
|
||||||
#include "alloc.h"
|
#include "apr_general.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dummy a bunch of stuff just to get a compile
|
* Dummy a bunch of stuff just to get a compile
|
||||||
@@ -41,7 +41,7 @@ API_EXPORT(void) ap_log_error(const char *file, int line, int level,
|
|||||||
|
|
||||||
int main (void)
|
int main (void)
|
||||||
{
|
{
|
||||||
ap_pool *p;
|
ap_context_t *p;
|
||||||
char line[512];
|
char line[512];
|
||||||
char tok[512];
|
char tok[512];
|
||||||
|
|
||||||
|
@@ -13,7 +13,7 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include "httpd.h"
|
#include "httpd.h"
|
||||||
#include "alloc.h"
|
#include "apr_general.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Dummy a bunch of stuff just to get a compile
|
* Dummy a bunch of stuff just to get a compile
|
||||||
@@ -41,7 +41,7 @@ API_EXPORT(void) ap_log_error(const char *file, int line, int level,
|
|||||||
|
|
||||||
int main (void)
|
int main (void)
|
||||||
{
|
{
|
||||||
ap_pool *p;
|
ap_context_t *p;
|
||||||
const char *field;
|
const char *field;
|
||||||
char *newstr;
|
char *newstr;
|
||||||
char instr[512];
|
char instr[512];
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user