26 #ifndef APACHE_HTTP_CORE_H
27 #define APACHE_HTTP_CORE_H
38 #if APR_HAVE_STRUCT_RLIMIT
40 #include <sys/resource.h>
73 #define OPT_INCLUDES 2
75 #define OPT_SYM_LINKS 4
81 #define OPT_INC_WITH_EXEC 32
83 #define OPT_SYM_OWNER 64
87 #define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_INC_WITH_EXEC|OPT_SYM_LINKS|OPT_EXECCGI)
99 #define REMOTE_HOST (0)
105 #define REMOTE_NAME (1)
110 #define REMOTE_NOLOOKUP (2)
117 #define REMOTE_DOUBLE_REV (3)
122 #define SATISFY_ALL 0
124 #define SATISFY_ANY 1
126 #define SATISFY_NOSPEC 2
130 #define AP_MIN_BYTES_TO_WRITE 8000
133 # define AP_DEFAULT_MAX_INTERNAL_REDIRECTS 10
136 # define AP_DEFAULT_MAX_SUBREQ_DEPTH 10
381 #define AP_CORE_MODULE_INDEX 0
382 #define ap_get_core_module_config(v) \
383 (((void **)(v))[AP_CORE_MODULE_INDEX])
384 #define ap_set_core_module_config(v, val) \
385 ((((void **)(v))[AP_CORE_MODULE_INDEX]) = (val))
387 #define AP_CORE_MODULE_INDEX (AP_DEBUG_ASSERT(core_module.module_index == 0), 0)
449 #define AP_NOTE_DIRECTORY_WALK 0
450 #define AP_NOTE_LOCATION_WALK 1
451 #define AP_NOTE_FILE_WALK 2
452 #define AP_NOTE_IF_WALK 3
453 #define AP_NUM_STD_NOTES 4
493 #define ETAG_NONE (1 << 0)
494 #define ETAG_MTIME (1 << 1)
495 #define ETAG_INODE (1 << 2)
496 #define ETAG_SIZE (1 << 3)
497 #define ETAG_DIGEST (1 << 4)
498 #define ETAG_ALL (ETAG_MTIME | ETAG_INODE | ETAG_SIZE)
500 #define ETAG_BACKWARD (ETAG_MTIME | ETAG_SIZE)
503 #define AP_CORE_CONFIG_OFF (0)
504 #define AP_CORE_CONFIG_ON (1)
505 #define AP_CORE_CONFIG_UNSET (2)
508 #define AP_CORE_MERGE_FLAG(field, to, base, over) to->field = \
509 over->field != AP_CORE_CONFIG_UNSET \
550 #define HOSTNAME_LOOKUP_OFF 0
551 #define HOSTNAME_LOOKUP_ON 1
552 #define HOSTNAME_LOOKUP_DOUBLE 2
553 #define HOSTNAME_LOOKUP_UNSET 3
556 #define USE_CANONICAL_NAME_OFF (0)
557 #define USE_CANONICAL_NAME_ON (1)
558 #define USE_CANONICAL_NAME_DNS (2)
559 #define USE_CANONICAL_NAME_UNSET (3)
571 #define ADD_DEFAULT_CHARSET_OFF (0)
572 #define ADD_DEFAULT_CHARSET_ON (1)
573 #define ADD_DEFAULT_CHARSET_UNSET (2)
579 struct rlimit *limit_cpu;
581 #if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
582 struct rlimit *limit_mem;
585 struct rlimit *limit_nproc;
615 #define ENABLE_MMAP_OFF (0)
616 #define ENABLE_MMAP_ON (1)
617 #define ENABLE_MMAP_UNSET (2)
620 #define ENABLE_SENDFILE_OFF (0)
621 #define ENABLE_SENDFILE_ON (1)
622 #define ENABLE_SENDFILE_UNSET (2)
625 #define USE_CANONICAL_PHYS_PORT_OFF (0)
626 #define USE_CANONICAL_PHYS_PORT_ON (1)
627 #define USE_CANONICAL_PHYS_PORT_UNSET (2)
634 #define AP_CONDITION_IF 1
635 #define AP_CONDITION_ELSE 2
636 #define AP_CONDITION_ELSEIF (AP_CONDITION_ELSE|AP_CONDITION_IF)
647 #define AP_MAXRANGES_UNSET -1
648 #define AP_MAXRANGES_DEFAULT -2
649 #define AP_MAXRANGES_UNLIMITED -3
650 #define AP_MAXRANGES_NORANGES 0
670 #define AP_CGI_PASS_AUTH_OFF (0)
671 #define AP_CGI_PASS_AUTH_ON (1)
672 #define AP_CGI_PASS_AUTH_UNSET (2)
689 #define AP_SENDFILE_ENABLED(x) \
690 ((x) == ENABLE_SENDFILE_ON ? APR_SENDFILE_ENABLED : 0)
727 #define AP_TRACE_UNSET -1
728 #define AP_TRACE_DISABLE 0
729 #define AP_TRACE_ENABLE 1
730 #define AP_TRACE_EXTENDED 2
732 #define AP_MERGE_TRAILERS_UNSET 0
733 #define AP_MERGE_TRAILERS_ENABLE 1
734 #define AP_MERGE_TRAILERS_DISABLE 2
739 #define AP_HTTP09_UNSET 0
740 #define AP_HTTP09_ENABLE 1
741 #define AP_HTTP09_DISABLE 2
744 #define AP_HTTP_CONFORMANCE_UNSET 0
745 #define AP_HTTP_CONFORMANCE_UNSAFE 1
746 #define AP_HTTP_CONFORMANCE_STRICT 2
749 #define AP_HTTP_METHODS_UNSET 0
750 #define AP_HTTP_METHODS_LENIENT 1
751 #define AP_HTTP_METHODS_REGISTERED 2
754 #define AP_HTTP_CL_HEAD_ZERO_UNSET 0
755 #define AP_HTTP_CL_HEAD_ZERO_ENABLE 1
756 #define AP_HTTP_CL_HEAD_ZERO_DISABLE 2
759 #define AP_HTTP_EXPECT_STRICT_UNSET 0
760 #define AP_HTTP_EXPECT_STRICT_ENABLE 1
761 #define AP_HTTP_EXPECT_STRICT_DISABLE 2
923 #define AP_ERRORLOG_PROVIDER_GROUP "error_log_writer"
924 #define AP_ERRORLOG_PROVIDER_VERSION "0"
925 #define AP_ERRORLOG_DEFAULT_PROVIDER "file"
928 #define AP_ERRORLOG_PROVIDER_ADD_EOL_STR 1
961 const char * (*parse_errorlog_arg)(
cmd_parms *cmd,
const char *arg);
975 const char *arg,
char *buf,
int buflen);
994 #define AP_ERRORLOG_FLAG_FIELD_SEP 1
996 #define AP_ERRORLOG_FLAG_MESSAGE 2
998 #define AP_ERRORLOG_FLAG_REQUIRED 4
1000 #define AP_ERRORLOG_FLAG_NULL_AS_HYPHEN 8
1024 const char *errstr))
1066 #define AP_SQ_MAIN_STATE 0
1068 #define AP_SQ_RUN_MODE 1
1070 #define AP_SQ_CONFIG_GEN 2
1077 #define AP_SQ_NOT_SUPPORTED -1
1081 #define AP_SQ_MS_INITIAL_STARTUP 1
1083 #define AP_SQ_MS_CREATE_PRE_CONFIG 2
1085 #define AP_SQ_MS_DESTROY_CONFIG 3
1087 #define AP_SQ_MS_CREATE_CONFIG 4
1089 #define AP_SQ_MS_RUN_MPM 5
1091 #define AP_SQ_MS_EXITING 6
1095 #define AP_SQ_RM_UNKNOWN 1
1097 #define AP_SQ_RM_NORMAL 2
1099 #define AP_SQ_RM_CONFIG_TEST 3
1101 #define AP_SQ_RM_CONFIG_DUMP 4
1115 #define AP_CORE_DEFAULT(X, Y, Z) (X ? X->Y : Z)
#define AP_DECLARE_HOOK(ret, name, args)
Definition: ap_hooks.h:74
APR Platform Definitions.
#define socket
Definition: apr_arch_os2calls.h:41
APR-UTIL registration of functions exported by modules.
struct ap_conf_vector_t ap_conf_vector_t
Definition: http_config.h:512
conn_rec * ap_create_slave_connection(conn_rec *c)
AP_DECLARE_DATA ap_filter_rec_t * ap_core_input_filter_handle
void ap_add_output_filters_by_type(request_rec *r)
const char * ap_ident_lookup(request_rec *r)
apr_port_t ap_get_server_port(const request_rec *r)
void ap_register_log_hooks(apr_pool_t *p)
apr_off_t ap_get_limit_req_body(const request_rec *r)
const char * ap_get_server_name_for_url(request_rec *r)
void ap_add_file_conf(apr_pool_t *p, core_dir_config *conf, void *url_config)
int access_compat_ap_satisfies(request_rec *r)
int ap_exists_config_define(const char *name)
const char * ap_limit_section(cmd_parms *cmd, void *dummy, const char *arg)
void ap_logio_add_bytes_in(conn_rec *c, apr_off_t bytes)
int ap_state_query(int query_code)
AP_DECLARE_DATA ap_filter_rec_t * ap_subreq_core_filter_handle
apr_socket_t * ap_get_conn_socket(conn_rec *c)
server_signature_e
Server Signature Enumeration.
Definition: http_core.h:516
void ** ap_get_request_note(request_rec *r, apr_size_t note_num)
const char * ap_auth_type(request_rec *r)
apr_status_t ap_core_input_filter(ap_filter_t *f, apr_bucket_brigade *b, ap_input_mode_t mode, apr_read_type_e block, apr_off_t readbytes)
unsigned int overrides_t
Definition: http_core.h:482
AP_DECLARE_DATA ap_filter_rec_t * ap_content_length_filter_handle
int ap_core_translate(request_rec *r)
#define ap_get_core_module_config(v)
Definition: http_core.h:382
const char * authn_ap_auth_name(request_rec *r)
apr_size_t ap_get_read_buf_size(const request_rec *r)
struct ap_errorlog_info ap_errorlog_info
unsigned char allow_options_t
Definition: http_core.h:481
const char * ap_auth_name(request_rec *r)
const char * ap_document_root(request_rec *r)
const char * ap_get_server_name(request_rec *r)
AP_DECLARE_DATA ap_filter_rec_t * ap_core_output_filter_handle
char * ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r)
int ap_satisfies(request_rec *r)
void ap_set_server_protocol(server_rec *s, const char *proto)
int ap_is_recursion_limit_exceeded(const request_rec *r)
void ap_custom_response(request_rec *r, int status, const char *string)
void ap_add_per_dir_conf(server_rec *s, void *dir_config)
void ap_register_config_hooks(apr_pool_t *p)
apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
int authz_some_auth_required(request_rec *r)
apr_size_t ap_register_request_note(void)
void ap_add_per_url_conf(server_rec *s, void *url_config)
ap_mgmt_type_e
Definition: http_core.h:816
void ap_register_errorlog_handler(apr_pool_t *p, char *tag, ap_errorlog_handler_fn_t *handler, int flags)
apr_size_t ap_get_limit_xml_body(const request_rec *r)
int ap_allow_overrides(request_rec *r)
void ap_logio_add_bytes_out(conn_rec *c, apr_off_t bytes)
void ap_core_reorder_directories(apr_pool_t *, server_rec *)
const char * ap_add_if_conf(apr_pool_t *p, core_dir_config *conf, void *url_config)
struct ap_errorlog_handler ap_errorlog_handler
apr_status_t insert_network_bucket(conn_rec *c, apr_bucket_brigade *bb, apr_socket_t *socket)
apr_off_t ap_logio_get_last_bytes(conn_rec *c)
int ap_errorlog_handler_fn_t(const ap_errorlog_info *info, const char *arg, char *buf, int buflen)
Definition: http_core.h:974
const char * ap_get_server_protocol(server_rec *s)
const char * ap_get_remote_logname(request_rec *r)
unsigned long etag_components_t
Definition: http_core.h:490
const char * authn_ap_auth_type(request_rec *r)
#define ap_set_core_module_config(v, val)
Definition: http_core.h:384
int ap_allow_options(request_rec *r)
AP_DECLARE_DATA module core_module
@ srv_sig_on
Definition: http_core.h:519
@ srv_sig_off
Definition: http_core.h:518
@ srv_sig_unset
Definition: http_core.h:517
@ srv_sig_withmail
Definition: http_core.h:520
@ ap_mgmt_type_long
Definition: http_core.h:818
@ ap_mgmt_type_hash
Definition: http_core.h:819
@ ap_mgmt_type_string
Definition: http_core.h:817
apr_read_type_e
Definition: apr_buckets.h:62
#define APR_DECLARE_OPTIONAL_FN(ret, name, args)
Definition: apr_optional.h:50
apr_bucket_brigade ap_input_mode_t apr_read_type_e apr_off_t readbytes
Definition: mod_dav.h:2663
dav_resource int dav_locktoken dav_response int flags
Definition: mod_dav.h:1458
request_rec * r
Definition: mod_dav.h:518
const dav_liveprop_group const dav_liveprop_spec ** info
Definition: mod_dav.h:1055
int status
Definition: mod_dav.h:141
apr_bucket_brigade * bb
Definition: mod_dav.h:555
const char * s
Definition: mod_dav.h:1327
apr_bucket_brigade ap_input_mode_t mode
Definition: mod_dav.h:2661
const char const char * uri
Definition: mod_dav.h:631
const char * name
Definition: mod_dav.h:805
apr_bucket_brigade ap_input_mode_t apr_read_type_e block
Definition: mod_dav.h:2662
proxy_worker proxy_server_conf * conf
Definition: mod_proxy.h:647
int apr_status_t
Definition: apr_errno.h:44
struct apr_hash_t apr_hash_t
Definition: apr_hash.h:52
apr_uint16_t apr_port_t
Definition: apr_network_io.h:230
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
struct apr_table_t apr_table_t
Definition: apr_tables.h:56
const char * ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip)
const char * ap_get_useragent_host(request_rec *req, int type, int *str_is_ip)
int handler(request_rec *r)
int get_mgmt_items(apr_pool_t *p, const char *val, apr_hash_t *ht)
void error_log(const ap_errorlog_info *info, const char *errstr)
#define AP_DECLARE_DATA
Definition: macros.h:15
#define AP_DECLARE(x)
Definition: macros.h:1
#define AP_CORE_DECLARE(x)
Definition: macros.h:3
#define AP_CORE_DECLARE_NONSTD(x)
Definition: macros.h:4
#define AP_DECLARE_NONSTD(x)
Definition: macros.h:2
Definition: http_core.h:988
ap_errorlog_handler_fn_t * func
Definition: http_core.h:989
int flags
Definition: http_core.h:990
Definition: http_core.h:882
int module_index
Definition: http_core.h:907
apr_status_t status
Definition: http_core.h:912
int startup
Definition: http_core.h:917
const char * format
Definition: http_core.h:920
const request_rec * rmain
Definition: http_core.h:896
const char * file
Definition: http_core.h:902
apr_pool_t * pool
Definition: http_core.h:899
int level
Definition: http_core.h:909
int line
Definition: http_core.h:904
const request_rec * r
Definition: http_core.h:894
int using_provider
Definition: http_core.h:915
const server_rec * s
Definition: http_core.h:886
const conn_rec * c
Definition: http_core.h:891
Definition: http_core.h:932
apr_status_t(* writer)(const ap_errorlog_info *info, void *handle, const char *errstr, apr_size_t len)
Definition: http_core.h:950
unsigned int flags
Definition: http_core.h:964
This structure is used for recording information about the registered filters. It associates a name w...
Definition: util_filter.h:226
The representation of a filter chain.
Definition: util_filter.h:278
Definition: http_core.h:828
const char * description
Definition: http_core.h:829
ap_mgmt_value v
Definition: http_core.h:832
ap_mgmt_type_e vtype
Definition: http_core.h:831
const char * name
Definition: http_core.h:830
Definition: ap_regex.h:111
Definition: apr_buckets.h:263
Definition: apr_arch_networkio.h:37
Definition: http_config.h:288
Structure to store things which are per connection.
Definition: httpd.h:1187
Per-directory configuration.
Definition: http_core.h:526
allow_options_t opts
Definition: http_core.h:539
unsigned d_is_fnmatch
Definition: http_core.h:566
int max_overlaps
Definition: http_core.h:654
unsigned add_default_charset
Definition: http_core.h:574
apr_hash_t * response_code_exprs
Definition: http_core.h:668
char * d
Definition: http_core.h:528
const char * output_filters
Definition: http_core.h:601
apr_array_header_t * sec_file
Definition: http_core.h:595
etag_components_t etag_add
Definition: http_core.h:609
int max_reversals
Definition: http_core.h:656
int max_ranges
Definition: http_core.h:652
unsigned int decode_encoded_slashes_set
Definition: http_core.h:659
apr_size_t read_buf_size
Definition: http_core.h:685
const char * handler
Definition: http_core.h:600
unsigned int enable_mmap
Definition: http_core.h:618
const char * mime_type
Definition: http_core.h:599
const char * input_filters
Definition: http_core.h:602
allow_options_t override_opts
Definition: http_core.h:543
const char * add_default_charset_name
Definition: http_core.h:575
server_signature_e server_signature
Definition: http_core.h:592
apr_off_t limit_req_body
Definition: http_core.h:587
apr_hash_t * cgi_var_rules
Definition: http_core.h:683
char ** response_code_strings
Definition: http_core.h:546
struct ap_logconf * log
Definition: http_core.h:642
unsigned int hostname_lookups
Definition: http_core.h:554
allow_options_t opts_add
Definition: http_core.h:540
apr_array_header_t * refs
Definition: http_core.h:662
apr_array_header_t * sec_if
Definition: http_core.h:596
unsigned int condition_ifelse
Definition: http_core.h:637
ap_regex_t * r
Definition: http_core.h:597
etag_components_t etag_remove
Definition: http_core.h:610
unsigned use_canonical_name
Definition: http_core.h:560
unsigned d_components
Definition: http_core.h:530
int accept_path_info
Definition: http_core.h:603
long limit_xml_body
Definition: http_core.h:588
ap_expr_info_t * expr_handler
Definition: http_core.h:680
unsigned int enable_sendfile
Definition: http_core.h:623
unsigned int qualify_redirect_url
Definition: http_core.h:679
unsigned int use_canonical_phys_port
Definition: http_core.h:628
apr_table_t * override_list
Definition: http_core.h:645
unsigned int allow_encoded_slashes_set
Definition: http_core.h:658
unsigned int allow_encoded_slashes
Definition: http_core.h:630
ap_expr_info_t * condition
Definition: http_core.h:639
unsigned int cgi_pass_auth
Definition: http_core.h:678
allow_options_t opts_remove
Definition: http_core.h:541
unsigned int decode_encoded_slashes
Definition: http_core.h:632
etag_components_t etag_bits
Definition: http_core.h:608
Per-request configuration.
Definition: http_core.h:393
char ** response_code_strings
Definition: http_core.h:408
int deliver_script
Definition: http_core.h:438
int suppress_charset
Definition: http_core.h:442
void ** notes
Definition: http_core.h:403
const char * document_root
Definition: http_core.h:415
const char * context_document_root
Definition: http_core.h:424
struct apr_bucket_brigade * bb
Definition: http_core.h:396
const char * context_prefix
Definition: http_core.h:428
Definition: http_core.h:694
char * gprof_dir
Definition: http_core.h:696
const char * ap_document_root
Definition: http_core.h:702
int http_expect_strict
Definition: http_core.h:762
const char * protocol
Definition: http_core.h:714
int merge_trailers
Definition: http_core.h:735
apr_array_header_t * error_log_conn
Definition: http_core.h:723
apr_array_header_t * conn_log_level
Definition: http_core.h:737
apr_array_header_t * error_log_req
Definition: http_core.h:724
char http_conformance
Definition: http_core.h:747
unsigned int async_filter_set
Definition: http_core.h:767
int trace_enable
Definition: http_core.h:731
apr_array_header_t * sec_dir
Definition: http_core.h:707
apr_int32_t flush_max_pipelined
Definition: http_core.h:770
int protocols_honor_order
Definition: http_core.h:765
apr_array_header_t * protocols
Definition: http_core.h:764
char http_methods
Definition: http_core.h:752
char http09_enable
Definition: http_core.h:742
apr_size_t flush_max_threshold
Definition: http_core.h:769
apr_table_t * accf_map
Definition: http_core.h:715
int http_cl_head_zero
Definition: http_core.h:757
unsigned int merge_slashes
Definition: http_core.h:772
apr_array_header_t * error_log_format
Definition: http_core.h:718
int redirect_limit
Definition: http_core.h:711
int async_filter
Definition: http_core.h:766
int subreq_limit
Definition: http_core.h:712
char * access_name
Definition: http_core.h:706
unsigned int strict_host_check
Definition: http_core.h:771
apr_array_header_t * sec_url
Definition: http_core.h:708
Definition: apreq_private_apache2.h:3
Definition: http_config.h:348
A structure that represents the current request.
Definition: httpd.h:856
A structure to keep track of authorization requirements.
Definition: http_core.h:315
char * requirement
Definition: http_core.h:319
apr_int64_t method_mask
Definition: http_core.h:317
A structure to store information for each virtual server.
Definition: httpd.h:1376
Definition: http_core.h:822
const char * s_value
Definition: http_core.h:823
apr_hash_t * h_value
Definition: http_core.h:825
long i_value
Definition: http_core.h:824
ap_input_mode_t
input filtering modes
Definition: util_filter.h:41