http_vhost.inc 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. * @package Virtual Host package
  18. }
  19. {
  20. * called before any config is read
  21. * @param p Pool to allocate out of
  22. }
  23. procedure ap_init_vhost_config(p: Papr_pool_t);
  24. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  25. external LibHTTPD name LibNamePrefix + 'ap_init_vhost_config' + LibSuff4;
  26. {
  27. * called after the config has been read to compile the tables needed to do
  28. * the run-time vhost lookups
  29. * @param p The pool to allocate out of
  30. * @param main_server The start of the virtual host list
  31. * @deffunc ap_fini_vhost_config(apr_pool_t *p, server_rec *main_server)
  32. }
  33. procedure ap_fini_vhost_config(p: Papr_pool_t; main_server: Pserver_rec);
  34. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  35. external LibHTTPD name LibNamePrefix + 'ap_fini_vhost_config' + LibSuff8;
  36. {
  37. * handle addresses in <VirtualHost> statement
  38. * @param p The pool to allocate out of
  39. * @param hostname The hostname in the VirtualHost statement
  40. * @param s The list of Virtual Hosts.
  41. }
  42. //const char *ap_parse_vhost_addrs(apr_pool_t *p, const char *hostname, server_rec *s);
  43. { handle NameVirtualHost directive }
  44. //const char *ap_set_name_virtual_host (cmd_parms *cmd, void *dummy,
  45. // const char *arg);
  46. {
  47. * given an ip address only, give our best guess as to what vhost it is
  48. * @param conn The current connection
  49. }
  50. procedure ap_update_vhost_given_ip(conn: Pconn_rec);
  51. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  52. external LibHTTPD name LibNamePrefix + 'ap_update_vhost_given_ip' + LibSuff4;
  53. {
  54. * ap_update_vhost_given_ip is never enough, and this is always called after
  55. * the headers have been read. It may change r->server.
  56. * @param r The current request
  57. }
  58. procedure ap_update_vhost_from_headers(r: Prequest_rec);
  59. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  60. external LibHTTPD name LibNamePrefix + 'ap_update_vhost_from_headers' + LibSuff4;
  61. {
  62. * Match the host in the header with the hostname of the server for this
  63. * request.
  64. * @param r The current request
  65. * @param host The hostname in the headers
  66. * @param port The port from the headers
  67. * @return return 1 if the host:port matches any of the aliases of r->server,
  68. * return 0 otherwise
  69. * @deffunc int ap_matches_request_vhost(request_rec *r, const char *host, apr_port_t port)
  70. }
  71. function ap_matches_request_vhost(r: Prequest_rec; const host: PChar;
  72. port: apr_port_t): Integer;
  73. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF}
  74. external LibHTTPD name LibNamePrefix + 'ap_matches_request_vhost' + LibSuff12;