]> granicus.if.org Git - apache/blob - modules/http/mod_core.h
Ignore ctags/etags output, some small Doxygen fixes
[apache] / modules / http / mod_core.h
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
17
18 /**
19  * @file  mod_core.h
20  * @brief mod_core private header file
21  *
22  * @defgroup MOD_CORE mod_core
23  * @ingroup  APACHE_MODS
24  * @{
25  */
26
27 #ifndef MOD_CORE_H
28 #define MOD_CORE_H
29
30 #include "apr.h"
31 #include "apr_buckets.h"
32
33 #include "httpd.h"
34 #include "util_filter.h"
35
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /**
42  * Core per-directory configuration.
43  */
44 typedef struct {
45     apr_off_t keep_body;
46     int keep_body_set;
47 } core_dir_conf;
48
49 /* Handles for core filters */
50 extern AP_DECLARE_DATA ap_filter_rec_t *ap_http_input_filter_handle;
51 extern AP_DECLARE_DATA ap_filter_rec_t *ap_kept_body_input_filter_handle;
52 extern AP_DECLARE_DATA ap_filter_rec_t *ap_http_header_filter_handle;
53 extern AP_DECLARE_DATA ap_filter_rec_t *ap_chunk_filter_handle;
54 extern AP_DECLARE_DATA ap_filter_rec_t *ap_http_outerror_filter_handle;
55 extern AP_DECLARE_DATA ap_filter_rec_t *ap_byterange_filter_handle;
56
57 /*
58  * These (input) filters are internal to the mod_core operation.
59  */
60 apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
61                             ap_input_mode_t mode, apr_read_type_e block,
62                             apr_off_t readbytes);
63
64 /* Filter to handle a kept body on subrequests */
65 apr_status_t ap_kept_body_filter(ap_filter_t *f, apr_bucket_brigade *b,
66                                  ap_input_mode_t mode, apr_read_type_e block,
67                                  apr_off_t readbytes);
68
69 /* Initialisation of filter to handle a kept body on subrequests */
70 int ap_kept_body_filter_init(ap_filter_t *f);
71
72 /* HTTP/1.1 chunked transfer encoding filter. */
73 apr_status_t ap_http_chunk_filter(ap_filter_t *f, apr_bucket_brigade *b);
74
75 /* Filter to handle any error buckets on output */
76 apr_status_t ap_http_outerror_filter(ap_filter_t *f,
77                                      apr_bucket_brigade *b);
78
79 char *ap_response_code_string(request_rec *r, int error_index);
80
81 /**
82  * Send the minimal part of an HTTP response header.
83  * @param r The current request
84  * @param bb The brigade to add the header to.
85  * @warning Modules should be very careful about using this, and should
86  *          the default behavior.  Much of the HTTP/1.1 implementation
87  *          correctness depends on the full headers.
88  * @fn void ap_basic_http_header(request_rec *r, apr_bucket_brigade *bb)
89  */
90 AP_DECLARE(void) ap_basic_http_header(request_rec *r, apr_bucket_brigade *bb);
91  
92 /**
93  * Send an appropriate response to an http TRACE request.
94  * @param r The current request
95  * @tip returns DONE or the HTTP status error if it handles the TRACE,
96  * or DECLINED if the request was not for TRACE.
97  * request method was not TRACE.
98  */
99 AP_DECLARE_NONSTD(int) ap_send_http_trace(request_rec *r);
100
101 /**
102  * Send an appropriate response to an http OPTIONS request.
103  * @param r The current request
104  */
105 AP_DECLARE(int) ap_send_http_options(request_rec *r);
106
107 #ifdef __cplusplus
108 }
109 #endif
110
111 #endif  /* !MOD_CORE_H */
112 /** @} */