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;
1147 
1155  unsigned int body_indeterminate :1;
1160  unsigned int final_resp_passed :1;
1161 };
1162 
1173 #define PROXYREQ_NONE 0
1174 #define PROXYREQ_PROXY 1
1175 #define PROXYREQ_REVERSE 2
1176 #define PROXYREQ_RESPONSE 3
1178 /* @} */
1179 
1183 typedef enum {
1188 
1189 /* For struct ap_filter and ap_filter_conn_ctx */
1190 #include "util_filter.h"
1191 
1195 struct conn_rec {
1201  void *vhost_lookup_data;
1202 
1203  /* Information about the connection itself */
1210 
1214  char *client_ip;
1218  char *remote_host;
1221  /* TODO: Remove from request_rec, make local to mod_ident */
1222  char *remote_logname;
1225  char *local_ip;
1228  char *local_host;
1231  long id;
1234  struct ap_conf_vector_t *conn_config;
1243  void *sbh;
1247  conn_state_t *cs;
1248 
1252  unsigned int clogging_input_filters:1;
1253 
1256  signed int double_reverse:2;
1259  unsigned aborted;
1260 
1266  int keepalives;
1267 
1270  const struct ap_logconf *log;
1271 
1275  const char *log_id;
1276 
1277 
1283 #if APR_HAS_THREADS
1285 #endif
1291  conn_rec *master;
1294  void *ctx;
1297  void *suspended_baton;
1303  struct ap_filter_conn_ctx *filter_conn_ctx;
1307 
1308  int outgoing;
1309 };
1311 struct conn_slave_rec {
1312  conn_rec *c;
1313 };
1314 
1320 typedef enum {
1326  CONN_STATE_LINGER, /* connection may be closed with lingering */
1327  CONN_STATE_LINGER_NORMAL, /* MPM has started lingering close with normal timeout */
1328  CONN_STATE_LINGER_SHORT, /* MPM has started lingering close with short timeout */
1330  CONN_STATE_NUM /* Number of states (keep/kept last) */
1333 typedef enum {
1335  CONN_SENSE_WANT_READ, /* next event must be read */
1336  CONN_SENSE_WANT_WRITE /* next event must be write */
1337 } conn_sense_e;
1338 
1347 };
1348 
1349 /* Per-vhost config... */
1350 
1355 #define DEFAULT_VHOST_ADDR 0xfffffffful
1356 
1357 
1362 typedef struct server_addr_rec server_addr_rec;
1367  char *virthost;
1372 };
1373 
1374 struct ap_logconf {
1376  signed char *module_levels;
1379  int level;
1380 };
1384 struct server_rec {
1388  server_rec *next;
1389 
1390  /* Log files --- note that transfer log is now in the modules... */
1397  struct ap_logconf log;
1402 
1403  /* Module-specific configuration for server, and defaults... */
1404 
1412  const char *defn_name;
1416  char is_virtual;
1417 
1418 
1419  /* Information for redirects */
1424  const char *server_scheme;
1425 
1426  /* Contact information */
1431  char *server_hostname;
1432 
1433  /* Transaction handling */
1444  int keep_alive;
1452  const char *path;
1454  int pathlen;
1461  int limit_req_fields;
1464  void *context;
1465 
1469  unsigned int keep_alive_timeout_set:1;
1470 };
1471 
1476 typedef struct ap_sload_t ap_sload_t;
1477 struct ap_sload_t {
1478  /* percentage of process/threads ready/idle (0->100)*/
1479  int idle;
1480  /* percentage of process/threads busy (0->100) */
1481  int busy;
1482  /* total bytes served */
1484  /* total access count */
1485  unsigned long access_count;
1486 };
1487 
1492 typedef struct ap_loadavg_t ap_loadavg_t;
1494  /* current loadavg, ala getloadavg() */
1495  float loadavg;
1496  /* 5 min loadavg */
1497  float loadavg5;
1498  /* 15 min loadavg */
1499  float loadavg15;
1500 };
1501 
1512 
1518 AP_DECLARE(const char *) ap_context_prefix(request_rec *r);
1519 
1528 AP_DECLARE(void) ap_set_context_info(request_rec *r, const char *prefix,
1529  const char *document_root);
1530 
1536 AP_DECLARE(void) ap_set_document_root(request_rec *r, const char *document_root);
1537 
1545 AP_DECLARE(char *) ap_field_noparam(apr_pool_t *p, const char *intype);
1546 
1555 AP_DECLARE(char *) ap_ht_time(apr_pool_t *p, apr_time_t t, const char *fmt, int gmt);
1556 
1557 /* String handling. The *_nc variants allow you to use non-const char **s as
1558  arguments (unfortunately C won't automatically convert a char ** to a const
1559  char **) */
1560 
1568 AP_DECLARE(char *) ap_getword(apr_pool_t *p, const char **line, char stop);
1569 
1578 AP_DECLARE(char *) ap_getword_nc(apr_pool_t *p, char **line, char stop);
1579 
1587 AP_DECLARE(char *) ap_getword_white(apr_pool_t *p, const char **line);
1588 
1597 AP_DECLARE(char *) ap_getword_white_nc(apr_pool_t *p, char **line);
1598 
1607 AP_DECLARE(char *) ap_getword_nulls(apr_pool_t *p, const char **line,
1608  char stop);
1609 
1619 AP_DECLARE(char *) ap_getword_nulls_nc(apr_pool_t *p, char **line, char stop);
1620 
1627 AP_DECLARE(char *) ap_getword_conf(apr_pool_t *p, const char **line);
1628 
1636 AP_DECLARE(char *) ap_getword_conf_nc(apr_pool_t *p, char **line);
1637 
1645 AP_DECLARE(char *) ap_getword_conf2(apr_pool_t *p, const char **line);
1646 
1655 AP_DECLARE(char *) ap_getword_conf2_nc(apr_pool_t *p, char **line);
1656 
1667 AP_DECLARE(const char *) ap_resolve_env(apr_pool_t *p, const char * word);
1668 
1678 AP_DECLARE(const char *) ap_size_list_item(const char **field, int *len);
1679 
1690 AP_DECLARE(char *) ap_get_list_item(apr_pool_t *p, const char **field);
1691 
1700 AP_DECLARE(int) ap_find_list_item(apr_pool_t *p, const char *line, const char *tok);
1701 
1709 AP_DECLARE(int) ap_find_etag_weak(apr_pool_t *p, const char *line, const char *tok);
1710 
1718 AP_DECLARE(int) ap_find_etag_strong(apr_pool_t *p, const char *line, const char *tok);
1719 
1720 /* Scan a string for field content chars, as defined by RFC7230 section 3.2
1721  * including VCHAR/obs-text, as well as HT and SP
1722  * @param ptr The string to scan
1723  * @return A pointer to the first (non-HT) ASCII ctrl character.
1724  * @note lws and trailing whitespace are scanned, the caller is responsible
1725  * for trimming leading and trailing whitespace
1726  */
1727 AP_DECLARE(const char *) ap_scan_http_field_content(const char *ptr);
1728 
1729 /* Scan a string for token characters, as defined by RFC7230 section 3.2.6
1730  * @param ptr The string to scan
1731  * @return A pointer to the first non-token character.
1732  */
1733 AP_DECLARE(const char *) ap_scan_http_token(const char *ptr);
1734 
1735 /* Scan a string for visible ASCII (0x21-0x7E) or obstext (0x80+)
1736  * and return a pointer to the first SP/CTL/NUL character encountered.
1737  * @param ptr The string to scan
1738  * @return A pointer to the first SP/CTL character.
1739  */
1740 AP_DECLARE(const char *) ap_scan_vchar_obstext(const char *ptr);
1741 
1755 AP_DECLARE(const char *) ap_parse_token_list_strict(apr_pool_t *p, const char *tok,
1756  apr_array_header_t **tokens,
1757  int skip_invalid);
1758 
1769 AP_DECLARE(char *) ap_get_token(apr_pool_t *p, const char **accept_line, int accept_white);
1770 
1778 AP_DECLARE(int) ap_find_token(apr_pool_t *p, const char *line, const char *tok);
1779 
1787 AP_DECLARE(int) ap_find_last_token(apr_pool_t *p, const char *line, const char *tok);
1788 
1794 AP_DECLARE(int) ap_is_url(const char *u);
1795 
1801 AP_DECLARE(int) ap_unescape_all(char *url);
1802 
1809 AP_DECLARE(int) ap_unescape_url(char *url);
1810 
1818 AP_DECLARE(int) ap_unescape_url_keep2f(char *url, int decode_slashes);
1820 #define AP_UNESCAPE_URL_KEEP_UNRESERVED (1u << 0)
1821 #define AP_UNESCAPE_URL_FORBID_SLASHES (1u << 1)
1822 #define AP_UNESCAPE_URL_KEEP_SLASHES (1u << 2)
1823 
1830 AP_DECLARE(int) ap_unescape_url_ex(char *url, unsigned int flags);
1831 
1838 AP_DECLARE(int) ap_unescape_urlencoded(char *query);
1839 
1845 AP_DECLARE(void) ap_no2slash(char *name)
1854 AP_DECLARE(void) ap_no2slash_ex(char *name, int is_fs_path)
1857 #define AP_NORMALIZE_ALLOW_RELATIVE (1u << 0)
1858 #define AP_NORMALIZE_NOT_ABOVE_ROOT (1u << 1)
1859 #define AP_NORMALIZE_DECODE_UNRESERVED (1u << 2)
1860 #define AP_NORMALIZE_MERGE_SLASHES (1u << 3)
1861 #define AP_NORMALIZE_DROP_PARAMETERS (0) /* deprecated */
1862 
1870 AP_DECLARE(int) ap_normalize_path(char *path, unsigned int flags)
1871  AP_FN_ATTR_NONNULL((1));
1872 
1878 AP_DECLARE(void) ap_getparents(char *name)
1880 
1888 AP_DECLARE(char *) ap_escape_path_segment(apr_pool_t *p, const char *s)
1890 
1898 AP_DECLARE(char *) ap_escape_path_segment_buffer(char *c, const char *s)
1900 
1911 AP_DECLARE(char *) ap_os_escape_path(apr_pool_t *p, const char *path, int partial)
1915 #define ap_escape_uri(ppool,path) ap_os_escape_path(ppool,path,1)
1916 
1924 AP_DECLARE(char *) ap_escape_urlencoded(apr_pool_t *p, const char *s)
1926 
1934 AP_DECLARE(char *) ap_escape_urlencoded_buffer(char *c, const char *s)
1936 
1944 #define ap_escape_html(p,s) ap_escape_html2(p,s,0)
1953 AP_DECLARE(char *) ap_escape_html2(apr_pool_t *p, const char *s, int toasc)
1955 
1963 AP_DECLARE(char *) ap_escape_logitem(apr_pool_t *p, const char *str)
1964  AP_FN_ATTR_NONNULL((1));
1965 
1974 AP_DECLARE(apr_size_t) ap_escape_errorlog_item(char *dest, const char *source,
1975  apr_size_t buflen)
1976  AP_FN_ATTR_NONNULL((1));
1977 
1986 AP_DECLARE(char *) ap_construct_server(apr_pool_t *p, const char *hostname,
1987  apr_port_t port, const request_rec *r)
1988  AP_FN_ATTR_NONNULL((1,4));
1989 
1997 AP_DECLARE(char *) ap_escape_shell_cmd(apr_pool_t *p, const char *s)
1999 
2005 AP_DECLARE(int) ap_count_dirs(const char *path)
2007 
2019 AP_DECLARE(char *) ap_make_dirstr_prefix(char *d, const char *s, int n)
2021 
2029 AP_DECLARE(char *) ap_make_dirstr_parent(apr_pool_t *p, const char *s)
2031 
2045 AP_DECLARE(char *) ap_make_full_path(apr_pool_t *a, const char *dir, const char *f)
2047 
2056 AP_DECLARE(int) ap_os_is_path_absolute(apr_pool_t *p, const char *dir)
2058 
2066 AP_DECLARE(int) ap_is_matchexp(const char *str)
2068 
2075 AP_DECLARE(int) ap_strcmp_match(const char *str, const char *expected)
2077 
2085 AP_DECLARE(int) ap_strcasecmp_match(const char *str, const char *expected)
2087 
2095 AP_DECLARE(char *) ap_strcasestr(const char *s1, const char *s2)
2097 
2104 AP_DECLARE(const char *) ap_stripprefix(const char *bigstring,
2105  const char *prefix)
2107 
2115 AP_DECLARE(char *) ap_pbase64decode(apr_pool_t *p, const char *bufcoded);
2116 
2135  const char *encoded,
2136  char **decoded,
2137  apr_size_t *len);
2138 
2146 AP_DECLARE(char *) ap_pbase64encode(apr_pool_t *p, char *string);
2147 
2161 AP_DECLARE(ap_regex_t *) ap_pregcomp(apr_pool_t *p, const char *pattern,
2162  int cflags);
2163 
2172 
2186 AP_DECLARE(char *) ap_pregsub(apr_pool_t *p, const char *input,
2187  const char *source, apr_size_t nmatch,
2188  ap_regmatch_t pmatch[]);
2189 
2205  const char *input, const char *source,
2206  apr_size_t nmatch,
2207  ap_regmatch_t pmatch[],
2208  apr_size_t maxlen);
2209 
2215 AP_DECLARE(void) ap_content_type_tolower(char *s);
2216 
2221 AP_DECLARE(void) ap_str_tolower(char *s);
2222 
2227 AP_DECLARE(void) ap_str_toupper(char *s);
2228 
2236 AP_DECLARE(int) ap_ind(const char *str, char c); /* Sigh... */
2237 
2245 AP_DECLARE(int) ap_rind(const char *str, char c);
2246 
2254 AP_DECLARE(char *) ap_escape_quotes(apr_pool_t *p, const char *instring);
2255 
2266 AP_DECLARE(char *) ap_append_pid(apr_pool_t *p, const char *string,
2267  const char *delim);
2268 
2276 AP_DECLARE(int) ap_parse_strict_length(apr_off_t *len, const char *str);
2277 
2297  const char *timeout_parameter,
2298  apr_interval_time_t *timeout,
2299  const char *default_time_unit);
2300 
2310 #define AP_TAINT_HTACCESS 0x1
2319 
2331  const char **dest);
2332 
2342 AP_DECLARE(apr_status_t) ap_str2_alnum(const char *src, char *dest);
2343 
2352 typedef struct {
2353  const char *name;
2354  apr_bucket_brigade *value;
2355 } ap_form_pair_t;
2356 
2368  apr_array_header_t **ptr,
2369  apr_size_t num, apr_size_t size);
2370 
2371 /* Misc system hackery */
2378 AP_DECLARE(int) ap_is_rdirectory(apr_pool_t *p, const char *name);
2379 
2386 AP_DECLARE(int) ap_is_directory(apr_pool_t *p, const char *name);
2387 
2388 #ifdef _OSD_POSIX
2389 extern int os_init_job_environment(server_rec *s, const char *user_name, int one_process);
2390 #endif /* _OSD_POSIX */
2391 
2398 
2405 AP_DECLARE(void) ap_log_assert(const char *szExp, const char *szFile, int nLine)
2406  __attribute__((noreturn));
2407 
2411 #define ap_assert(exp) ((exp) ? (void)0 : ap_log_assert(#exp,__FILE__,__LINE__))
2412 
2420 #ifdef AP_DEBUG
2421 #define AP_DEBUG_ASSERT(exp) ap_assert(exp)
2422 #else
2423 #define AP_DEBUG_ASSERT(exp) ((void)0)
2424 #endif
2425 
2435 #define SIGSTOP_DETACH 1
2437 #define SIGSTOP_MAKE_CHILD 2
2439 #define SIGSTOP_SPAWN_CHILD 4
2441 #define SIGSTOP_PIPED_LOG_SPAWN 8
2443 #define SIGSTOP_CGI_CHILD 16
2444 
2446 #ifdef DEBUG_SIGSTOP
2447 extern int raise_sigstop_flags;
2448 #define RAISE_SIGSTOP(x) do { \
2449  if (raise_sigstop_flags & SIGSTOP_##x) raise(SIGSTOP);\
2450  } while (0)
2451 #else
2452 #define RAISE_SIGSTOP(x)
2453 #endif
2461 AP_DECLARE(const char *) ap_psignature(const char *prefix, request_rec *r);
2462 
2463  /* The C library has functions that allow const to be silently dropped ...
2464  these macros detect the drop in maintainer mode, but use the native
2465  methods for normal builds
2466 
2467  Note that on some platforms (e.g., AIX with gcc, Solaris with gcc), string.h needs
2468  to be included before the macros are defined or compilation will fail.
2469  */
2470 #include <string.h>
2472 AP_DECLARE(char *) ap_strchr(char *s, int c);
2473 AP_DECLARE(const char *) ap_strchr_c(const char *s, int c);
2474 AP_DECLARE(char *) ap_strrchr(char *s, int c);
2475 AP_DECLARE(const char *) ap_strrchr_c(const char *s, int c);
2476 AP_DECLARE(char *) ap_strstr(char *s, const char *c);
2477 AP_DECLARE(const char *) ap_strstr_c(const char *s, const char *c);
2480 
2481 #ifdef AP_DEBUG
2482 
2483 #undef strchr
2484 # define strchr(s, c) ap_strchr(s,c)
2485 #undef strrchr
2486 # define strrchr(s, c) ap_strrchr(s,c)
2487 #undef strstr
2488 # define strstr(s, c) ap_strstr(s,c)
2489 
2490 #if !defined(AP_DEBUG_NO_ALLOC_POISON) && !APR_POOL_DEBUG
2491 /*
2492  * ap_palloc_debug initializes allocated memory to non-zero
2493  */
2494 #define apr_palloc ap_palloc_debug
2495 /*
2496  * this is necessary to avoid useless double memset of memory
2497  * with ap_palloc_debug
2498  */
2499 #ifdef apr_pcalloc
2500 #undef apr_pcalloc
2501 #endif
2502 #define apr_pcalloc ap_pcalloc_debug
2503 #endif
2504 
2505 #else
2508 # define ap_strchr(s, c) strchr(s, c)
2510 # define ap_strchr_c(s, c) strchr(s, c)
2512 # define ap_strrchr(s, c) strrchr(s, c)
2514 # define ap_strrchr_c(s, c) strrchr(s, c)
2516 # define ap_strstr(s, c) strstr(s, c)
2518 # define ap_strstr_c(s, c) strstr(s, c)
2519 
2520 #endif
2521 
2532 
2540 
2544 AP_DECLARE(void) ap_abort_on_oom(void) __attribute__((noreturn));
2545 
2552 AP_DECLARE(void *) ap_malloc(size_t size)
2555 
2563 AP_DECLARE(void *) ap_calloc(size_t nelem, size_t size)
2566 
2574 AP_DECLARE(void *) ap_realloc(void *ptr, size_t size)
2577 
2578 #if APR_HAS_THREADS
2579 
2580 /* apr_thread_create() wrapper that handles thread pool limits and
2581  * ap_thread_current() eventually (if not handle by APR already).
2582  */
2584  apr_threadattr_t *attr,
2585  apr_thread_start_t func,
2586  void *data, apr_pool_t *pool);
2588 /* Make the main() thread ap_thread_current()-able. */
2590  apr_pool_t *pool);
2591 
2592 #if APR_VERSION_AT_LEAST(1,8,0)
2593 
2597 #if APR_HAS_THREAD_LOCAL && !defined(AP_NO_THREAD_LOCAL)
2598 #define AP_THREAD_LOCAL APR_THREAD_LOCAL
2599 #endif
2600 #define ap_thread_current apr_thread_current
2601 #define ap_thread_current_create apr_thread_current_create
2602 #define ap_thread_current_after_fork apr_thread_current_after_fork
2603 
2604 #else /* APR_VERSION_AT_LEAST(1,8,0) */
2605 
2606 #if !defined(AP_NO_THREAD_LOCAL)
2610 #if defined(__cplusplus) && __cplusplus >= 201103L
2611 #define AP_THREAD_LOCAL thread_local
2612 #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112 && \
2613  (!defined(__GNUC__) || \
2614  __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 9))
2615 #define AP_THREAD_LOCAL _Thread_local
2616 #elif defined(__GNUC__) /* works for clang too */
2617 #define AP_THREAD_LOCAL __thread
2618 #elif defined(WIN32) && defined(_MSC_VER)
2619 #define AP_THREAD_LOCAL __declspec(thread)
2620 #endif
2621 #endif /* !defined(AP_NO_THREAD_LOCAL) */
2622 
2628 
2629 #endif /* APR_VERSION_AT_LEAST(1,8,0) */
2630 
2631 #endif /* APR_HAS_THREADS */
2632 
2633 #ifdef AP_THREAD_LOCAL
2634 #define AP_HAS_THREAD_LOCAL 1
2635 #else
2636 #define AP_HAS_THREAD_LOCAL 0
2637 #endif
2638 
2645 
2652 
2661 AP_DECLARE(void) ap_bin2hex(const void *src, apr_size_t srclen, char *dest)
2663 
2677  const char *username,
2678  const char *passwd,
2679  const char *hash);
2680 
2690  const char *cmd,
2691  const char * const *argv);
2693 
2694 #define AP_NORESTART APR_OS_START_USEERR + 1
2695 
2706  const char *s,
2707  int start);
2708 
2716  const char *s);
2717 
2730 AP_DECLARE(int) ap_cstr_casecmp(const char *s1, const char *s2);
2731 
2744 AP_DECLARE(int) ap_cstr_casecmpn(const char *s1, const char *s2, apr_size_t n);
2745 
2749 #define AP_DIR_FLAG_NONE 0
2750 
2755 #define AP_DIR_FLAG_OPTIONAL 1
2756 
2761 #define AP_DIR_FLAG_RECURSIVE 2
2762 
2766 typedef struct ap_dir_match_t ap_dir_match_t;
2767 
2777  const char *prefix;
2779  const char *(*cb)(ap_dir_match_t *w, const char *fname);
2781  void *ctx;
2783  int flags;
2785  unsigned int depth;
2786 };
2787 
2808 AP_DECLARE(const char *)ap_dir_nofnmatch(ap_dir_match_t *w, const char *fname)
2809  __attribute__((nonnull(1,2)));
2810 
2829 AP_DECLARE(const char *)ap_dir_fnmatch(ap_dir_match_t *w, const char *path,
2830  const char *fname) __attribute__((nonnull(1,3)));
2831 
2839 AP_DECLARE(int) ap_is_chunked(apr_pool_t *p, const char *line);
2840 
2841 #ifdef __cplusplus
2842 }
2843 #endif
2844 
2845 #endif /* !APACHE_HTTPD_H */
2846 
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:1250
char * user
Definition: httpd.h:1016
char * useragent_host
Definition: httpd.h:1124
apr_array_header_t * requests
Definition: httpd.h:1298
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:1268
int async_filter
Definition: httpd.h:1304
char * remote_logname
Definition: httpd.h:1220
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:1207
struct ap_errorlog_provider * errorlog_provider
Definition: httpd.h:1397
apr_off_t bytes_sent
Definition: httpd.h:942
conn_state_t * cs
Definition: httpd.h:1245
apr_pool_t * pool
Definition: httpd.h:1195
server_rec * base_server
Definition: httpd.h:1197
ap_conn_keepalive_e keepalive
Definition: httpd.h:1261
apr_off_t bytes_served
Definition: httpd.h:1481
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:1203
const char * path
Definition: httpd.h:1450
apr_table_t * trailers_in
Definition: httpd.h:1117
float loadavg5
Definition: httpd.h:1495
void * errorlog_provider_handle
Definition: httpd.h:1399
struct ap_filter_t * input_filters
Definition: httpd.h:1237
apr_table_t * body_table
Definition: httpd.h:968
apr_array_header_t * slaves
Definition: httpd.h:1286
void * suspended_baton
Definition: httpd.h:1295
unsigned long access_count
Definition: httpd.h:1483
struct ap_filter_t * output_filters
Definition: httpd.h:1081
int pathlen
Definition: httpd.h:1452
int double_reverse
Definition: httpd.h:1129
char * useragent_ip
Definition: httpd.h:1114
apr_interval_time_t timeout
Definition: httpd.h:1436
request_rec * prev
Definition: httpd.h:867
int assbackwards
Definition: httpd.h:879
conn_state_e state
Definition: httpd.h:1342
process_rec * process
Definition: httpd.h:1384
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:1455
struct ap_filter_t * output_filters
Definition: httpd.h:1239
struct ap_filter_conn_ctx * filter_conn_ctx
Definition: httpd.h:1301
const char * dir
Definition: httpd.h:799
int outgoing
Definition: httpd.h:1306
apr_port_t host_port
Definition: httpd.h:1369
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
unsigned defn_line_number
Definition: httpd.h:1412
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:1243
int used_path_info
Definition: httpd.h:1047
server_addr_rec * next
Definition: httpd.h:1363
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:1438
apr_array_header_t * names
Definition: httpd.h:1445
int major
Definition: httpd.h:415
conn_rec * c
Definition: httpd.h:1310
apr_pool_t * pool
Definition: httpd.h:858
apr_file_t * error_log
Definition: httpd.h:1393
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:1442
apr_off_t remaining
Definition: httpd.h:970
signed int double_reverse
Definition: httpd.h:1254
apr_uri_t parsed_uri
Definition: httpd.h:1105
const char * server_scheme
Definition: httpd.h:1422
unsigned int flushed
Definition: httpd.h:1139
char * client_ip
Definition: httpd.h:1212
apr_table_t * notes
Definition: httpd.h:1235
const char * defn_name
Definition: httpd.h:1410
char * unparsed_uri
Definition: httpd.h:1025
int limit_req_fieldsize
Definition: httpd.h:1457
int proxyreq
Definition: httpd.h:884
conn_rec * connection
Definition: httpd.h:860
int limit_req_fields
Definition: httpd.h:1459
int keep_alive_max
Definition: httpd.h:1440
int flags
Definition: httpd.h:2781
const char * add_string
Definition: httpd.h:418
server_rec * next
Definition: httpd.h:1386
server_addr_rec * addrs
Definition: httpd.h:1434
int idle
Definition: httpd.h:1477
signed char * module_levels
Definition: httpd.h:1374
const char * log_id
Definition: httpd.h:1273
char * local_host
Definition: httpd.h:1226
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:2779
int no_cache
Definition: httpd.h:1093
const char * log_id
Definition: httpd.h:1070
unsigned int final_resp_passed
Definition: httpd.h:1158
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:1429
const struct ap_logconf * log
Definition: httpd.h:1065
void * context
Definition: httpd.h:1462
ap_request_bnotes_t bnotes
Definition: httpd.h:1144
float loadavg
Definition: httpd.h:1493
int proto_num
Definition: httpd.h:888
char * virthost
Definition: httpd.h:1365
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:1497
const char * prefix
Definition: httpd.h:2775
int busy
Definition: httpd.h:1479
apr_array_header_t * wild_names
Definition: httpd.h:1447
apr_pool_t * pconf
Definition: httpd.h:844
int keepalives
Definition: httpd.h:1264
int level
Definition: httpd.h:1377
apr_table_t * headers_in
Definition: httpd.h:987
const char *const * argv
Definition: httpd.h:848
char * remote_host
Definition: httpd.h:1216
struct ap_conf_vector_t * lookup_defaults
Definition: httpd.h:1407
conn_sense_e sense
Definition: httpd.h:1344
struct ap_conf_vector_t * htaccess
Definition: httpd.h:807
void * ctx
Definition: httpd.h:1292
const char * range
Definition: httpd.h:949
conn_rec * master
Definition: httpd.h:1289
char * error_fname
Definition: httpd.h:1391
int read_chunked
Definition: httpd.h:960
char is_virtual
Definition: httpd.h:1414
apr_pool_t * p
Definition: httpd.h:2771
apr_off_t read_length
Definition: httpd.h:972
struct ap_conf_vector_t * module_config
Definition: httpd.h:1405
request_rec * main
Definition: httpd.h:871
unsigned int body_indeterminate
Definition: httpd.h:1153
apr_sockaddr_t * host_addr
Definition: httpd.h:1367
unsigned int keep_alive_timeout_set
Definition: httpd.h:1467
apr_pool_t * ptemp
Definition: httpd.h:2773
unsigned int depth
Definition: httpd.h:2783
struct ap_logconf log
Definition: httpd.h:1395
apr_table_t * subprocess_env
Definition: httpd.h:994
struct ap_conf_vector_t * conn_config
Definition: httpd.h:1232
const struct htaccess_result * next
Definition: httpd.h:809
const char * protocol
Definition: httpd.h:890
void * vhost_lookup_data
Definition: httpd.h:1199
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:1223
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:1420
apr_thread_mutex_t * invoke_mtx
Definition: httpd.h:1101
const char * method
Definition: httpd.h:911
char * server_admin
Definition: httpd.h:1427
unsigned aborted
Definition: httpd.h:1257
void * sbh
Definition: httpd.h:1241
char * path_info
Definition: httpd.h:1035
request_rec * next
Definition: httpd.h:865
long id
Definition: httpd.h:1229
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:1282
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:657
const char AP_FN_ATTR_WARN_UNUSED_RESULT
Definition: ssl_private.h:1167
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:2506
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:2514
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:1181
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:2510
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:2512
#define ap_strstr_c(s, c)
Definition: httpd.h:2516
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:2508
conn_state_e
Definition: httpd.h:1318
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:1331
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:1184
@ AP_CONN_UNKNOWN
Definition: httpd.h:1182
@ AP_CONN_CLOSE
Definition: httpd.h:1183
@ CONN_STATE_NUM
Definition: httpd.h:1328
@ CONN_STATE_LINGER
Definition: httpd.h:1324
@ CONN_STATE_LINGER_NORMAL
Definition: httpd.h:1325
@ CONN_STATE_READ_REQUEST_LINE
Definition: httpd.h:1320
@ CONN_STATE_LINGER_SHORT
Definition: httpd.h:1326
@ CONN_STATE_CHECK_REQUEST_LINE_READABLE
Definition: httpd.h:1319
@ CONN_STATE_WRITE_COMPLETION
Definition: httpd.h:1322
@ CONN_STATE_SUSPENDED
Definition: httpd.h:1323
@ CONN_STATE_HANDLER
Definition: httpd.h:1321
@ CONN_SENSE_WANT_WRITE
Definition: httpd.h:1334
@ CONN_SENSE_DEFAULT
Definition: httpd.h:1332
@ CONN_SENSE_WANT_READ
Definition: httpd.h:1333
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:2769
Definition: http_core.h:933
The representation of a filter chain.
Definition: util_filter.h:278
Definition: httpd.h:2350
A structure to hold various server loadavg.
Definition: httpd.h:1491
Definition: httpd.h:1372
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:1475
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:1193
Definition: httpd.h:1309
A structure to contain connection state information.
Definition: httpd.h:1340
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:1361
A structure to store information for each virtual server.
Definition: httpd.h:1382
apr_pool_t * p
Apache filter library.