upload http
[bottlenecks.git] / rubbos / app / httpd-2.0.64 / 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 #ifndef MOD_CORE_H
18 #define MOD_CORE_H
19
20 #include "apr.h"
21 #include "apr_buckets.h"
22
23 #include "httpd.h"
24 #include "util_filter.h"
25
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 /**
32  * @package mod_core private header file
33  */
34
35 /* Handles for core filters */
36 extern AP_DECLARE_DATA ap_filter_rec_t *ap_http_input_filter_handle;
37 extern AP_DECLARE_DATA ap_filter_rec_t *ap_http_header_filter_handle;
38 extern AP_DECLARE_DATA ap_filter_rec_t *ap_chunk_filter_handle;
39 extern AP_DECLARE_DATA ap_filter_rec_t *ap_byterange_filter_handle;
40
41 /*
42  * These (input) filters are internal to the mod_core operation.
43  */
44 apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b,
45                             ap_input_mode_t mode, apr_read_type_e block,
46                             apr_off_t readbytes);
47
48 char *ap_response_code_string(request_rec *r, int error_index);
49
50 /**
51  * Send the minimal part of an HTTP response header.
52  * @param r The current request
53  * @param bb The brigade to add the header to.
54  * @warning Modules should be very careful about using this, and should
55  *          the default behavior.  Much of the HTTP/1.1 implementation
56  *          correctness depends on the full headers.
57  * @deffunc void ap_basic_http_header(request_rec *r, apr_bucket_brigade *bb)
58  */
59 AP_DECLARE(void) ap_basic_http_header(request_rec *r, apr_bucket_brigade *bb);
60  
61 /**
62  * Send an appropriate response to an http TRACE request.
63  * @param r The current request
64  * @tip returns DONE or the HTTP status error if it handles the TRACE,
65  * or DECLINED if the request was not for TRACE.
66  * request method was not TRACE.
67  */
68 AP_DECLARE_NONSTD(int) ap_send_http_trace(request_rec *r);
69
70 /**
71  * Send an appropriate response to an http OPTIONS request.
72  * @param r The current request
73  */
74 AP_DECLARE(int) ap_send_http_options(request_rec *r);
75
76 #ifdef __cplusplus
77 }
78 #endif
79
80 #endif  /* !MOD_CORE_H */