Apache HTTPD
http_core.h
Go to the documentation of this file.
1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements. See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
26#ifndef APACHE_HTTP_CORE_H
27#define APACHE_HTTP_CORE_H
28
29#include "apr.h"
30#include "apr_hash.h"
31#include "apr_optional.h"
32#include "util_filter.h"
33#include "ap_expr.h"
34#include "apr_poll.h"
35#include "apr_tables.h"
36
37#include "http_config.h"
38
39#if APR_HAVE_STRUCT_RLIMIT
40#include <sys/time.h>
41#include <sys/resource.h>
42#endif
43
44
45#ifdef __cplusplus
46extern "C" {
47#endif
48
49/* ****************************************************************
50 *
51 * The most basic server code is encapsulated in a single module
52 * known as the core, which is just *barely* functional enough to
53 * serve documents, though not terribly well.
54 *
55 * Largely for NCSA back-compatibility reasons, the core needs to
56 * make pieces of its config structures available to other modules.
57 * The accessors are declared here, along with the interpretation
58 * of one of them (allow_options).
59 */
60
70#define OPT_NONE 0
72#define OPT_INDEXES 1
74#define OPT_INCLUDES 2
76#define OPT_SYM_LINKS 4
78#define OPT_EXECCGI 8
80#define OPT_UNSET 16
82#define OPT_INC_WITH_EXEC 32
84#define OPT_SYM_OWNER 64
86#define OPT_MULTI 128
88#define OPT_ALL (OPT_INDEXES|OPT_INCLUDES|OPT_INC_WITH_EXEC|OPT_SYM_LINKS|OPT_EXECCGI)
100#define REMOTE_HOST (0)
101
106#define REMOTE_NAME (1)
107
111#define REMOTE_NOLOOKUP (2)
112
118#define REMOTE_DOUBLE_REV (3)
119
123#define SATISFY_ALL 0
125#define SATISFY_ANY 1
127#define SATISFY_NOSPEC 2
128
131#define AP_MIN_BYTES_TO_WRITE 8000
132
134# define AP_DEFAULT_MAX_INTERNAL_REDIRECTS 10
135
137# define AP_DEFAULT_MAX_SUBREQ_DEPTH 10
138
145
152
161
185AP_DECLARE(const char *) ap_get_useragent_host(request_rec *req, int type,
186 int *str_is_ip);
187
212AP_DECLARE(const char *) ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip);
213
221
222/* Used for constructing self-referencing URLs, and things like SERVER_PORT,
223 * and SERVER_NAME.
224 */
232AP_DECLARE(char *) ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r);
233
240
249
256
262AP_DECLARE(apr_size_t) ap_get_read_buf_size(const request_rec *r);
263
270
277
285AP_DECLARE(void) ap_custom_response(request_rec *r, int status, const char *string);
286
293
299AP_DECLARE(int) ap_exists_config_define(const char *name);
300/* FIXME! See STATUS about how */
302
303/* Authentication stuff. This is one of the places where compatibility
304 * with the old config files *really* hurts; they don't discriminate at
305 * all between different authentication schemes, meaning that we need
306 * to maintain common state for all of them in the core, and make it
307 * available to the other modules through interfaces.
308 */
309
312
318 apr_int64_t method_mask;
321};
322
328AP_DECLARE(const char *) ap_auth_type(request_rec *r);
329
335AP_DECLARE(const char *) ap_auth_name(request_rec *r);
336
348
354AP_DECLARE_DATA extern module core_module;
355
364
373
380
381#ifndef AP_DEBUG
382#define AP_CORE_MODULE_INDEX 0
383#define ap_get_core_module_config(v) \
384 (((void **)(v))[AP_CORE_MODULE_INDEX])
385#define ap_set_core_module_config(v, val) \
386 ((((void **)(v))[AP_CORE_MODULE_INDEX]) = (val))
387#else
388#define AP_CORE_MODULE_INDEX (AP_DEBUG_ASSERT(core_module.module_index == 0), 0)
389#endif
390
394typedef struct {
398
404 void **notes;
405
409 char **response_code_strings; /* from ap_custom_response(), not from
410 * ErrorDocument
411 */
412
416 const char *document_root;
417
418 /*
419 * more fine-grained context information which is set by modules like
420 * mod_alias and mod_userdir
421 */
429 const char *context_prefix;
430
440
445
446/* Standard entries that are guaranteed to be accessible via
447 * ap_get_request_note() for each request (additional entries
448 * can be added with ap_register_request_note())
449 */
450#define AP_NOTE_DIRECTORY_WALK 0
451#define AP_NOTE_LOCATION_WALK 1
452#define AP_NOTE_FILE_WALK 2
453#define AP_NOTE_IF_WALK 3
454#define AP_NUM_STD_NOTES 4
455
463AP_DECLARE(apr_size_t) ap_register_request_note(void);
464
479AP_DECLARE(void **) ap_get_request_note(request_rec *r, apr_size_t note_num);
480
481
482typedef unsigned char allow_options_t;
483typedef unsigned int overrides_t;
484
485/*
486 * Bits of info that go into making an ETag for a file
487 * document. Why a long? Because char historically
488 * proved too short for Options, and int can be different
489 * sizes on different platforms.
490 */
491typedef unsigned long etag_components_t;
492
493#define ETAG_UNSET 0
494#define ETAG_NONE (1 << 0)
495#define ETAG_MTIME (1 << 1)
496#define ETAG_INODE (1 << 2)
497#define ETAG_SIZE (1 << 3)
498#define ETAG_DIGEST (1 << 4)
499#define ETAG_ALL (ETAG_MTIME | ETAG_INODE | ETAG_SIZE)
500/* This is the default value used */
501#define ETAG_BACKWARD (ETAG_MTIME | ETAG_SIZE)
502
503/* Generic ON/OFF/UNSET for unsigned int foo :2 */
504#define AP_CORE_CONFIG_OFF (0)
505#define AP_CORE_CONFIG_ON (1)
506#define AP_CORE_CONFIG_UNSET (2)
507
508/* Generic merge of flag */
509#define AP_CORE_MERGE_FLAG(field, to, base, over) to->field = \
510 over->field != AP_CORE_CONFIG_UNSET \
511 ? over->field \
512 : base->field
513
523
527typedef struct {
529 char *d;
531 unsigned d_components;
532
543 overrides_t override;
545
546 /* Used to be the custom response config. No longer used. */
547 char **response_code_strings; /* from ErrorDocument, not from
548 * ap_custom_response() */
549
550 /* Hostname resolution etc */
551#define HOSTNAME_LOOKUP_OFF 0
552#define HOSTNAME_LOOKUP_ON 1
553#define HOSTNAME_LOOKUP_DOUBLE 2
554#define HOSTNAME_LOOKUP_UNSET 3
555 unsigned int hostname_lookups : 4;
556
557 unsigned int content_md5 : 2; /* calculate Content-MD5? */
558
559#define USE_CANONICAL_NAME_OFF (0)
560#define USE_CANONICAL_NAME_ON (1)
561#define USE_CANONICAL_NAME_DNS (2)
562#define USE_CANONICAL_NAME_UNSET (3)
563 unsigned use_canonical_name : 2;
564
565 /* since is_fnmatch(conf->d) was being called so frequently in
566 * directory_walk() and its relatives, this field was created and
567 * is set to the result of that call.
568 */
569 unsigned d_is_fnmatch : 1;
570
571 /* should we force a charset on any outgoing parameterless content-type?
572 * if so, which charset?
573 */
574#define ADD_DEFAULT_CHARSET_OFF (0)
575#define ADD_DEFAULT_CHARSET_ON (1)
576#define ADD_DEFAULT_CHARSET_UNSET (2)
579
580 /* System Resource Control */
581#ifdef RLIMIT_CPU
582 struct rlimit *limit_cpu;
583#endif
584#if defined (RLIMIT_DATA) || defined (RLIMIT_VMEM) || defined(RLIMIT_AS)
585 struct rlimit *limit_mem;
586#endif
587#ifdef RLIMIT_NPROC
588 struct rlimit *limit_nproc;
589#endif
590 apr_off_t limit_req_body; /* limit on bytes in request msg body */
591 long limit_xml_body; /* limit on bytes in XML request msg body */
592
593 /* logging options */
594
596
597 /* Access control */
601
602 const char *mime_type; /* forced with ForceType */
603 const char *handler; /* forced by something other than SetHandler */
604 const char *output_filters; /* forced with SetOutputFilters */
605 const char *input_filters; /* forced with SetInputFilters */
606 int accept_path_info; /* forced with AcceptPathInfo */
607
608 /*
609 * What attributes/data should be included in ETag generation?
610 */
614
615 /*
616 * Run-time performance tuning
617 */
618#define ENABLE_MMAP_OFF (0)
619#define ENABLE_MMAP_ON (1)
620#define ENABLE_MMAP_UNSET (2)
621 unsigned int enable_mmap : 2; /* whether files in this dir can be mmap'ed */
622
623#define ENABLE_SENDFILE_OFF (0)
624#define ENABLE_SENDFILE_ON (1)
625#define ENABLE_SENDFILE_UNSET (2)
626 unsigned int enable_sendfile : 2; /* files in this dir can be sendfile'ed */
627
628#define USE_CANONICAL_PHYS_PORT_OFF (0)
629#define USE_CANONICAL_PHYS_PORT_ON (1)
630#define USE_CANONICAL_PHYS_PORT_UNSET (2)
631 unsigned int use_canonical_phys_port : 2;
632
633 unsigned int allow_encoded_slashes : 1; /* URLs may contain %2f w/o being
634 * pitched indiscriminately */
635 unsigned int decode_encoded_slashes : 1; /* whether to decode encoded slashes in URLs */
636
637#define AP_CONDITION_IF 1
638#define AP_CONDITION_ELSE 2
639#define AP_CONDITION_ELSEIF (AP_CONDITION_ELSE|AP_CONDITION_IF)
640 unsigned int condition_ifelse : 2; /* is this an <If>, <ElseIf>, or <Else> */
641
642 ap_expr_info_t *condition; /* Conditionally merge <If> sections */
643
646
649
650#define AP_MAXRANGES_UNSET -1
651#define AP_MAXRANGES_DEFAULT -2
652#define AP_MAXRANGES_UNLIMITED -3
653#define AP_MAXRANGES_NORANGES 0
660
663
669
670#define AP_CGI_PASS_AUTH_OFF (0)
671#define AP_CGI_PASS_AUTH_ON (1)
672#define AP_CGI_PASS_AUTH_UNSET (2)
678 unsigned int cgi_pass_auth : 2;
679 unsigned int qualify_redirect_url :2;
680 ap_expr_info_t *expr_handler; /* forced with SetHandler */
681
684
685 apr_size_t read_buf_size;
687
688/* macro to implement off by default behaviour */
689#define AP_SENDFILE_ENABLED(x) \
690 ((x) == ENABLE_SENDFILE_ON ? APR_SENDFILE_ENABLED : 0)
691
692/* Per-server core configuration */
693
694typedef struct {
695
697
698 /* Name translations --- we want the core to be able to do *something*
699 * so it's at least a minimally functional web server on its own (and
700 * can be tested that way). But let's keep it to the bare minimum:
701 */
702 const char *ap_document_root;
703
704 /* Access control */
705
709
710 /* recursion backstopper */
711 int redirect_limit; /* maximum number of internal redirects */
712 int subreq_limit; /* maximum nesting level of subrequests */
713
714 const char *protocol;
716
717 /* array of ap_errorlog_format_item for error log format string */
719 /*
720 * two arrays of arrays of ap_errorlog_format_item for additional information
721 * logged to the error log once per connection/request
722 */
725
726 /* TRACE control */
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
736
739
740#define AP_HTTP09_UNSET 0
741#define AP_HTTP09_ENABLE 1
742#define AP_HTTP09_DISABLE 2
744
745#define AP_HTTP_CONFORMANCE_UNSET 0
746#define AP_HTTP_CONFORMANCE_UNSAFE 1
747#define AP_HTTP_CONFORMANCE_STRICT 2
749
750#define AP_HTTP_METHODS_UNSET 0
751#define AP_HTTP_METHODS_LENIENT 1
752#define AP_HTTP_METHODS_REGISTERED 2
754 unsigned int merge_slashes;
755
758 unsigned int strict_host_check;
759#ifdef WIN32
760 apr_array_header_t *unc_list;
761#endif
763
764/* for AddOutputFiltersByType in core.c */
766
767/* for http_config.c */
769
770/* for mod_perl */
771AP_CORE_DECLARE(void) ap_add_per_dir_conf(server_rec *s, void *dir_config);
772AP_CORE_DECLARE(void) ap_add_per_url_conf(server_rec *s, void *url_config);
773AP_CORE_DECLARE(void) ap_add_file_conf(apr_pool_t *p, core_dir_config *conf, void *url_config);
774AP_CORE_DECLARE(const char *) ap_add_if_conf(apr_pool_t *p, core_dir_config *conf, void *url_config);
775AP_CORE_DECLARE_NONSTD(const char *) ap_limit_section(cmd_parms *cmd, void *dummy, const char *arg);
776
777/* Core filters; not exported. */
780 apr_off_t readbytes);
782
783
785AP_DECLARE(void) ap_set_server_protocol(server_rec* s, const char* proto);
786
789
794
805
816AP_DECLARE_HOOK(apr_status_t, insert_network_bucket,
818
819/* ----------------------------------------------------------------------
820 *
821 * Runtime status/management
822 */
823
829
830typedef union {
831 const char *s_value;
835
836typedef struct {
837 const char *description;
838 const char *name;
842
843/* Handles for core filters */
848
862AP_DECLARE_HOOK(int, get_mgmt_items,
863 (apr_pool_t *p, const char * val, apr_hash_t *ht))
864
865/* ---------------------------------------------------------------------- */
866
867/* ----------------------------------------------------------------------
868 *
869 * I/O logging with mod_logio
870 */
871
873 (conn_rec *c, apr_off_t bytes));
874
876 (conn_rec *c, apr_off_t bytes));
877
879
880/* ----------------------------------------------------------------------
881 *
882 * Error log formats
883 */
884
890typedef struct ap_errorlog_info {
894 const server_rec *s;
895
899 const conn_rec *c;
900
905
908
910 const char *file;
912 int line;
913
917 int level;
918
921
926
928 const char *format;
930
939 const char *arg, char *buf, int buflen);
940
950 int flags);
951
952typedef struct ap_errorlog_handler {
954 int flags; /* for future extensions */
956
958#define AP_ERRORLOG_FLAG_FIELD_SEP 1
960#define AP_ERRORLOG_FLAG_MESSAGE 2
962#define AP_ERRORLOG_FLAG_REQUIRED 4
964#define AP_ERRORLOG_FLAG_NULL_AS_HYPHEN 8
965
966typedef struct {
970 const char *arg;
972 unsigned int flags;
974 unsigned int min_loglevel;
976
987AP_DECLARE_HOOK(void, error_log, (const ap_errorlog_info *info,
988 const char *errstr))
989
992
993/* ----------------------------------------------------------------------
994 *
995 * ident lookups with mod_ident
996 */
997
1000
1001/* ----------------------------------------------------------------------
1002 *
1003 * authorization values with mod_authz_core
1004 */
1005
1009
1010/* ----------------------------------------------------------------------
1011 *
1012 * authorization values with mod_access_compat
1013 */
1014
1016
1017/* ---------------------------------------------------------------------- */
1018
1023AP_DECLARE(int) ap_state_query(int query_code);
1024
1025/*
1026 * possible values for query_code in ap_state_query()
1027 */
1028
1030#define AP_SQ_MAIN_STATE 0
1032#define AP_SQ_RUN_MODE 1
1034#define AP_SQ_CONFIG_GEN 2
1035
1036/*
1037 * return values for ap_state_query()
1038 */
1039
1041#define AP_SQ_NOT_SUPPORTED -1
1042
1043/* values returned for AP_SQ_MAIN_STATE */
1045#define AP_SQ_MS_INITIAL_STARTUP 1
1047#define AP_SQ_MS_CREATE_PRE_CONFIG 2
1049#define AP_SQ_MS_DESTROY_CONFIG 3
1051#define AP_SQ_MS_CREATE_CONFIG 4
1053#define AP_SQ_MS_RUN_MPM 5
1055#define AP_SQ_MS_EXITING 6
1056
1057/* values returned for AP_SQ_RUN_MODE */
1059#define AP_SQ_RM_UNKNOWN 1
1061#define AP_SQ_RM_NORMAL 2
1063#define AP_SQ_RM_CONFIG_TEST 3
1065#define AP_SQ_RM_CONFIG_DUMP 4
1066
1071AP_DECLARE_HOOK(apr_status_t, get_pollfd_from_conn,
1072 (conn_rec *c, struct apr_pollfd_t *pfd,
1074
1075
1089 struct apr_pollfd_t *pfd,
1090 apr_interval_time_t *ptimeout);
1091
1092#ifdef __cplusplus
1093}
1094#endif
1095
1096#endif /* !APACHE_HTTP_CORE_H */
#define AP_DECLARE_DATA
Definition ap_config.h:89
#define AP_DECLARE_NONSTD(type)
Definition ap_config.h:77
#define AP_DECLARE(type)
Definition ap_config.h:67
Expression parser.
#define AP_DECLARE_HOOK(ret, name, args)
Definition ap_hooks.h:74
#define socket
APR Hash Tables.
APR-UTIL registration of functions exported by modules.
APR Poll interface.
APR Table library.
static apr_OFN_access_compat_ap_satisfies_t * access_compat_ap_satisfies
Definition core.c:819
static apr_OFN_authn_ap_auth_type_t * authn_ap_auth_type
Definition core.c:791
static apr_OFN_authn_ap_auth_name_t * authn_ap_auth_name
Definition core.c:805
struct ap_conf_vector_t ap_conf_vector_t
request_rec * r
#define AP_CORE_DECLARE
Definition httpd.h:381
#define AP_CORE_DECLARE_NONSTD
Definition httpd.h:390
void ap_add_output_filters_by_type(request_rec *r)
apr_port_t ap_get_server_port(const request_rec *r)
Definition core.c:1199
void ap_register_log_hooks(apr_pool_t *p)
Definition log.c:941
ap_filter_rec_t * ap_subreq_core_filter_handle
Definition core.c:131
apr_off_t ap_get_limit_req_body(const request_rec *r)
Definition core.c:1259
void ap_add_file_conf(apr_pool_t *p, core_dir_config *conf, void *url_config)
Definition core.c:632
int ap_exists_config_define(const char *name)
Definition core.c:2896
int ap_state_query(int query_code)
Definition core.c:5378
const char * ap_get_server_name(request_rec *r)
Definition core.c:1145
server_signature_e
Server Signature Enumeration.
Definition http_core.h:517
ap_filter_rec_t * ap_content_length_filter_handle
Definition core.c:133
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:483
int ap_core_translate(request_rec *r)
Definition core.c:4756
#define ap_get_core_module_config(v)
Definition http_core.h:383
apr_size_t ap_get_read_buf_size(const request_rec *r)
Definition core.c:1271
unsigned char allow_options_t
Definition http_core.h:482
const char * ap_auth_name(request_rec *r)
Definition core.c:807
const char * ap_add_if_conf(apr_pool_t *p, core_dir_config *conf, void *url_config)
Definition core.c:644
apr_socket_t * ap_get_conn_socket(conn_rec *c)
Definition core.c:5202
int ap_satisfies(request_rec *r)
Definition core.c:821
void ap_set_server_protocol(server_rec *s, const char *proto)
Definition core.c:3090
int ap_is_recursion_limit_exceeded(const request_rec *r)
Definition core.c:3992
const char * ap_document_root(request_rec *r)
Definition core.c:829
apr_status_t ap_get_pollfd_from_conn(conn_rec *c, struct apr_pollfd_t *pfd, apr_interval_time_t *ptimeout)
Definition core.c:5651
const char * ap_limit_section(cmd_parms *cmd, void *dummy, const char *arg)
Definition core.c:2366
void ap_custom_response(request_rec *r, int status, const char *string)
Definition core.c:1648
const char * ap_get_remote_logname(request_rec *r)
Definition core.c:1121
const char * ap_get_server_protocol(server_rec *s)
Definition core.c:3084
void ap_add_per_dir_conf(server_rec *s, void *dir_config)
Definition core.c:616
void ap_register_config_hooks(apr_pool_t *p)
Definition config.c:2288
apr_status_t ap_core_output_filter(ap_filter_t *f, apr_bucket_brigade *b)
apr_size_t ap_register_request_note(void)
Definition core.c:5177
void ap_add_per_url_conf(server_rec *s, void *url_config)
Definition core.c:624
ap_mgmt_type_e
Definition http_core.h:824
void ap_register_errorlog_handler(apr_pool_t *p, char *tag, ap_errorlog_handler_fn_t *handler, int flags)
Definition core.c:4407
apr_size_t ap_get_limit_xml_body(const request_rec *r)
Definition core.c:3863
int ap_allow_overrides(request_rec *r)
Definition core.c:779
ap_filter_rec_t * ap_core_output_filter_handle
Definition core.c:132
void ap_core_reorder_directories(apr_pool_t *, server_rec *)
Definition core.c:720
const char * ap_auth_type(request_rec *r)
Definition core.c:793
int ap_errorlog_handler_fn_t(const ap_errorlog_info *info, const char *arg, char *buf, int buflen)
Definition http_core.h:938
void ** ap_get_request_note(request_rec *r, apr_size_t note_num)
Definition core.c:5184
char * ap_construct_url(apr_pool_t *p, const char *uri, request_rec *r)
Definition core.c:1246
const char * ap_get_server_name_for_url(request_rec *r)
Definition core.c:1187
unsigned long etag_components_t
Definition http_core.h:491
#define ap_set_core_module_config(v, val)
Definition http_core.h:385
ap_filter_rec_t * ap_core_input_filter_handle
Definition core.c:134
int ap_allow_options(request_rec *r)
Definition core.c:771
@ srv_sig_on
Definition http_core.h:520
@ srv_sig_off
Definition http_core.h:519
@ srv_sig_unset
Definition http_core.h:518
@ srv_sig_withmail
Definition http_core.h:521
@ ap_mgmt_type_long
Definition http_core.h:826
@ ap_mgmt_type_hash
Definition http_core.h:827
@ ap_mgmt_type_string
Definition http_core.h:825
const unsigned char * buf
Definition util_md5.h:50
void * dummy
Definition http_vhost.h:62
void const char * arg
Definition http_vhost.h:63
apr_file_t * f
apr_read_type_e
Definition apr_buckets.h:57
apr_dbd_transaction_t int mode
Definition apr_dbd.h:261
const char apr_ssize_t int flags
Definition apr_encode.h:168
#define APR_DECLARE_OPTIONAL_FN(ret, name, args)
const char * uri
Definition apr_uri.h:159
apr_uint32_t val
Definition apr_atomic.h:66
int apr_status_t
Definition apr_errno.h:44
int type
apr_hash_t * ht
Definition apr_hash.h:148
apr_vformatter_buff_t * c
Definition apr_lib.h:175
apr_size_t buflen
apr_uint16_t apr_port_t
apr_pool_t * b
Definition apr_pools.h:529
const void apr_size_t bytes
Definition apr_random.h:91
const char * s
Definition apr_strings.h:95
apr_cmdtype_e cmd
int int status
apr_int64_t apr_interval_time_t
Definition apr_time.h:55
const char * ap_get_remote_host(conn_rec *conn, void *dir_config, int type, int *str_is_ip)
Definition core.c:957
const char * ap_get_useragent_host(request_rec *req, int type, int *str_is_ip)
Definition core.c:1036
Apache Configuration.
apr_pool_t * p
Definition md_event.c:32
static int authz_some_auth_required(request_rec *r)
static const char * ap_ident_lookup(request_rec *r)
Definition mod_ident.c:303
static void ap_logio_add_bytes_in(conn_rec *c, apr_off_t bytes)
Definition mod_logio.c:77
static apr_off_t ap_logio_get_last_bytes(conn_rec *c)
Definition mod_logio.c:89
static void ap_logio_add_bytes_out(conn_rec *c, apr_off_t bytes)
Definition mod_logio.c:67
char * name
ap_errorlog_handler_fn_t * func
Definition http_core.h:968
unsigned int min_loglevel
Definition http_core.h:974
ap_errorlog_handler_fn_t * func
Definition http_core.h:953
apr_status_t status
Definition http_core.h:920
const char * format
Definition http_core.h:928
const request_rec * rmain
Definition http_core.h:904
const char * file
Definition http_core.h:910
apr_pool_t * pool
Definition http_core.h:907
const request_rec * r
Definition http_core.h:902
const server_rec * s
Definition http_core.h:894
const conn_rec * c
Definition http_core.h:899
This structure is used for recording information about the registered filters. It associates a name w...
The representation of a filter chain.
const char * description
Definition http_core.h:837
ap_mgmt_value v
Definition http_core.h:840
ap_mgmt_type_e vtype
Definition http_core.h:839
const char * name
Definition http_core.h:838
Structure to store things which are per connection.
Definition httpd.h:1152
Per-directory configuration.
Definition http_core.h:527
allow_options_t opts
Definition http_core.h:540
unsigned d_is_fnmatch
Definition http_core.h:569
unsigned add_default_charset
Definition http_core.h:577
apr_hash_t * response_code_exprs
Definition http_core.h:668
const char * output_filters
Definition http_core.h:604
apr_array_header_t * sec_file
Definition http_core.h:598
etag_components_t etag_add
Definition http_core.h:612
apr_size_t read_buf_size
Definition http_core.h:685
const char * handler
Definition http_core.h:603
unsigned int enable_mmap
Definition http_core.h:621
const char * mime_type
Definition http_core.h:602
const char * input_filters
Definition http_core.h:605
allow_options_t override_opts
Definition http_core.h:544
const char * add_default_charset_name
Definition http_core.h:578
server_signature_e server_signature
Definition http_core.h:595
apr_off_t limit_req_body
Definition http_core.h:590
apr_hash_t * cgi_var_rules
Definition http_core.h:683
char ** response_code_strings
Definition http_core.h:547
struct ap_logconf * log
Definition http_core.h:645
unsigned int hostname_lookups
Definition http_core.h:555
allow_options_t opts_add
Definition http_core.h:541
apr_array_header_t * refs
Definition http_core.h:662
apr_array_header_t * sec_if
Definition http_core.h:599
unsigned int condition_ifelse
Definition http_core.h:640
ap_regex_t * r
Definition http_core.h:600
etag_components_t etag_remove
Definition http_core.h:613
unsigned use_canonical_name
Definition http_core.h:563
unsigned d_components
Definition http_core.h:531
ap_expr_info_t * expr_handler
Definition http_core.h:680
unsigned int content_md5
Definition http_core.h:557
unsigned int enable_sendfile
Definition http_core.h:626
unsigned int qualify_redirect_url
Definition http_core.h:679
unsigned int use_canonical_phys_port
Definition http_core.h:631
apr_table_t * override_list
Definition http_core.h:648
unsigned int allow_encoded_slashes
Definition http_core.h:633
ap_expr_info_t * condition
Definition http_core.h:642
unsigned int cgi_pass_auth
Definition http_core.h:678
allow_options_t opts_remove
Definition http_core.h:542
unsigned int decode_encoded_slashes
Definition http_core.h:635
etag_components_t etag_bits
Definition http_core.h:611
apr_bucket_brigade * b
Definition http_core.h:791
apr_bucket_brigade * tmpbb
Definition http_core.h:792
apr_socket_t * client_socket
Definition http_core.h:797
conn_rec * c
Definition http_core.h:800
core_ctx_t * in_ctx
Definition http_core.h:803
core_output_filter_ctx_t * out_ctx
Definition http_core.h:802
Per-request configuration.
Definition http_core.h:394
char ** response_code_strings
Definition http_core.h:409
const char * document_root
Definition http_core.h:416
const char * context_document_root
Definition http_core.h:425
struct apr_bucket_brigade * bb
Definition http_core.h:397
const char * context_prefix
Definition http_core.h:429
const char * ap_document_root
Definition http_core.h:702
const char * protocol
Definition http_core.h:714
apr_array_header_t * error_log_conn
Definition http_core.h:723
apr_array_header_t * error_log_req
Definition http_core.h:724
apr_array_header_t * sec_dir
Definition http_core.h:707
apr_int32_t flush_max_pipelined
Definition http_core.h:757
apr_array_header_t * protocols
Definition http_core.h:737
apr_size_t flush_max_threshold
Definition http_core.h:756
apr_table_t * accf_map
Definition http_core.h:715
unsigned int merge_slashes
Definition http_core.h:754
apr_array_header_t * error_log_format
Definition http_core.h:718
unsigned int strict_host_check
Definition http_core.h:758
apr_array_header_t * sec_url
Definition http_core.h:708
A structure that represents the current request.
Definition httpd.h:845
A structure to keep track of authorization requirements.
Definition http_core.h:316
char * requirement
Definition http_core.h:320
apr_int64_t method_mask
Definition http_core.h:318
A structure to store information for each virtual server.
Definition httpd.h:1322
const char * s_value
Definition http_core.h:831
apr_hash_t * h_value
Definition http_core.h:833
Apache filter library.
ap_input_mode_t
input filtering modes
Definition util_filter.h:41
INT info