PageRenderTime 28ms CodeModel.GetById 17ms app.highlight 10ms RepoModel.GetById 0ms app.codeStats 0ms

/packages/httpd20/src/http_vhost.inc

https://github.com/slibre/freepascal
Pascal | 83 lines | 16 code | 9 blank | 58 comment | 0 complexity | 96e4f0b626501b304a526928eb384979 MD5 | raw file
Possible License(s): LGPL-2.0, LGPL-2.1, LGPL-3.0
 1{ Copyright 1999-2005 The Apache Software Foundation or its licensors, as
 2 * applicable.
 3 *
 4 * Licensed under the Apache License, Version 2.0 (the "License");
 5 * you may not use this file except in compliance with the License.
 6 * 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 * @package Virtual Host package
19 }
20
21{
22 * called before any config is read
23 * @param p Pool to allocate out of
24 }
25procedure ap_init_vhost_config(p: Papr_pool_t);
26 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
27 external LibHTTPD name LibNamePrefix + 'ap_init_vhost_config' + LibSuff4;
28
29{
30 * called after the config has been read to compile the tables needed to do 
31 * the run-time vhost lookups
32 * @param p The pool to allocate out of
33 * @param main_server The start of the virtual host list
34 * @deffunc ap_fini_vhost_config(apr_pool_t *p, server_rec *main_server)
35 }
36procedure ap_fini_vhost_config(p: Papr_pool_t; main_server: Pserver_rec);
37 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
38 external LibHTTPD name LibNamePrefix + 'ap_fini_vhost_config' + LibSuff8;
39
40{
41 * handle addresses in <VirtualHost> statement
42 * @param p The pool to allocate out of
43 * @param hostname The hostname in the VirtualHost statement
44 * @param s The list of Virtual Hosts.
45 }
46//const char *ap_parse_vhost_addrs(apr_pool_t *p, const char *hostname, server_rec *s);
47
48{ handle NameVirtualHost directive }
49//const char *ap_set_name_virtual_host (cmd_parms *cmd, void *dummy,
50//				      const char *arg);
51
52{
53 * given an ip address only, give our best guess as to what vhost it is 
54 * @param conn The current connection
55 }
56procedure ap_update_vhost_given_ip(conn: Pconn_rec);
57 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
58 external LibHTTPD name LibNamePrefix + 'ap_update_vhost_given_ip' + LibSuff4;
59
60{
61 * ap_update_vhost_given_ip is never enough, and this is always called after 
62 * the headers have been read.  It may change r->server.
63 * @param r The current request
64 }
65procedure ap_update_vhost_from_headers(r: Prequest_rec);
66 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
67 external LibHTTPD name LibNamePrefix + 'ap_update_vhost_from_headers' + LibSuff4;
68
69{
70 * Match the host in the header with the hostname of the server for this
71 * request.
72 * @param r The current request
73 * @param host The hostname in the headers
74 * @param port The port from the headers
75 * @return return 1 if the host:port matches any of the aliases of r->server,
76 * return 0 otherwise
77 * @deffunc int ap_matches_request_vhost(request_rec *r, const char *host, apr_port_t port)
78 }
79function ap_matches_request_vhost(r: Prequest_rec; const host: PChar;
80 port: apr_port_t): Integer;
81 {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
82 external LibHTTPD name LibNamePrefix + 'ap_matches_request_vhost' + LibSuff12;
83