Apache2
httpd.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 
36 #ifndef APACHE_HTTPD_H
37 #define APACHE_HTTPD_H
38 
39 /* XXX - We need to push more stuff to other .h files, or even .c files, to
40  * make this file smaller
41  */
42 
43 /* Headers in which EVERYONE has an interest... */
44 #include "ap_config.h"
45 #include "ap_mmn.h"
46 
47 #include "ap_release.h"
48 
49 #include "apr.h"
50 #include "apr_version.h"
51 #include "apr_general.h"
52 #include "apr_tables.h"
53 #include "apr_pools.h"
54 #include "apr_time.h"
55 #include "apr_network_io.h"
56 #include "apr_buckets.h"
57 #include "apr_poll.h"
58 #include "apr_thread_proc.h"
59 #include "apr_hash.h"
60 
61 #include "os.h"
62 
63 #include "ap_regex.h"
64 
65 #if APR_HAVE_STDLIB_H
66 #include <stdlib.h>
67 #endif
68 
69 /* Note: apr_uri.h is also included, see below */
70 
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74 
75 /* ----------------------------- config dir ------------------------------ */
76 
80 #ifndef HTTPD_ROOT
81 #ifdef OS2
83 #define HTTPD_ROOT "/os2httpd"
84 #elif defined(WIN32)
86 #define HTTPD_ROOT "/apache"
87 #elif defined (NETWARE)
89 #define HTTPD_ROOT "/apache"
90 #else
92 #define HTTPD_ROOT "/usr/local/apache"
93 #endif
94 #endif /* HTTPD_ROOT */
95 
96 /*
97  * --------- You shouldn't have to edit anything below this line ----------
98  *
99  * Any modifications to any defaults not defined above should be done in the
100  * respective configuration file.
101  *
102  */
103 
108 #ifndef DOCUMENT_LOCATION
109 #ifdef OS2
110 /* Set default for OS/2 file system */
111 #define DOCUMENT_LOCATION HTTPD_ROOT "/docs"
112 #else
113 /* Set default for non OS/2 file system */
114 #define DOCUMENT_LOCATION HTTPD_ROOT "/htdocs"
115 #endif
116 #endif /* DOCUMENT_LOCATION */
117 
119 #ifndef DYNAMIC_MODULE_LIMIT
120 #define DYNAMIC_MODULE_LIMIT 256
121 #endif
122 
124 #define DEFAULT_ADMIN "[no address given]"
125 
127 #ifndef DEFAULT_ERRORLOG
128 #if defined(OS2) || defined(WIN32)
129 #define DEFAULT_ERRORLOG "logs/error.log"
130 #else
131 #define DEFAULT_ERRORLOG "logs/error_log"
132 #endif
133 #endif /* DEFAULT_ERRORLOG */
134 
136 #ifndef DEFAULT_ACCESS_FNAME
137 #ifdef OS2
138 /* Set default for OS/2 file system */
139 #define DEFAULT_ACCESS_FNAME "htaccess"
140 #else
141 #define DEFAULT_ACCESS_FNAME ".htaccess"
142 #endif
143 #endif /* DEFAULT_ACCESS_FNAME */
144 
146 #ifndef SERVER_CONFIG_FILE
147 #define SERVER_CONFIG_FILE "conf/httpd.conf"
148 #endif
149 
151 #ifndef DEFAULT_PATH
152 #define DEFAULT_PATH "/bin:/usr/bin:/usr/ucb:/usr/bsd:/usr/local/bin"
153 #endif
154 
156 #ifndef SUEXEC_BIN
157 #define SUEXEC_BIN HTTPD_ROOT "/bin/suexec"
158 #endif
159 
161 #ifndef DEFAULT_TIMEOUT
162 #define DEFAULT_TIMEOUT 60
163 #endif
164 
166 #ifndef DEFAULT_KEEPALIVE_TIMEOUT
167 #define DEFAULT_KEEPALIVE_TIMEOUT 5
168 #endif
169 
171 #ifndef DEFAULT_KEEPALIVE
172 #define DEFAULT_KEEPALIVE 100
173 #endif
174 
175 /*
176  * Limits on the size of various request items. These limits primarily
177  * exist to prevent simple denial-of-service attacks on a server based
178  * on misuse of the protocol. The recommended values will depend on the
179  * nature of the server resources -- CGI scripts and database backends
180  * might require large values, but most servers could get by with much
181  * smaller limits than we use below. The request message body size can
182  * be limited by the per-dir config directive LimitRequestBody.
183  *
184  * Internal buffer sizes are two bytes more than the DEFAULT_LIMIT_REQUEST_LINE
185  * and DEFAULT_LIMIT_REQUEST_FIELDSIZE below, which explains the 8190.
186  * These two limits can be lowered or raised by the server config
187  * directives LimitRequestLine and LimitRequestFieldsize, respectively.
188  *
189  * DEFAULT_LIMIT_REQUEST_FIELDS can be modified or disabled (set = 0) by
190  * the server config directive LimitRequestFields.
191  */
192 
194 #ifndef DEFAULT_LIMIT_REQUEST_LINE
195 #define DEFAULT_LIMIT_REQUEST_LINE 8190
196 #endif
198 #ifndef DEFAULT_LIMIT_REQUEST_FIELDSIZE
199 #define DEFAULT_LIMIT_REQUEST_FIELDSIZE 8190
200 #endif
202 #ifndef DEFAULT_LIMIT_REQUEST_FIELDS
203 #define DEFAULT_LIMIT_REQUEST_FIELDS 100
204 #endif
206 #ifndef DEFAULT_LIMIT_BLANK_LINES
207 #define DEFAULT_LIMIT_BLANK_LINES 10
208 #endif
209 
214 #define DEFAULT_ADD_DEFAULT_CHARSET_NAME "iso-8859-1"
215 
217 #define AP_SERVER_PROTOCOL "HTTP/1.1"
218 
219 
220 /* ------------------ stuff that modules are allowed to look at ----------- */
221 
223 #ifndef AP_DEFAULT_INDEX
224 #define AP_DEFAULT_INDEX "index.html"
225 #endif
226 
228 #ifndef AP_TYPES_CONFIG_FILE
229 #define AP_TYPES_CONFIG_FILE "conf/mime.types"
230 #endif
231 
232 /*
233  * Define the HTML doctype strings centrally.
234  */
236 #define DOCTYPE_HTML_2_0 "<!DOCTYPE HTML PUBLIC \"-//IETF//" \
237  "DTD HTML 2.0//EN\">\n"
239 #define DOCTYPE_HTML_3_2 "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
240  "DTD HTML 3.2 Final//EN\">\n"
242 #define DOCTYPE_HTML_4_0S "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
243  "DTD HTML 4.0//EN\"\n" \
244  "\"http://www.w3.org/TR/REC-html40/strict.dtd\">\n"
246 #define DOCTYPE_HTML_4_0T "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
247  "DTD HTML 4.0 Transitional//EN\"\n" \
248  "\"http://www.w3.org/TR/REC-html40/loose.dtd\">\n"
250 #define DOCTYPE_HTML_4_0F "<!DOCTYPE HTML PUBLIC \"-//W3C//" \
251  "DTD HTML 4.0 Frameset//EN\"\n" \
252  "\"http://www.w3.org/TR/REC-html40/frameset.dtd\">\n"
254 #define DOCTYPE_HTML_4_01 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\n"
256 #define DOCTYPE_HTML_5 "<!DOCTYPE html>\n"
258 #define DOCTYPE_XHTML_1_0S "<!DOCTYPE html PUBLIC \"-//W3C//" \
259  "DTD XHTML 1.0 Strict//EN\"\n" \
260  "\"http://www.w3.org/TR/xhtml1/DTD/" \
261  "xhtml1-strict.dtd\">\n"
263 #define DOCTYPE_XHTML_1_0T "<!DOCTYPE html PUBLIC \"-//W3C//" \
264  "DTD XHTML 1.0 Transitional//EN\"\n" \
265  "\"http://www.w3.org/TR/xhtml1/DTD/" \
266  "xhtml1-transitional.dtd\">\n"
268 #define DOCTYPE_XHTML_1_0F "<!DOCTYPE html PUBLIC \"-//W3C//" \
269  "DTD XHTML 1.0 Frameset//EN\"\n" \
270  "\"http://www.w3.org/TR/xhtml1/DTD/" \
271  "xhtml1-frameset.dtd\">"
272 
274 #define HTTP_VERSION(major,minor) (1000*(major)+(minor))
276 #define HTTP_VERSION_MAJOR(number) ((number)/1000)
278 #define HTTP_VERSION_MINOR(number) ((number)%1000)
279 
280 /* -------------- Port number for server running standalone --------------- */
281 
283 #define DEFAULT_HTTP_PORT 80
285 #define DEFAULT_HTTPS_PORT 443
292 #define ap_is_default_port(port,r) ((port) == ap_default_port(r))
297 #define ap_default_port(r) ap_run_default_port(r)
302 #define ap_http_scheme(r) ap_run_http_scheme(r)
303 
305 #define MAX_STRING_LEN HUGE_STRING_LEN
306 
308 #define HUGE_STRING_LEN 8192
309 
311 #define AP_IOBUFSIZE 8192
312 
314 #define AP_MAX_REG_MATCH 10
315 
322 #define AP_MAX_SENDFILE 16777216 /* 2^24 */
323 
330 #define APEXIT_OK 0x0
332 #define APEXIT_INIT 0x2
334 #define APEXIT_CHILDINIT 0x3
340 #define APEXIT_CHILDSICK 0x7
346 #define APEXIT_CHILDFATAL 0xf
347 
348 #ifndef AP_DECLARE
354 # define AP_DECLARE(type) type
355 #endif
356 
357 #ifndef AP_DECLARE_NONSTD
365 # define AP_DECLARE_NONSTD(type) type
366 #endif
367 #ifndef AP_DECLARE_DATA
368 # define AP_DECLARE_DATA
369 #endif
370 
371 #ifndef AP_MODULE_DECLARE
372 # define AP_MODULE_DECLARE(type) type
373 #endif
374 #ifndef AP_MODULE_DECLARE_NONSTD
375 # define AP_MODULE_DECLARE_NONSTD(type) type
376 #endif
377 #ifndef AP_MODULE_DECLARE_DATA
378 # define AP_MODULE_DECLARE_DATA
379 #endif
380 
385 #ifndef AP_CORE_DECLARE
386 # define AP_CORE_DECLARE AP_DECLARE
387 #endif
388 
394 #ifndef AP_CORE_DECLARE_NONSTD
395 # define AP_CORE_DECLARE_NONSTD AP_DECLARE_NONSTD
396 #endif
397 
402 #define AP_START_USERERR (APR_OS_START_USERERR + 2000)
403 #define AP_USERERR_LEN 1000
404 
406 #define AP_DECLINED (AP_START_USERERR + 0)
407 
414 typedef struct {
415  int major;
416  int minor;
417  int patch;
418  const char *add_string;
419 } ap_version_t;
420 
428 
435 AP_DECLARE(const char *) ap_get_server_banner(void);
436 
445 
451 AP_DECLARE(void) ap_add_version_component(apr_pool_t *pconf, const char *component);
452 
457 AP_DECLARE(const char *) ap_get_server_built(void);
458 
459 /* non-HTTP status codes returned by hooks */
460 
461 #define OK 0
462 #define DECLINED -1
463 #define DONE -2
466 #define SUSPENDED -3
471 #define AP_NOBODY_WROTE -100
474 #define AP_NOBODY_READ -101
478 #define AP_FILTER_ERROR -102
479 
490 #define RESPONSE_CODES 103
491 
492 #define HTTP_CONTINUE 100
493 #define HTTP_SWITCHING_PROTOCOLS 101
494 #define HTTP_PROCESSING 102
495 #define HTTP_OK 200
496 #define HTTP_CREATED 201
497 #define HTTP_ACCEPTED 202
498 #define HTTP_NON_AUTHORITATIVE 203
499 #define HTTP_NO_CONTENT 204
500 #define HTTP_RESET_CONTENT 205
501 #define HTTP_PARTIAL_CONTENT 206
502 #define HTTP_MULTI_STATUS 207
503 #define HTTP_ALREADY_REPORTED 208
504 #define HTTP_IM_USED 226
505 #define HTTP_MULTIPLE_CHOICES 300
506 #define HTTP_MOVED_PERMANENTLY 301
507 #define HTTP_MOVED_TEMPORARILY 302
508 #define HTTP_SEE_OTHER 303
509 #define HTTP_NOT_MODIFIED 304
510 #define HTTP_USE_PROXY 305
511 #define HTTP_TEMPORARY_REDIRECT 307
512 #define HTTP_PERMANENT_REDIRECT 308
513 #define HTTP_BAD_REQUEST 400
514 #define HTTP_UNAUTHORIZED 401
515 #define HTTP_PAYMENT_REQUIRED 402
516 #define HTTP_FORBIDDEN 403
517 #define HTTP_NOT_FOUND 404
518 #define HTTP_METHOD_NOT_ALLOWED 405
519 #define HTTP_NOT_ACCEPTABLE 406
520 #define HTTP_PROXY_AUTHENTICATION_REQUIRED 407
521 #define HTTP_REQUEST_TIME_OUT 408
522 #define HTTP_CONFLICT 409
523 #define HTTP_GONE 410
524 #define HTTP_LENGTH_REQUIRED 411
525 #define HTTP_PRECONDITION_FAILED 412
526 #define HTTP_REQUEST_ENTITY_TOO_LARGE 413
527 #define HTTP_REQUEST_URI_TOO_LARGE 414
528 #define HTTP_UNSUPPORTED_MEDIA_TYPE 415
529 #define HTTP_RANGE_NOT_SATISFIABLE 416
530 #define HTTP_EXPECTATION_FAILED 417
531 #define HTTP_IM_A_TEAPOT 418
532 #define HTTP_MISDIRECTED_REQUEST 421
533 #define HTTP_UNPROCESSABLE_ENTITY 422
534 #define HTTP_LOCKED 423
535 #define HTTP_FAILED_DEPENDENCY 424
536 #define HTTP_TOO_EARLY 425
537 #define HTTP_UPGRADE_REQUIRED 426
538 #define HTTP_PRECONDITION_REQUIRED 428
539 #define HTTP_TOO_MANY_REQUESTS 429
540 #define HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE 431
541 #define HTTP_UNAVAILABLE_FOR_LEGAL_REASONS 451
542 #define HTTP_INTERNAL_SERVER_ERROR 500
543 #define HTTP_NOT_IMPLEMENTED 501
544 #define HTTP_BAD_GATEWAY 502
545 #define HTTP_SERVICE_UNAVAILABLE 503
546 #define HTTP_GATEWAY_TIME_OUT 504
547 #define HTTP_VERSION_NOT_SUPPORTED 505
548 #define HTTP_VARIANT_ALSO_VARIES 506
549 #define HTTP_INSUFFICIENT_STORAGE 507
550 #define HTTP_LOOP_DETECTED 508
551 #define HTTP_NOT_EXTENDED 510
552 #define HTTP_NETWORK_AUTHENTICATION_REQUIRED 511
553 
555 #define ap_is_HTTP_INFO(x) (((x) >= 100)&&((x) < 200))
557 #define ap_is_HTTP_SUCCESS(x) (((x) >= 200)&&((x) < 300))
559 #define ap_is_HTTP_REDIRECT(x) (((x) >= 300)&&((x) < 400))
561 #define ap_is_HTTP_ERROR(x) (((x) >= 400)&&((x) < 600))
563 #define ap_is_HTTP_CLIENT_ERROR(x) (((x) >= 400)&&((x) < 500))
565 #define ap_is_HTTP_SERVER_ERROR(x) (((x) >= 500)&&((x) < 600))
567 #define ap_is_HTTP_VALID_RESPONSE(x) (((x) >= 100)&&((x) < 600))
568 
570 #define ap_status_drops_connection(x) \
571  (((x) == HTTP_BAD_REQUEST) || \
572  ((x) == HTTP_REQUEST_TIME_OUT) || \
573  ((x) == HTTP_LENGTH_REQUIRED) || \
574  ((x) == HTTP_REQUEST_ENTITY_TOO_LARGE) || \
575  ((x) == HTTP_REQUEST_URI_TOO_LARGE) || \
576  ((x) == HTTP_INTERNAL_SERVER_ERROR) || \
577  ((x) == HTTP_SERVICE_UNAVAILABLE) || \
578  ((x) == HTTP_NOT_IMPLEMENTED))
579 
581 #define AP_STATUS_IS_HEADER_ONLY(x) ((x) == HTTP_NO_CONTENT || \
582  (x) == HTTP_NOT_MODIFIED)
599 #define M_GET 0
600 #define M_PUT 1 /* : */
601 #define M_POST 2
602 #define M_DELETE 3
603 #define M_CONNECT 4
604 #define M_OPTIONS 5
605 #define M_TRACE 6
606 #define M_PATCH 7
607 #define M_PROPFIND 8
608 #define M_PROPPATCH 9 /* : */
609 #define M_MKCOL 10
610 #define M_COPY 11
611 #define M_MOVE 12
612 #define M_LOCK 13
613 #define M_UNLOCK 14
614 #define M_VERSION_CONTROL 15
615 #define M_CHECKOUT 16 /* : */
616 #define M_UNCHECKOUT 17
617 #define M_CHECKIN 18
618 #define M_UPDATE 19
619 #define M_LABEL 20
620 #define M_REPORT 21
621 #define M_MKWORKSPACE 22
622 #define M_MKACTIVITY 23
623 #define M_BASELINE_CONTROL 24
624 #define M_MERGE 25
625 /* Additional methods must be registered by the implementor, we have only
626  * room for 64 bit-wise methods available, so do not squander them (more of
627  * the above methods should probably move here)
628  */
629 /* #define M_BREW nn */
630 /* #define M_WHEN nn */
631 #define M_INVALID 26
639 #define METHODS 64
640 
648 #define AP_METHOD_BIT ((ap_method_mask_t)1)
649 
651 typedef struct ap_method_list_t ap_method_list_t;
652 
665 };
680 
686 #define AP_REQUEST_STRONG_ETAG 1 >> 0
687 
692 #define AP_REQUEST_GET_BNOTE(r, mask) \
693  ((mask) & ((r)->bnotes))
694 
699 #define AP_REQUEST_SET_BNOTE(r, mask, val) \
700  (r)->bnotes = (((r)->bnotes & ~(mask)) | (val))
701 
705 #define AP_REQUEST_IS_STRONG_ETAG(r) \
706  AP_REQUEST_GET_BNOTE((r), AP_REQUEST_STRONG_ETAG)
715 #define CGI_MAGIC_TYPE "application/x-httpd-cgi"
717 #define INCLUDES_MAGIC_TYPE "text/x-server-parsed-html"
719 #define INCLUDES_MAGIC_TYPE3 "text/x-server-parsed-html3"
721 #define DIR_MAGIC_TYPE "httpd/unix-directory"
723 #define AP_DEFAULT_HANDLER_NAME ""
724 #define AP_IS_DEFAULT_HANDLER_NAME(x) (*x == '\0')
725 
727 /* Just in case your linefeed isn't the one the other end is expecting. */
728 #if !APR_CHARSET_EBCDIC
730 #define LF 10
732 #define CR 13
734 #define CRLF "\015\012"
735 #else /* APR_CHARSET_EBCDIC */
736 /* For platforms using the EBCDIC charset, the transition ASCII->EBCDIC is done
737  * in the buff package (bread/bputs/bwrite). Everywhere else, we use
738  * "native EBCDIC" CR and NL characters. These are therefore
739  * defined as
740  * '\r' and '\n'.
741  */
742 #define CR '\r'
743 #define LF '\n'
744 #define CRLF "\r\n"
745 #endif /* APR_CHARSET_EBCDIC */
747 #define CRLF_ASCII "\015\012"
748 #define ZERO_ASCII "\060"
749 
757 #define REQUEST_NO_BODY 0
759 #define REQUEST_CHUNKED_ERROR 1
761 #define REQUEST_CHUNKED_DECHUNK 2
772 #define AP_REQ_ACCEPT_PATH_INFO 0
774 #define AP_REQ_REJECT_PATH_INFO 1
776 #define AP_REQ_DEFAULT_PATH_INFO 2
777 
781 /*
782  * Things which may vary per file-lookup WITHIN a request ---
783  * e.g., state of MIME config. Basically, the name of an object, info
784  * about the object, and any other info we may have which may need to
785  * change as we go poking around looking for it (e.g., overridden by
786  * .htaccess files).
787  *
788  * Note how the default state of almost all these things is properly
789  * zero, so that allocating it with pcalloc does the right thing without
790  * a whole lot of hairy initialization... so long as we are willing to
791  * make the (fairly) portable assumption that the bit pattern of a NULL
792  * pointer is, in fact, zero.
793  */
794 
801  const char *dir;
803  int override;
811  const struct htaccess_result *next;
812 };
813 
814 /* The following four types define a hierarchy of activities, so that
815  * given a request_rec r you can write r->connection->server->process
816  * to get to the process_rec. While this reduces substantially the
817  * number of arguments that various hooks require beware that in
818  * threaded versions of the server you must consider multiplexing
819  * issues. */
820 
821 
823 typedef struct process_rec process_rec;
825 typedef struct server_rec server_rec;
827 typedef struct conn_rec conn_rec;
829 typedef struct conn_slave_rec conn_slave_rec;
831 typedef struct request_rec request_rec;
833 typedef struct conn_state_t conn_state_t;
834 
835 /* ### would be nice to not include this from httpd.h ... */
836 /* This comes after we have defined the request_rec type */
837 #include "apr_uri.h"
838 
842 struct process_rec {
848  const char *short_name;
850  const char * const *argv;
852  int argc;
853 };
854 
858 struct request_rec {
865 
869  request_rec *prev;
870 
873  request_rec *main;
874 
875  /* Info about the request itself... we begin with stuff that only
876  * protocol.c should ever touch...
877  */
879  char *the_request;
881  int assbackwards;
886  int proxyreq;
892  const char *protocol;
896  const char *hostname;
897 
900 
902  const char *status_line;
904  int status;
905 
906  /* Request method, two ways; also, protocol, etc.. Outside of protocol.c,
907  * look, but don't touch.
908  */
909 
913  const char *method;
914 
940 
947 
948  /* HTTP/1.1 connection-level features */
949 
951  const char *range;
955  int chunked;
956 
964  unsigned expecting_100;
968  /* XXX: ap_body_to_table has been removed. Remove body_table too or
969  * XXX: keep it to reintroduce ap_body_to_table without major bump? */
975 
976  /* MIME header environments, in and out. Also, an array containing
977  * environment variables to be passed to subprocesses, so people can
978  * write modules to add to that environment.
979  *
980  * The difference between headers_out and err_headers_out is that the
981  * latter are printed even on error, and persist across internal redirects
982  * (so the headers printed for ErrorDocument handlers will have them).
983  *
984  * The 'notes' apr_table_t is for notes from one module to another, with no
985  * other set purpose in mind...
986  */
987 
999 
1000  /* content_type, handler, content_encoding, and all content_languages
1001  * MUST be lowercased strings. They may be pointers to static strings;
1002  * they should not be modified in place.
1003  */
1005  const char *content_type; /* Break these out --- we dispatch on 'em */
1007  const char *handler; /* What we *really* dispatch on */
1010  const char *content_encoding;
1015  char *vlist_validator;
1018  char *user;
1020  char *ap_auth_type;
1021 
1022  /* What object is being requested (either directly, or via include
1023  * or content-negotiation mapping).
1024  */
1029  char *uri;
1031  char *filename;
1037  char *path_info;
1039  char *args;
1040 
1049  int used_path_info;
1052  int eos_sent;
1053 
1054  /* Various other config info which may change with .htaccess files
1055  * These are config vectors, with one void* pointer for each module
1056  * (the thing pointed to being the module's business).
1057  */
1063 
1067  const struct ap_logconf *log;
1068 
1072  const char *log_id;
1073 
1080  const struct htaccess_result *htaccess;
1085  struct ap_filter_t *input_filters;
1086 
1097  int no_local_copy;
1098 
1102 #if APR_HAS_THREADS
1104 #endif
1110 
1116  char *useragent_ip;
1122 
1126  char *useragent_host;
1131  int double_reverse;
1136  int taint;
1141  unsigned int flushed:1;
1154  int body_indeterminate;
1159  unsigned int final_resp_passed:1;
1160 };
1161 
1172 #define PROXYREQ_NONE 0
1173 #define PROXYREQ_PROXY 1
1174 #define PROXYREQ_REVERSE 2
1175 #define PROXYREQ_RESPONSE 3
1177 /* @} */
1178 
1182 typedef enum {
1187 
1188 /* For struct ap_filter and ap_filter_conn_ctx */
1189 #include "util_filter.h"
1190 
1194 struct conn_rec {
1200  void *vhost_lookup_data;
1201 
1202  /* Information about the connection itself */
1209 
1213  char *client_ip;
1217  char *remote_host;
1220  /* TODO: Remove from request_rec, make local to mod_ident */
1221  char *remote_logname;
1224  char *local_ip;
1227  char *local_host;
1230  long id;
1233  struct ap_conf_vector_t *conn_config;
1242  void *sbh;
1246  conn_state_t *cs;
1247 
1251  unsigned int clogging_input_filters:1;
1252 
1255  signed int double_reverse:2;
1258  unsigned aborted;
1259 
1265  int keepalives;
1266 
1269  const struct ap_logconf *log;
1270 
1274  const char *log_id;
1275 
1276 
1282 #if APR_HAS_THREADS
1284 #endif
1290  conn_rec *master;
1293  void *ctx;
1296  void *suspended_baton;
1302  struct ap_filter_conn_ctx *filter_conn_ctx;
1306 
1307  int outgoing;
1308 };
1310 struct conn_slave_rec {
1311  conn_rec *c;
1312 };
1313 
1319 typedef enum {
1325  CONN_STATE_LINGER, /* connection may be closed with lingering */
1326  CONN_STATE_LINGER_NORMAL, /* MPM has started lingering close with normal timeout */
1327  CONN_STATE_LINGER_SHORT, /* MPM has started lingering close with short timeout */
1329  CONN_STATE_NUM /* Number of states (keep/kept last) */
1332 typedef enum {
1334  CONN_SENSE_WANT_READ, /* next event must be read */
1335  CONN_SENSE_WANT_WRITE /* next event must be write */
1336 } conn_sense_e;
1337 
1346 };
1347 
1348 /* Per-vhost config... */
1349 
1354 #define DEFAULT_VHOST_ADDR 0xfffffffful
1355 
1356 
1361 typedef struct server_addr_rec server_addr_rec;
1366  char *virthost;
1371 };
1372 
1373 struct ap_logconf {
1375  signed char *module_levels;
1378  int level;
1379 };
1383 struct server_rec {
1387  server_rec *next;
1388 
1389  /* Log files --- note that transfer log is now in the modules... */
1396  struct ap_logconf log;
1401 
1402  /* Module-specific configuration for server, and defaults... */
1403 
1411  const char *defn_name;
1415  char is_virtual;
1416 
1417 
1418  /* Information for redirects */
1423  const char *server_scheme;
1424 
1425  /* Contact information */
1430  char *server_hostname;
1431 
1432  /* Transaction handling */
1443  int keep_alive;
1451  const char *path;
1453  int pathlen;
1460  int limit_req_fields;
1463  void *context;
1464 
1468  unsigned int keep_alive_timeout_set:1;
1469 };
1470 
1475 typedef struct ap_sload_t ap_sload_t;
1476 struct ap_sload_t {
1477  /* percentage of process/threads ready/idle (0->100)*/
1478  int idle;
1479  /* percentage of process/threads busy (0->100) */
1480  int busy;
1481  /* total bytes served */
1483  /* total access count */
1484  unsigned long access_count;
1485 };
1486 
1491 typedef struct ap_loadavg_t ap_loadavg_t;
1493  /* current loadavg, ala getloadavg() */
1494  float loadavg;
1495  /* 5 min loadavg */
1496  float loadavg5;
1497  /* 15 min loadavg */
1498  float loadavg15;
1499 };
1500 
1511 
1517 AP_DECLARE(const char *) ap_context_prefix(request_rec *r);
1518 
1527 AP_DECLARE(void) ap_set_context_info(request_rec *r, const char *prefix,
1528  const char *document_root);
1529 
1535 AP_DECLARE(void) ap_set_document_root(request_rec *r, const char *document_root);
1536 
1544 AP_DECLARE(char *) ap_field_noparam(apr_pool_t *p, const char *intype);
1545 
1554 AP_DECLARE(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int gmt);
1555 
1556 /* String handling. The *_nc variants allow you to use non-const char **s as
1557  arguments (unfortunately C won't automatically convert a char ** to a const
1558  char **) */
1559 
1567 AP_DECLARE(char *) ap_getword(apr_pool_t *p, const char **line, char stop);
1568 
1577 AP_DECLARE(char *) ap_getword_nc(apr_pool_t *p, char **line, char stop);
1578 
1586 AP_DECLARE(char *) ap_getword_white(apr_pool_t *p, const char **line);
1587 
1596 AP_DECLARE(char *) ap_getword_white_nc(apr_pool_t *p, char **line);
1597 
1606 AP_DECLARE(char *) ap_getword_nulls(apr_pool_t *p, const char **line,
1607  char stop);
1608 
1618 AP_DECLARE(char *) ap_getword_nulls_nc(apr_pool_t *p, char **line, char stop);
1619 
1626 AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line);
1627 
1635 AP_DECLARE(char *) ap_getword_conf_nc(apr_pool_t *p, char **line);
1636 
1644 AP_DECLARE(char *) ap_getword_conf2(apr_pool_t *p, const char **line);
1645 
1654 AP_DECLARE(char *) ap_getword_conf2_nc(apr_pool_t *p, char **line);
1655 
1666 AP_DECLARE(const char *) ap_resolve_env(apr_pool_t *p, const char * word);
1667 
1677 AP_DECLARE(const char *) ap_size_list_item(const char **field, int *len);
1678 
1689 AP_DECLARE(char *) ap_get_list_item(apr_pool_t *p, const char **field);
1690 
1699 AP_DECLARE(int) ap_find_list_item(apr_pool_t *p, const char *line, const char *tok);
1700 
1708 AP_DECLARE(int) ap_find_etag_weak(apr_pool_t *p, const char *line, const char *tok);
1709 
1717 AP_DECLARE(int) ap_find_etag_strong(apr_pool_t *p, const char *line, const char *tok);
1718 
1719 /* Scan a string for field content chars, as defined by RFC7230 section 3.2
1720  * including VCHAR/obs-text, as well as HT and SP
1721  * @param ptr The string to scan
1722  * @return A pointer to the first (non-HT) ASCII ctrl character.
1723  * @note lws and trailing whitespace are scanned, the caller is responsible
1724  * for trimming leading and trailing whitespace
1725  */
1726 AP_DECLARE(const char *) ap_scan_http_field_content(const char *ptr);
1727 
1728 /* Scan a string for token characters, as defined by RFC7230 section 3.2.6
1729  * @param ptr The string to scan
1730  * @return A pointer to the first non-token character.
1731  */
1732 AP_DECLARE(const char *) ap_scan_http_token(const char *ptr);
1733 
1734 /* Scan a string for visible ASCII (0x21-0x7E) or obstext (0x80+)
1735  * and return a pointer to the first SP/CTL/NUL character encountered.
1736  * @param ptr The string to scan
1737  * @return A pointer to the first SP/CTL character.
1738  */
1739 AP_DECLARE(const char *) ap_scan_vchar_obstext(const char *ptr);
1740 
1754 AP_DECLARE(const char *) ap_parse_token_list_strict(apr_pool_t *p, const char *tok,
1755  apr_array_header_t **tokens,
1756  int skip_invalid);
1757 
1768 AP_DECLARE(char *) ap_get_token(apr_pool_t *p, const char **accept_line, int accept_white);
1769 
1777 AP_DECLARE(int) ap_find_token(apr_pool_t *p, const char *line, const char *tok);
1778 
1786 AP_DECLARE(int) ap_find_last_token(apr_pool_t *p, const char *line, const char *tok);
1787 
1793 AP_DECLARE(int) ap_is_url(const char *u);
1794 
1800 AP_DECLARE(int) ap_unescape_all(char *url);
1801 
1808 AP_DECLARE(int) ap_unescape_url(char *url);
1809 
1817 AP_DECLARE(int) ap_unescape_url_keep2f(char *url, int decode_slashes);
1819 #define AP_UNESCAPE_URL_KEEP_UNRESERVED (1u << 0)
1820 #define AP_UNESCAPE_URL_FORBID_SLASHES (1u << 1)
1821 #define AP_UNESCAPE_URL_KEEP_SLASHES (1u << 2)
1822 
1829 AP_DECLARE(int) ap_unescape_url_ex(char *url, unsigned int flags);
1830 
1837 AP_DECLARE(int) ap_unescape_urlencoded(char *query);
1838 
1844 AP_DECLARE(void) ap_no2slash(char *name)
1853 AP_DECLARE(void) ap_no2slash_ex(char *name, int is_fs_path)
1856 #define AP_NORMALIZE_ALLOW_RELATIVE (1u << 0)
1857 #define AP_NORMALIZE_NOT_ABOVE_ROOT (1u << 1)
1858 #define AP_NORMALIZE_DECODE_UNRESERVED (1u << 2)
1859 #define AP_NORMALIZE_MERGE_SLASHES (1u << 3)
1860 #define AP_NORMALIZE_DROP_PARAMETERS (0) /* deprecated */
1861 
1869 AP_DECLARE(int) ap_normalize_path(char *path, unsigned int flags)
1870  AP_FN_ATTR_NONNULL((1));
1871 
1877 AP_DECLARE(void) ap_getparents(char *name)
1879 
1887 AP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *s)
1889 
1897 AP_DECLARE(char *) ap_escape_path_segment_buffer(char *c, const char *s)
1899 
1910 AP_DECLARE(char *) ap_os_escape_path(apr_pool_t *p, const char *path, int partial)
1914 #define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1)
1915 
1923 AP_DECLARE(char *) ap_escape_urlencoded(apr_pool_t *p, const char *s)
1925 
1933 AP_DECLARE(char *) ap_escape_urlencoded_buffer(char *c, const char *s)
1935 
1943 #define ap_escape_html(p,s) ap_escape_html2(p,s,0)
1952 AP_DECLARE(char *) ap_escape_html2(apr_pool_t *p, const char *s, int toasc)
1954 
1962 AP_DECLARE(char *) ap_escape_logitem(apr_pool_t *p, const char *str)
1963  AP_FN_ATTR_NONNULL((1));
1964 
1973 AP_DECLARE(apr_size_t) ap_escape_errorlog_item(char *dest, const char *source,
1974  apr_size_t buflen)
1975  AP_FN_ATTR_NONNULL((1));
1976 
1985 AP_DECLARE(char *) ap_construct_server(apr_pool_t *p, const char *hostname,
1986  apr_port_t port, const request_rec *r)
1987  AP_FN_ATTR_NONNULL((1,4));
1988 
1996 AP_DECLARE(char *) ap_escape_shell_cmd(apr_pool_t *p, const char *s)
1998 
2004 AP_DECLARE(int) ap_count_dirs(const char *path)
2006 
2018 AP_DECLARE(char *) ap_make_dirstr_prefix(char *d, const char *s, int n)
2020 
2028 AP_DECLARE(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s)
2030 
2044 AP_DECLARE(char *) ap_make_full_path(apr_pool_t *a, const char *dir, const char *f)
2046 
2055 AP_DECLARE(int) ap_os_is_path_absolute(apr_pool_t *p, const char *dir)
2057 
2065 AP_DECLARE(int) ap_is_matchexp(const char *str)
2067 
2074 AP_DECLARE(int) ap_strcmp_match(const char *str, const char *expected)
2076 
2084 AP_DECLARE(int) ap_strcasecmp_match(const char *str, const char *expected)
2086 
2094 AP_DECLARE(char *) ap_strcasestr(const char *s1, const char *s2)
2096 
2103 AP_DECLARE(const char *) ap_stripprefix(const char *bigstring,
2104  const char *prefix)
2106 
2114 AP_DECLARE(char *) ap_pbase64decode(apr_pool_t *p, const char *bufcoded);
2115 
2134  const char *encoded,
2135  char **decoded,
2136  apr_size_t *len);
2137 
2145 AP_DECLARE(char *) ap_pbase64encode(apr_pool_t *p, char *string);
2146 
2160 AP_DECLARE(ap_regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern,
2161  int cflags);
2162 
2171 
2185 AP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input,
2186  const char *source, apr_size_t nmatch,
2187  ap_regmatch_t pmatch[]);
2188 
2204  const char *input, const char *source,
2205  apr_size_t nmatch,
2206  ap_regmatch_t pmatch[],
2207  apr_size_t maxlen);
2208 
2214 AP_DECLARE(void) ap_content_type_tolower(char *s);
2215 
2220 AP_DECLARE(void) ap_str_tolower(char *s);
2221 
2226 AP_DECLARE(void) ap_str_toupper(char *s);
2227 
2235 AP_DECLARE(int) ap_ind(const char *str, char c); /* Sigh... */
2236 
2244 AP_DECLARE(int) ap_rind(const char *str, char c);
2245 
2253 AP_DECLARE(char *) ap_escape_quotes(apr_pool_t *p, const char *instring);
2254 
2265 AP_DECLARE(char *) ap_append_pid(apr_pool_t *p, const char *string,
2266  const char *delim);
2267 
2275 AP_DECLARE(int) ap_parse_strict_length(apr_off_t *len, const char *str);
2276 
2296  const char *timeout_parameter,
2297  apr_interval_time_t *timeout,
2298  const char *default_time_unit);
2299 
2309 #define AP_TAINT_HTACCESS 0x1
2318 
2330  const char **dest);
2331 
2341 AP_DECLARE(apr_status_t) ap_str2_alnum(const char *src, char *dest);
2342 
2351 typedef struct {
2352  const char *name;
2353  apr_bucket_brigade *value;
2354 } ap_form_pair_t;
2355 
2367  apr_array_header_t **ptr,
2368  apr_size_t num, apr_size_t size);
2369 
2370 /* Misc system hackery */
2377 AP_DECLARE(int) ap_is_rdirectory(apr_pool_t *p, const char *name);
2378 
2385 AP_DECLARE(int) ap_is_directory(apr_pool_t *p, const char *name);
2386 
2387 #ifdef _OSD_POSIX
2388 extern int os_init_job_environment(server_rec *s, const char *user_name, int one_process);
2389 #endif /* _OSD_POSIX */
2390 
2397 
2404 AP_DECLARE(void) ap_log_assert(const char *szExp, const char *szFile, int nLine)
2405  __attribute__((noreturn));
2406 
2410 #define ap_assert(exp) ((exp) ? (void)0 : ap_log_assert(#exp,__FILE__,__LINE__))
2411 
2419 #ifdef AP_DEBUG
2420 #define AP_DEBUG_ASSERT(exp) ap_assert(exp)
2421 #else
2422 #define AP_DEBUG_ASSERT(exp) ((void)0)
2423 #endif
2424 
2434 #define SIGSTOP_DETACH 1
2436 #define SIGSTOP_MAKE_CHILD 2
2438 #define SIGSTOP_SPAWN_CHILD 4
2440 #define SIGSTOP_PIPED_LOG_SPAWN 8
2442 #define SIGSTOP_CGI_CHILD 16
2443 
2445 #ifdef DEBUG_SIGSTOP
2446 extern int raise_sigstop_flags;
2447 #define RAISE_SIGSTOP(x) do { \
2448  if (raise_sigstop_flags & SIGSTOP_##x) raise(SIGSTOP);\
2449  } while (0)
2450 #else
2451 #define RAISE_SIGSTOP(x)
2452 #endif
2460 AP_DECLARE(const char *) ap_psignature(const char *prefix, request_rec *r);
2461 
2462  /* The C library has functions that allow const to be silently dropped ...
2463  these macros detect the drop in maintainer mode, but use the native
2464  methods for normal builds
2465 
2466  Note that on some platforms (e.g., AIX with gcc, Solaris with gcc), string.h needs
2467  to be included before the macros are defined or compilation will fail.
2468  */
2469 #include <string.h>
2471 AP_DECLARE(char *) ap_strchr(char *s, int c);
2472 AP_DECLARE(const char *) ap_strchr_c(const char *s, int c);
2473 AP_DECLARE(char *) ap_strrchr(char *s, int c);
2474 AP_DECLARE(const char *) ap_strrchr_c(const char *s, int c);
2475 AP_DECLARE(char *) ap_strstr(char *s, const char *c);
2476 AP_DECLARE(const char *) ap_strstr_c(const char *s, const char *c);
2479 
2480 #ifdef AP_DEBUG
2481 
2482 #undef strchr
2483 # define strchr(s, c) ap_strchr(s,c)
2484 #undef strrchr
2485 # define strrchr(s, c) ap_strrchr(s,c)
2486 #undef strstr
2487 # define strstr(s, c) ap_strstr(s,c)
2488 
2489 #if !defined(AP_DEBUG_NO_ALLOC_POISON) && !APR_POOL_DEBUG
2490 /*
2491  * ap_palloc_debug initializes allocated memory to non-zero
2492  */
2493 #define apr_palloc ap_palloc_debug
2494 /*
2495  * this is necessary to avoid useless double memset of memory
2496  * with ap_palloc_debug
2497  */
2498 #ifdef apr_pcalloc
2499 #undef apr_pcalloc
2500 #endif
2501 #define apr_pcalloc ap_pcalloc_debug
2502 #endif
2503 
2504 #else
2507 # define ap_strchr(s, c) strchr(s, c)
2509 # define ap_strchr_c(s, c) strchr(s, c)
2511 # define ap_strrchr(s, c) strrchr(s, c)
2513 # define ap_strrchr_c(s, c) strrchr(s, c)
2515 # define ap_strstr(s, c) strstr(s, c)
2517 # define ap_strstr_c(s, c) strstr(s, c)
2518 
2519 #endif
2520 
2531 
2539 
2543 AP_DECLARE(void) ap_abort_on_oom(void) __attribute__((noreturn));
2544 
2551 AP_DECLARE(void *) ap_malloc(size_t size)
2554 
2562 AP_DECLARE(void *) ap_calloc(size_t nelem, size_t size)
2565 
2573 AP_DECLARE(void *) ap_realloc(void *ptr, size_t size)
2576 
2577 #if APR_HAS_THREADS
2578 
2579 /* apr_thread_create() wrapper that handles thread pool limits and
2580  * ap_thread_current() eventually (if not handle by APR already).
2581  */
2583  apr_threadattr_t *attr,
2584  apr_thread_start_t func,
2585  void *data, apr_pool_t *pool);
2587 /* Make the main() thread ap_thread_current()-able. */
2589  apr_pool_t *pool);
2590 
2591 #if APR_VERSION_AT_LEAST(1,8,0)
2592 
2596 #if APR_HAS_THREAD_LOCAL && !defined(AP_NO_THREAD_LOCAL)
2597 #define AP_THREAD_LOCAL APR_THREAD_LOCAL
2598 #endif
2599 #define ap_thread_current apr_thread_current
2600 #define ap_thread_current_create apr_thread_current_create
2601 #define ap_thread_current_after_fork apr_thread_current_after_fork
2602 
2603 #else /* APR_VERSION_AT_LEAST(1,8,0) */
2604 
2605 #if !defined(AP_NO_THREAD_LOCAL)
2609 #if defined(__cplusplus) && __cplusplus >= 201103L
2610 #define AP_THREAD_LOCAL thread_local
2611 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112 && \
2612  (!defined(__GNUC__) || \
2613  __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9))
2614 #define AP_THREAD_LOCAL _Thread_local
2615 #elif defined(__GNUC__) /* works for clang too */
2616 #define AP_THREAD_LOCAL __thread
2617 #elif defined(WIN32) && defined(_MSC_VER)
2618 #define AP_THREAD_LOCAL __declspec(thread)
2619 #endif
2620 #endif /* !defined(AP_NO_THREAD_LOCAL) */
2621 
2627 
2628 #endif /* APR_VERSION_AT_LEAST(1,8,0) */
2629 
2630 #endif /* APR_HAS_THREADS */
2631 
2632 #ifdef AP_THREAD_LOCAL
2633 #define AP_HAS_THREAD_LOCAL 1
2634 #else
2635 #define AP_HAS_THREAD_LOCAL 0
2636 #endif
2637 
2644 
2651 
2660 AP_DECLARE(void) ap_bin2hex(const void *src, apr_size_t srclen, char *dest)
2662 
2676  const char *username,
2677  const char *passwd,
2678  const char *hash);
2679 
2689  const char *cmd,
2690  const char * const *argv);
2692 
2693 #define AP_NORESTART APR_OS_START_USEERR + 1
2694 
2705  const char *s,
2706  int start);
2707 
2715  const char *s);
2716 
2729 AP_DECLARE(int) ap_cstr_casecmp(const char *s1, const char *s2);
2730 
2743 AP_DECLARE(int) ap_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n);
2744 
2748 #define AP_DIR_FLAG_NONE 0
2749 
2754 #define AP_DIR_FLAG_OPTIONAL 1
2755 
2760 #define AP_DIR_FLAG_RECURSIVE 2
2761 
2765 typedef struct ap_dir_match_t ap_dir_match_t;
2766 
2776  const char *prefix;
2778  const char *(*cb)(ap_dir_match_t *w, const char *fname);
2780  void *ctx;
2782  int flags;
2784  unsigned int depth;
2785 };
2786 
2807 AP_DECLARE(const char *)ap_dir_nofnmatch(ap_dir_match_t *w, const char *fname)
2808  __attribute__((nonnull(1,2)));
2809 
2828 AP_DECLARE(const char *)ap_dir_fnmatch(ap_dir_match_t *w, const char *path,
2829  const char *fname) __attribute__((nonnull(1,3)));
2830 
2838 AP_DECLARE(int) ap_is_chunked(apr_pool_t *p, const char *line);
2839 
2840 #ifdef __cplusplus
2841 }
2842 #endif
2843 
2844 #endif /* !APACHE_HTTPD_H */
2845 
Symbol export macros and hook functions.
#define AP_FN_ATTR_NONNULL_ALL
Definition: ap_config.h:260
#define AP_FN_ATTR_ALLOC_SIZE2(x, y)
Definition: ap_config.h:249
#define AP_FN_ATTR_ALLOC_SIZE(x)
Definition: ap_config.h:248
Module Magic Number.
Apache Regex defines.
Version Release defines.
APR Platform Definitions.
APR-UTIL Buckets/Bucket Brigades.
APR Miscellaneous library routines.
APR Hash Tables.
APR Network library.
APR Poll interface.
APR memory allocation.
APR Table library.
APR Thread and Process Library.
APR Time Library.
APR-UTIL URI Routines.
APR Versioning Interface.
struct ap_conf_vector_t ap_conf_vector_t
Definition: http_config.h:512
const char * ap_get_server_description(void)
void ap_get_server_revision(ap_version_t *version)
void ap_add_version_component(apr_pool_t *pconf, const char *component)
const char * ap_get_server_banner(void)
const char * ap_get_server_built(void)
unsigned int clogging_input_filters
Definition: httpd.h:1249
char * user
Definition: httpd.h:1016
char * useragent_host
Definition: httpd.h:1124
apr_array_header_t * requests
Definition: httpd.h:1297
apr_array_header_t * content_languages
Definition: httpd.h:1010
int status
Definition: httpd.h:902
int eos_sent
Definition: httpd.h:1050
const struct ap_logconf * log
Definition: httpd.h:1267
int async_filter
Definition: httpd.h:1303
char * remote_logname
Definition: httpd.h:1219
int argc
Definition: httpd.h:850
apr_array_header_t * method_list
Definition: httpd.h:662
apr_pool_t * pool
Definition: httpd.h:842
int patch
Definition: httpd.h:417
apr_sockaddr_t * client_addr
Definition: httpd.h:1206
struct ap_errorlog_provider * errorlog_provider
Definition: httpd.h:1396
apr_off_t bytes_sent
Definition: httpd.h:942
conn_state_t * cs
Definition: httpd.h:1244
apr_pool_t * pool
Definition: httpd.h:1194
server_rec * base_server
Definition: httpd.h:1196
ap_conn_keepalive_e keepalive
Definition: httpd.h:1260
apr_off_t bytes_served
Definition: httpd.h:1480
int minor
Definition: httpd.h:416
char * uri
Definition: httpd.h:1027
const char * content_type
Definition: httpd.h:1003
apr_sockaddr_t * local_addr
Definition: httpd.h:1202
const char * path
Definition: httpd.h:1449
apr_table_t * trailers_in
Definition: httpd.h:1117
float loadavg5
Definition: httpd.h:1494
void * errorlog_provider_handle
Definition: httpd.h:1398
struct ap_filter_t * input_filters
Definition: httpd.h:1236
apr_table_t * body_table
Definition: httpd.h:968
apr_array_header_t * slaves
Definition: httpd.h:1285
void * suspended_baton
Definition: httpd.h:1294
unsigned long access_count
Definition: httpd.h:1482
struct ap_filter_t * output_filters
Definition: httpd.h:1081
int pathlen
Definition: httpd.h:1451
int double_reverse
Definition: httpd.h:1129
char * useragent_ip
Definition: httpd.h:1114
apr_interval_time_t timeout
Definition: httpd.h:1435
request_rec * prev
Definition: httpd.h:867
int assbackwards
Definition: httpd.h:879
conn_state_e state
Definition: httpd.h:1341
process_rec * process
Definition: httpd.h:1383
int read_body
Definition: httpd.h:958
int header_only
Definition: httpd.h:886
apr_time_t mtime
Definition: httpd.h:944
int limit_req_line
Definition: httpd.h:1454
struct ap_filter_t * output_filters
Definition: httpd.h:1238
struct ap_filter_conn_ctx * filter_conn_ctx
Definition: httpd.h:1300
const char * dir
Definition: httpd.h:799
int outgoing
Definition: httpd.h:1305
apr_port_t host_port
Definition: httpd.h:1368
struct ap_filter_t * proto_input_filters
Definition: httpd.h:1090
const char * handler
Definition: httpd.h:1005
ap_method_mask_t method_mask
Definition: httpd.h:660
apr_table_t * notes
Definition: httpd.h:996
int body_indeterminate
Definition: httpd.h:1152
unsigned defn_line_number
Definition: httpd.h:1411
unsigned expecting_100
Definition: httpd.h:962
const char * hostname
Definition: httpd.h:894
const struct htaccess_result * htaccess
Definition: httpd.h:1078
struct apr_bucket_alloc_t * bucket_alloc
Definition: httpd.h:1242
int used_path_info
Definition: httpd.h:1047
server_addr_rec * next
Definition: httpd.h:1362
char * the_request
Definition: httpd.h:877
apr_table_t * override_list
Definition: httpd.h:805
int method_number
Definition: httpd.h:909
apr_interval_time_t keep_alive_timeout
Definition: httpd.h:1437
apr_array_header_t * names
Definition: httpd.h:1444
int major
Definition: httpd.h:415
conn_rec * c
Definition: httpd.h:1309
apr_pool_t * pool
Definition: httpd.h:858
apr_file_t * error_log
Definition: httpd.h:1392
apr_sockaddr_t * useragent_addr
Definition: httpd.h:1113
char * filename
Definition: httpd.h:1029
const char * short_name
Definition: httpd.h:846
apr_time_t request_time
Definition: httpd.h:897
int keep_alive
Definition: httpd.h:1441
apr_off_t remaining
Definition: httpd.h:970
signed int double_reverse
Definition: httpd.h:1253
apr_uri_t parsed_uri
Definition: httpd.h:1105
const char * server_scheme
Definition: httpd.h:1421
unsigned int flushed
Definition: httpd.h:1139
char * client_ip
Definition: httpd.h:1211
apr_table_t * notes
Definition: httpd.h:1234
const char * defn_name
Definition: httpd.h:1409
char * unparsed_uri
Definition: httpd.h:1025
int limit_req_fieldsize
Definition: httpd.h:1456
int proxyreq
Definition: httpd.h:884
conn_rec * connection
Definition: httpd.h:860
int limit_req_fields
Definition: httpd.h:1458
int keep_alive_max
Definition: httpd.h:1439
int flags
Definition: httpd.h:2780
const char * add_string
Definition: httpd.h:418
server_rec * next
Definition: httpd.h:1385
server_addr_rec * addrs
Definition: httpd.h:1433
int idle
Definition: httpd.h:1476
signed char * module_levels
Definition: httpd.h:1373
const char * log_id
Definition: httpd.h:1272
char * local_host
Definition: httpd.h:1225
apr_bucket_brigade * kept_body
Definition: httpd.h:964
ap_method_list_t * allowed_methods
Definition: httpd.h:937
apr_array_header_t * allowed_xmethods
Definition: httpd.h:935
void * ctx
Definition: httpd.h:2778
int no_cache
Definition: httpd.h:1093
const char * log_id
Definition: httpd.h:1070
unsigned int final_resp_passed
Definition: httpd.h:1157
apr_table_t * err_headers_out
Definition: httpd.h:992
struct ap_filter_t * proto_output_filters
Definition: httpd.h:1087
int taint
Definition: httpd.h:1134
apr_finfo_t finfo
Definition: httpd.h:1107
int no_local_copy
Definition: httpd.h:1095
char * canonical_filename
Definition: httpd.h:1033
char * server_hostname
Definition: httpd.h:1428
const struct ap_logconf * log
Definition: httpd.h:1065
void * context
Definition: httpd.h:1461
ap_request_bnotes_t bnotes
Definition: httpd.h:1144
float loadavg
Definition: httpd.h:1492
int proto_num
Definition: httpd.h:888
char * virthost
Definition: httpd.h:1364
int chunked
Definition: httpd.h:953
struct ap_filter_t * input_filters
Definition: httpd.h:1083
struct ap_conf_vector_t * request_config
Definition: httpd.h:1060
float loadavg15
Definition: httpd.h:1496
const char * prefix
Definition: httpd.h:2774
int busy
Definition: httpd.h:1478
apr_array_header_t * wild_names
Definition: httpd.h:1446
apr_pool_t * pconf
Definition: httpd.h:844
int keepalives
Definition: httpd.h:1263
int level
Definition: httpd.h:1376
apr_table_t * headers_in
Definition: httpd.h:987
const char *const * argv
Definition: httpd.h:848
char * remote_host
Definition: httpd.h:1215
struct ap_conf_vector_t * lookup_defaults
Definition: httpd.h:1406
conn_sense_e sense
Definition: httpd.h:1343
struct ap_conf_vector_t * htaccess
Definition: httpd.h:807
void * ctx
Definition: httpd.h:1291
const char * range
Definition: httpd.h:949
conn_rec * master
Definition: httpd.h:1288
char * error_fname
Definition: httpd.h:1390
int read_chunked
Definition: httpd.h:960
char is_virtual
Definition: httpd.h:1413
apr_pool_t * p
Definition: httpd.h:2770
apr_off_t read_length
Definition: httpd.h:972
struct ap_conf_vector_t * module_config
Definition: httpd.h:1404
request_rec * main
Definition: httpd.h:871
apr_sockaddr_t * host_addr
Definition: httpd.h:1366
unsigned int keep_alive_timeout_set
Definition: httpd.h:1466
apr_pool_t * ptemp
Definition: httpd.h:2772
unsigned int depth
Definition: httpd.h:2782
struct ap_logconf log
Definition: httpd.h:1394
apr_table_t * subprocess_env
Definition: httpd.h:994
struct ap_conf_vector_t * conn_config
Definition: httpd.h:1231
const struct htaccess_result * next
Definition: httpd.h:809
const char * protocol
Definition: httpd.h:890
void * vhost_lookup_data
Definition: httpd.h:1198
apr_off_t sent_bodyct
Definition: httpd.h:940
server_rec * server
Definition: httpd.h:862
int override_opts
Definition: httpd.h:803
char * local_ip
Definition: httpd.h:1222
struct ap_conf_vector_t * per_dir_config
Definition: httpd.h:1058
apr_off_t clength
Definition: httpd.h:951
char * vlist_validator
Definition: httpd.h:1013
ap_method_mask_t allowed
Definition: httpd.h:933
const char * status_line
Definition: httpd.h:900
apr_port_t port
Definition: httpd.h:1419
apr_thread_mutex_t * invoke_mtx
Definition: httpd.h:1101
const char * method
Definition: httpd.h:911
char * server_admin
Definition: httpd.h:1426
unsigned aborted
Definition: httpd.h:1256
void * sbh
Definition: httpd.h:1240
char * path_info
Definition: httpd.h:1035
request_rec * next
Definition: httpd.h:865
long id
Definition: httpd.h:1228
char * args
Definition: httpd.h:1037
apr_table_t * trailers_out
Definition: httpd.h:1119
const char * content_encoding
Definition: httpd.h:1008
char * ap_auth_type
Definition: httpd.h:1018
apr_thread_t * current_thread
Definition: httpd.h:1281
apr_table_t * headers_out
Definition: httpd.h:989
struct apr_bucket_alloc_t apr_bucket_alloc_t
Definition: apr_buckets.h:128
dav_resource int dav_locktoken dav_response int flags
Definition: mod_dav.h:1458
dav_buffer apr_size_t size
Definition: mod_dav.h:461
request_rec * r
Definition: mod_dav.h:518
dav_buffer const char * str
Definition: mod_dav.h:465
const char * prefix
Definition: mod_dav.h:631
const char * s
Definition: mod_dav.h:1327
dav_error * src
Definition: mod_dav.h:186
apr_bucket_brigade request_rec apr_pool_t * pool
Definition: mod_dav.h:557
const char * name
Definition: mod_dav.h:805
proxy_worker proxy_server_conf char * url
Definition: mod_proxy.h:647
const char AP_FN_ATTR_WARN_UNUSED_RESULT
Definition: ssl_private.h:1161
AP_FN_ATTR_NONNULL((1, 2, 5)) AP_FN_ATTR_WARN_UNUSED_RESULT
apr_uint64_t ap_method_mask_t
Definition: httpd.h:642
char * ap_escape_quotes(apr_pool_t *p, const char *instring)
#define ap_strchr(s, c)
Definition: httpd.h:2505
apr_status_t ap_thread_create(apr_thread_t **thread, apr_threadattr_t *attr, apr_thread_start_t func, void *data, apr_pool_t *pool)
char * ap_getword_nc(apr_pool_t *p, char **line, char stop)
int ap_array_str_index(const apr_array_header_t *array, const char *s, int start)
#define ap_strstr(s, c)
Definition: httpd.h:2513
int ap_request_tainted(request_rec *r, int flags)
void ap_random_insecure_bytes(void *buf, apr_size_t size)
void ap_no2slash(char *name) AP_FN_ATTR_NONNULL_ALL
ap_conn_keepalive_e
Enumeration of connection keepalive options.
Definition: httpd.h:1180
void ap_set_document_root(request_rec *r, const char *document_root)
const char const char int ap_is_chunked(apr_pool_t *p, const char *line)
apr_size_t ap_escape_errorlog_item(char *dest, const char *source, apr_size_t buflen) AP_FN_ATTR_NONNULL((1))
void ap_no2slash_ex(char *name, int is_fs_path) AP_FN_ATTR_NONNULL_ALL
apr_status_t ap_pbase64decode_strict(apr_pool_t *p, const char *encoded, char **decoded, apr_size_t *len)
int ap_is_directory(apr_pool_t *p, const char *name)
#define ap_strrchr(s, c)
Definition: httpd.h:2509
char * ap_escape_path_segment_buffer(char *c, const char *s) AP_FN_ATTR_NONNULL_ALL
char * ap_make_dirstr_parent(apr_pool_t *p, const char *s) AP_FN_ATTR_NONNULL_ALL
int ap_is_url(const char *u)
char * ap_get_local_host(apr_pool_t *p)
char char * ap_escape_shell_cmd(apr_pool_t *p, const char *s) AP_FN_ATTR_NONNULL_ALL
char * ap_strcasestr(const char *s1, const char *s2) AP_FN_ATTR_NONNULL_ALL
char * ap_getword_white(apr_pool_t *p, const char **line)
int ap_cstr_casecmp(const char *s1, const char *s2)
int ap_unescape_url_ex(char *url, unsigned int flags)
char * ap_getword_nulls_nc(apr_pool_t *p, char **line, char stop)
const char * ap_stripprefix(const char *bigstring, const char *prefix) AP_FN_ATTR_NONNULL_ALL
char * ap_getword_conf2_nc(apr_pool_t *p, char **line)
#define ap_strrchr_c(s, c)
Definition: httpd.h:2511
#define ap_strstr_c(s, c)
Definition: httpd.h:2515
char * ap_getword_nulls(apr_pool_t *p, const char **line, char stop)
char * ap_field_noparam(apr_pool_t *p, const char *intype)
char * ap_escape_path_segment(apr_pool_t *p, const char *s) AP_FN_ATTR_NONNULL_ALL
char * ap_construct_server(apr_pool_t *p, const char *hostname, apr_port_t port, const request_rec *r) AP_FN_ATTR_NONNULL((1
int ap_find_etag_weak(apr_pool_t *p, const char *line, const char *tok)
apr_status_t ap_thread_main_create(apr_thread_t **thread, apr_pool_t *pool)
const char * ap_context_prefix(request_rec *r)
int ap_strcmp_match(const char *str, const char *expected) AP_FN_ATTR_NONNULL_ALL
void ap_set_context_info(request_rec *r, const char *prefix, const char *document_root)
char * ap_pbase64decode(apr_pool_t *p, const char *bufcoded)
int ap_unescape_urlencoded(char *query)
char * ap_getword(apr_pool_t *p, const char **line, char stop)
void ap_log_assert(const char *szExp, const char *szFile, int nLine) __attribute__((noreturn))
#define ap_strchr_c(s, c)
Definition: httpd.h:2507
conn_state_e
Definition: httpd.h:1317
char * ap_escape_logitem(apr_pool_t *p, const char *str) AP_FN_ATTR_NONNULL((1))
char * ap_make_full_path(apr_pool_t *a, const char *dir, const char *f) AP_FN_ATTR_NONNULL_ALL
const char * ap_size_list_item(const char **field, int *len)
char * ap_getword_conf2(apr_pool_t *p, const char **line)
void * ap_calloc(size_t nelem, size_t size) __attribute__((malloc)) AP_FN_ATTR_ALLOC_SIZE2(1
int ap_normalize_path(char *path, unsigned int flags) AP_FN_ATTR_NONNULL((1))
int ap_find_etag_strong(apr_pool_t *p, const char *line, const char *tok)
char * ap_escape_urlencoded_buffer(char *c, const char *s) AP_FN_ATTR_NONNULL_ALL
int ap_unescape_all(char *url)
const char * ap_resolve_env(apr_pool_t *p, const char *word)
char * ap_getword_conf_nc(apr_pool_t *p, char **line)
apr_status_t ap_str2_alnum(const char *src, char *dest)
void ap_str_toupper(char *s)
char * ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int gmt)
void ap_getparents(char *name) AP_FN_ATTR_NONNULL_ALL
int ap_rind(const char *str, char c)
void ap_abort_on_oom(void) __attribute__((noreturn))
int ap_is_rdirectory(apr_pool_t *p, const char *name)
int ap_count_dirs(const char *path) AP_FN_ATTR_NONNULL_ALL
int ap_request_has_body(request_rec *r)
void ap_content_type_tolower(char *s)
int ap_os_is_path_absolute(apr_pool_t *p, const char *dir) AP_FN_ATTR_NONNULL_ALL
char * ap_escape_urlencoded(apr_pool_t *p, const char *s) AP_FN_ATTR_NONNULL_ALL
int ap_find_token(apr_pool_t *p, const char *line, const char *tok)
apr_thread_t * ap_thread_current(void)
int ap_parse_form_data(request_rec *r, struct ap_filter_t *f, apr_array_header_t **ptr, apr_size_t num, apr_size_t size)
void * ap_malloc(size_t size) __attribute__((malloc)) AP_FN_ATTR_ALLOC_SIZE(1)
ap_regex_t * ap_pregcomp(apr_pool_t *p, const char *pattern, int cflags)
apr_status_t ap_pregsub_ex(apr_pool_t *p, char **result, const char *input, const char *source, apr_size_t nmatch, ap_regmatch_t pmatch[], apr_size_t maxlen)
char * ap_pregsub(apr_pool_t *p, const char *input, const char *source, apr_size_t nmatch, ap_regmatch_t pmatch[])
int ap_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n)
const char * ap_scan_vchar_obstext(const char *ptr)
char * ap_append_pid(apr_pool_t *p, const char *string, const char *delim)
conn_sense_e
Definition: httpd.h:1330
char * ap_get_token(apr_pool_t *p, const char **accept_line, int accept_white)
char * ap_get_list_item(apr_pool_t *p, const char **field)
void void * ap_realloc(void *ptr, size_t size) AP_FN_ATTR_WARN_UNUSED_RESULT AP_FN_ATTR_ALLOC_SIZE(2)
void ap_get_sload(ap_sload_t *ld) AP_FN_ATTR_NONNULL_ALL
const char * ap_scan_http_field_content(const char *ptr)
char * ap_os_escape_path(apr_pool_t *p, const char *path, int partial) AP_FN_ATTR_NONNULL_ALL
const char * ap_context_document_root(request_rec *r)
void ap_str_tolower(char *s)
int ap_parse_strict_length(apr_off_t *len, const char *str)
void * ap_pcalloc_debug(apr_pool_t *p, apr_size_t size)
apr_status_t ap_thread_current_create(apr_thread_t **current, apr_threadattr_t *attr, apr_pool_t *pool)
char * ap_pbase64encode(apr_pool_t *p, char *string)
int ap_array_str_contains(const apr_array_header_t *array, const char *s)
const char * ap_scan_http_token(const char *ptr)
apr_status_t ap_password_validate(request_rec *r, const char *username, const char *passwd, const char *hash)
const char * ap_psignature(const char *prefix, request_rec *r)
int ap_unescape_url(char *url)
int ap_ind(const char *str, char c)
apr_status_t ap_pstr2_alnum(apr_pool_t *p, const char *src, const char **dest)
void * ap_palloc_debug(apr_pool_t *p, apr_size_t size)
apr_uint32_t ap_random_pick(apr_uint32_t min, apr_uint32_t max)
int ap_unescape_url_keep2f(char *url, int decode_slashes)
char * ap_escape_html2(apr_pool_t *p, const char *s, int toasc) AP_FN_ATTR_NONNULL_ALL
void ap_pregfree(apr_pool_t *p, ap_regex_t *reg)
const char * ap_parse_token_list_strict(apr_pool_t *p, const char *tok, apr_array_header_t **tokens, int skip_invalid)
const char const char * ap_dir_fnmatch(ap_dir_match_t *w, const char *path, const char *fname) __attribute__((nonnull(1
int ap_strcasecmp_match(const char *str, const char *expected) AP_FN_ATTR_NONNULL_ALL
void ap_get_loadavg(ap_loadavg_t *ld) AP_FN_ATTR_NONNULL_ALL
const char * ap_dir_nofnmatch(ap_dir_match_t *w, const char *fname) __attribute__((nonnull(1
int ap_is_matchexp(const char *str) AP_FN_ATTR_NONNULL_ALL
void ap_thread_current_after_fork(void)
char * ap_make_dirstr_prefix(char *d, const char *s, int n) AP_FN_ATTR_NONNULL_ALL
int ap_find_list_item(apr_pool_t *p, const char *line, const char *tok)
apr_status_t ap_timeout_parameter_parse(const char *timeout_parameter, apr_interval_time_t *timeout, const char *default_time_unit)
char * ap_getword_conf(apr_pool_t *p, const char **line)
void ap_bin2hex(const void *src, apr_size_t srclen, char *dest) AP_FN_ATTR_NONNULL_ALL
int ap_find_last_token(apr_pool_t *p, const char *line, const char *tok)
char * ap_get_exec_line(apr_pool_t *p, const char *cmd, const char *const *argv)
char * ap_getword_white_nc(apr_pool_t *p, char **line)
@ AP_CONN_KEEPALIVE
Definition: httpd.h:1183
@ AP_CONN_UNKNOWN
Definition: httpd.h:1181
@ AP_CONN_CLOSE
Definition: httpd.h:1182
@ CONN_STATE_NUM
Definition: httpd.h:1327
@ CONN_STATE_LINGER
Definition: httpd.h:1323
@ CONN_STATE_LINGER_NORMAL
Definition: httpd.h:1324
@ CONN_STATE_READ_REQUEST_LINE
Definition: httpd.h:1319
@ CONN_STATE_LINGER_SHORT
Definition: httpd.h:1325
@ CONN_STATE_CHECK_REQUEST_LINE_READABLE
Definition: httpd.h:1318
@ CONN_STATE_WRITE_COMPLETION
Definition: httpd.h:1321
@ CONN_STATE_SUSPENDED
Definition: httpd.h:1322
@ CONN_STATE_HANDLER
Definition: httpd.h:1320
@ CONN_SENSE_WANT_WRITE
Definition: httpd.h:1333
@ CONN_SENSE_DEFAULT
Definition: httpd.h:1331
@ CONN_SENSE_WANT_READ
Definition: httpd.h:1332
int apr_status_t
Definition: apr_errno.h:44
apr_uint16_t apr_port_t
Definition: apr_network_io.h:230
unsigned int apr_uint32_t
Definition: apr.h:348
off_t apr_off_t
Definition: apr.h:396
#define __attribute__(__x)
Definition: apr.h:63
size_t apr_size_t
Definition: apr.h:394
uint64_t apr_uint64_t
Definition: apr.h:387
struct apr_pool_t apr_pool_t
Definition: apr_pools.h:60
struct apr_table_t apr_table_t
Definition: apr_tables.h:56
void *(APR_THREAD_FUNC * apr_thread_start_t)(apr_thread_t *, void *)
Definition: apr_thread_proc.h:198
apr_int64_t apr_interval_time_t
Definition: apr_time.h:55
apr_int64_t apr_time_t
Definition: apr_time.h:45
apr_uint64_t ap_request_bnotes_t
Definition: httpd.h:677
#define AP_DECLARE(x)
Definition: macros.h:1
#define malloc(x)
Definition: apr_private.h:170
Definition: httpd.h:2768
Definition: http_core.h:932
The representation of a filter chain.
Definition: util_filter.h:278
Definition: httpd.h:2349
A structure to hold various server loadavg.
Definition: httpd.h:1490
Definition: httpd.h:1371
Structure for handling HTTP methods.
Definition: httpd.h:658
Definition: ap_regex.h:111
Definition: ap_regex.h:118
A structure to hold server load params.
Definition: httpd.h:1474
The numeric version information is broken out into fields within this structure.
Definition: httpd.h:414
Definition: apr_tables.h:62
Definition: apr_buckets.h:263
Definition: apr_arch_file_io.h:107
Definition: apr_file_info.h:174
Definition: apr_network_io.h:239
Definition: apr_arch_thread_mutex.h:28
Definition: apr_arch_threadproc.h:42
Definition: apr_arch_threadproc.h:51
Definition: apr_uri.h:85
Structure to store things which are per connection.
Definition: httpd.h:1192
Definition: httpd.h:1308
A structure to contain connection state information.
Definition: httpd.h:1339
This represents the result of calling htaccess; these are cached for each request.
Definition: httpd.h:797
A structure that represents one process.
Definition: httpd.h:840
A structure that represents the current request.
Definition: httpd.h:856
A structure to be used for Per-vhost config.
Definition: httpd.h:1360
A structure to store information for each virtual server.
Definition: httpd.h:1381
apr_pool_t * p
Apache filter library.