http_vhost.inc 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. { called before any config is read }
  17. procedure ap_init_vhost_config(p: PPool);
  18. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
  19. { called after the config has been read }
  20. procedure ap_fini_vhost_config(p: PPool; main_server: Pserver_rec);
  21. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
  22. { handle addresses in <VirtualHost> statement }
  23. function ap_parse_vhost_addrs(p: PPool; const hostname: PAnsiChar; s: Pserver_rec): PAnsiChar;
  24. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
  25. { handle NameVirtualHost directive }
  26. //function ap_set_name_virtual_host(cmd: Pcmd_parms; dummy: Pointer; arg: PAnsiChar): PAnsiChar;
  27. // cdecl; external LibHTTPD;
  28. { given an ip address only, give our best guess as to what vhost it is }
  29. procedure ap_update_vhost_given_ip(conn: Pconn_rec);
  30. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
  31. { The above is never enough, and this is always called after the headers
  32. * have been read. It may change r->server.
  33. }
  34. procedure ap_update_vhost_from_headers(r: Prequest_rec);
  35. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;
  36. { return 1 if the host:port matches any of the aliases of r->server
  37. * return 0 otherwise
  38. }
  39. function ap_matches_request_vhost(r: Prequest_rec; const host: PAnsiChar;
  40. port: cuint): cint;
  41. {$IFDEF WINDOWS} stdcall; {$ELSE} cdecl; {$ENDIF} external LibHTTPD;