OSDN Git Service

* Merge branch 'branch_0.11.0'
[modchxj/mod_chxj.git] / src / chxj_apache.c
1 /*
2  * Copyright (C) 2005-2008 Atsushi Konno All rights reserved.
3  * Copyright (C) 2005 QSDN,Inc. All rights reserved.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 #include "chxj_apache.h"
18
19 const char *
20 chxj_apache_run_http_scheme(request_rec *r)
21 {
22 #if defined(CHXJ_TEST)
23   return test_run_http_scheme(r);
24 #else
25 #  if AP_SERVER_MAJORVERSION_NUMBER == 2 && AP_SERVER_MINORVERSION_NUMBER == 2
26   return ap_run_http_scheme(r);
27 #  else
28   return ap_run_http_method(r);
29 #  endif
30 #endif
31 }
32
33 char *chxj_os_escape_path(apr_pool_t *p, const char *path, int partial) 
34 {
35 #if defined(CHXJ_TEST)
36   return test_os_escape_path(p, path, partial);
37 #else
38   return ap_os_escape_path(p, path, partial);
39 #endif
40 }
41
42
43 void
44 chxj_set_content_type(request_rec *r, const char *ct)
45 {
46 #if defined(CHXJ_TEST)
47   test_set_content_type(r, ct);
48 #else
49   ap_set_content_type(r, ct);
50 #endif
51 }
52
53
54 void *
55 chxj_get_module_config(const ap_conf_vector_t *cv, const module *m)
56 {
57 #if defined(CHXJ_TEST)
58   return test_get_module_config(cv,m);
59 #else
60   return ap_get_module_config(cv,m);
61 #endif
62 }
63
64
65 char *
66 chxj_ap_escape_html(apr_pool_t *p, const char *s) 
67 {
68 #if defined(CHXJ_TEST)
69   return test_ap_escape_html(p, s);
70 #else
71   return ap_escape_html(p, s);
72 #endif
73 }
74 /*
75  * vim:ts=2 et
76  */