summaryrefslogtreecommitdiffstats
path: root/server/vhost.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* <VirtualHost myhost> now applies to all IP addresses for myhostJeff Trawick2004-06-111-9/+12
| | | | | | | | instead of just the first one reported by the resolver. This corrects a regression since 1.3. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103897 13f79535-47bb-0310-9956-ffa450edef68
* * server/vhost.c (remove_unused_name_vhosts): Remove redundant check;Joe Orton2004-04-151-6/+0
| | | | | | | | | | catch all port-based NameVirtualHosts without defined VirtualHosts, preventing segfaults later in some misconfigurations. PR: 27731 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@103400 13f79535-47bb-0310-9956-ffa450edef68
* * server/vhost.c: Fix comments which got search'n'replaced.Joe Orton2004-03-111-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102936 13f79535-47bb-0310-9956-ffa450edef68
* fix name of The Apache Software FoundationAndré Malo2004-02-091-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102619 13f79535-47bb-0310-9956-ffa450edef68
* fix copyright dates according to the first check inAndré Malo2004-02-081-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102589 13f79535-47bb-0310-9956-ffa450edef68
* apply Apache License, Version 2.0André Malo2004-02-061-53/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102525 13f79535-47bb-0310-9956-ffa450edef68
* update license to 2004.André Malo2004-01-011-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@102135 13f79535-47bb-0310-9956-ffa450edef68
* stop using apr_sockaddr_port_get() accessor function, as it willJeff Trawick2003-12-051-3/+3
| | | | | | | disappear from APR 1.0 API shortly git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@101991 13f79535-47bb-0310-9956-ffa450edef68
* finished that boring job:André Malo2003-02-031-1/+1
| | | | | | | | | update license to 2003. Happy New Year! ;-)) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98573 13f79535-47bb-0310-9956-ffa450edef68
* Rearranged the loop in fix_hostname() to run faster in theBrian Pane2002-09-021-4/+7
| | | | | | | | common case in which lowercase characters are the most frequent characters in the hostname git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96616 13f79535-47bb-0310-9956-ffa450edef68
* Continue the Bill Rowe apr_size_t crusade.Victor J. Orlikowski2002-07-101-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95993 13f79535-47bb-0310-9956-ffa450edef68
* Convert the hostname to all-lowercase in fix_hostname() so thatBrian Pane2002-06-231-0/+3
| | | | | | | | | | | | the implementation matches the comments. (Note: The current virtual hosting code does case-insensitive host matching, so this fix is useful mostly to help ensure that custom modules and any future vhosting code don't get tripped up by case-sensitivity issues.) Submitted by: Perry Harrington <pedward@webcom.com> Reviewed by: Brian Pane git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95866 13f79535-47bb-0310-9956-ffa450edef68
* stop using APLOG_NOERRNO in calls to ap_log_?error()Jeff Trawick2002-05-171-6/+6
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95149 13f79535-47bb-0310-9956-ffa450edef68
* Eliminate some sprintf callsBrian Pane2002-05-011-2/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94885 13f79535-47bb-0310-9956-ffa450edef68
* Allow empty Host: header arguments.Justin Erenkrantz2002-04-151-0/+5
| | | | | | | | | | | | | | | | | | Previously, request that sent: GET / HTTP/1.1 Host: would get a 400. RFC 2616 specifically allows for a "blank" host field. The read_request code properly handled this, but the fix_hostname in vhost.c would cause the 400. Now, simply return in fix_hostname when we see a blank hostname rather than erroring out. PR: 7441 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@94655 13f79535-47bb-0310-9956-ffa450edef68
* Fix for vhosts where the hostname is followed by '.'Brian Pane2002-03-181-2/+2
| | | | | | | | PR: 9187 Submitted by: Ryan Cruse <ryan@estara.com> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93988 13f79535-47bb-0310-9956-ffa450edef68
* clean up the use of apr_sockaddr_t (stay out of family-specificJeff Trawick2002-03-151-9/+6
| | | | | | | struct sockaddr* as much as possible) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93960 13f79535-47bb-0310-9956-ffa450edef68
* Fix win32 compile breakage.Bill Stoddard2002-03-131-3/+3
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93922 13f79535-47bb-0310-9956-ffa450edef68
* Update our copyright for this year.Roy T. Fielding2002-03-131-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93918 13f79535-47bb-0310-9956-ffa450edef68
* fix a v4-specific INADDR_ANY check that kept name-based virtual hostsJeff Trawick2002-02-191-1/+3
| | | | | | | from working with IPv6 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93494 13f79535-47bb-0310-9956-ffa450edef68
* use a new APR function to perform socket address comparison soJeff Trawick2001-12-261-15/+1
| | | | | | | that we don't have to handle v4-mapped IPv6 addresses here git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92611 13f79535-47bb-0310-9956-ffa450edef68
* Fix matching of vhosts by ip address so we find IPv4Jeff Trawick2001-12-261-0/+10
| | | | | | | | | | vhost address when target address is v4-mapped form of that address. This problem was reported by Don Hughes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92607 13f79535-47bb-0310-9956-ffa450edef68
* add a comment about the need to check for a host after returningJeff Trawick2001-12-251-0/+3
| | | | | | | from apr_parse_addr_port() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92600 13f79535-47bb-0310-9956-ffa450edef68
* Fixed a segfault that occurred during startup if a VirtualHostBrian Pane2001-12-251-0/+3
| | | | | | | | directive had a port but no address Reported by: Don Hughes <support@sannotes.org> git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92599 13f79535-47bb-0310-9956-ffa450edef68
* Get IPv6 vhosts working (again ?).Jeff Trawick2001-11-201-2/+4
| | | | | | | | | | | | | | There were a couple of bogus IPv4-specific comparisons which prevented the data structures from being built correctly in ap_fini_vhost_config(). One of these (INADDR_ANY) can be easily rewritten to work with IPv6. The other (DEFAULT_VHOST_ADDR) isn't necessary for IPv6. Note that this is because we don't support the various flavors of _default_ that Apache-1.3+KAME-patch supports. PR: 8118 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@92054 13f79535-47bb-0310-9956-ffa450edef68
* Begin to abstract out the underlying transport layer.Ryan Bloom2001-11-131-7/+6
| | | | | | | | | | | The first step is to remove the socket from the conn_rec, the server now lives in a context that is passed to the core's input and output filters. This forces us to be very careful when adding calls that use the socket directly, because the socket isn't available in most locations. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91887 13f79535-47bb-0310-9956-ffa450edef68
* Fixed previous patch to reflect what Apache-1.3 did regarding self-Martin Kraemer2001-11-081-0/+9
| | | | | | | | | | | | referential uri's, and updated the manual accordingly. XXX There is a kludge here: XXX the port number from the client's Host: header used to be tossed, and there is no clean mechanism to pass it (in the request_rec) to other consumers. As the unparsed_uri structure (which could avoid repeated parsing of URI, Host, Port etc) seems to be mostly unused currently, I used that to pass the port. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91798 13f79535-47bb-0310-9956-ffa450edef68
* Please do not mix spaces and tabs within the same blocks, and please do notAaron Bannert2001-11-071-279/+289
| | | | | | | | arbitrarily and inconsistently wrap lines. I apologise ahead of time for mucking up the cvslog, but this needed to be done. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91792 13f79535-47bb-0310-9956-ffa450edef68
* insure that a '*' in <VirtualHost *> or NameVirtualHost * matches all ports.Greg Ames2001-10-151-7/+10
| | | | | | | The recent change to eliminate the Port directive exposed this problem. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@91470 13f79535-47bb-0310-9956-ffa450edef68
* Fix a segfault when a numeric host (e.g., "Host: 123") was specified.Jeff Trawick2001-08-271-0/+8
| | | | | | | | | | | apr_parse_addr_port() assumes that if there is just a number it must be a port, but here we need to assume that it is a host. todo: pass a flag into apr_parse_addr_port()? unclear whether or not that is cleaner overall git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90734 13f79535-47bb-0310-9956-ffa450edef68
* *) fix inline handling. we had: apr_inline, APR_INLINE, USE_GNU_INLINE, andGreg Stein2001-02-241-3/+3
| | | | | | | | | | | | | INLINE. Now, we just have APR_INLINE and APR_HAS_INLINE. - convert all usage - note that apr_general messed up the defn (compared to apr.h) - simplify the inline decision logic in os/*/os.h - simplify the code in os/*/os-inline.c *) toss ap_checkconv() [no longer used] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88298 13f79535-47bb-0310-9956-ffa450edef68
* Update copyright to 2001Roy T. Fielding2001-02-161-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88184 13f79535-47bb-0310-9956-ffa450edef68
* include <arpa/inet.h> for the declarations for htons() et al; OS/390 hasJeff Trawick2001-02-121-0/+4
| | | | | | | | macros in arpa/inet.h which turn such "calls" into nothing and does not have functions to link against in libc git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88120 13f79535-47bb-0310-9956-ffa450edef68
* Clean up some of the includes:Greg Stein2001-02-101-17/+7
| | | | | | | | | | - explicitly include apr_lib.h since ap_config.h doesn't - use apr_want.h where possible - use APR_HAVE_ where possible - remove some unneeded includes git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88060 13f79535-47bb-0310-9956-ffa450edef68
* renaming various functions for consistency sakeDoug MacEachern2001-02-081-18/+18
| | | | | | | | | | | see: http://apr.apache.org/~dougm/apr_rename.pl PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@88019 13f79535-47bb-0310-9956-ffa450edef68
* Relax the checking of Host: headers so that only character sequences thatTony Finch2001-01-241-15/+9
| | | | | | | | | | | are sensitive to the filesystem are rejected, i.e. forward slashes, backward slashes, and sequences of more than one dot. This supports iDNS without compromising the safety of mass vhosting. PR: 6635 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87803 13f79535-47bb-0310-9956-ffa450edef68
* Some missing exportsWilliam A. Rowe Jr2001-01-191-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87725 13f79535-47bb-0310-9956-ffa450edef68
* Get "NameVirtualHost *" option working in Apache 2.0Ryan Bloom2000-12-181-1/+4
| | | | git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87393 13f79535-47bb-0310-9956-ffa450edef68
* Clean up some formatting. Using a tab of 22 characters makes the outputRyan Bloom2000-12-181-3/+3
| | | | | | | | | | | very annoying to read. 8 looks much more reasonable to me. PR: Obtained from: Submitted by: Reviewed by: git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87392 13f79535-47bb-0310-9956-ffa450edef68
* Get -t -D DUMP_VHOSTS working and properly documented. This removes theRyan Bloom2000-12-171-1/+1
| | | | | | | -S option from the docs. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87391 13f79535-47bb-0310-9956-ffa450edef68
* get_addresses()Jeff Trawick2000-12-161-28/+42
| | | | | | | | | | | | | | | | | | . use apr_parse_addr_port() so we handle IPv6 addresses on NameVirtualHost and <VirtualHost > directives . don't hardcode AF_INET when a hostname or IP address was coded dump_a_vhost() . check the address family before looking for certain IPv4 addresses ap_fini_vhost_config() . pass apr_status_t to ap_log_error() after apr_getnameinfo() fails git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87377 13f79535-47bb-0310-9956-ffa450edef68
* Use apr_parse_addr_port() in fix_hostname(). This simplifies theJeff Trawick2000-12-161-35/+31
| | | | | | | | | code by a small (okay, tiny) amount and lets IPv6 numeric address strings be passed through. Obtained from: the idea is from the KAME IPv6 patch for Apache 1.3 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87370 13f79535-47bb-0310-9956-ffa450edef68
* Fix a problem with the last commit... I missed one of the hashing changesJeff Trawick2000-12-161-1/+1
| | | | | | | so some of the code had an unnecessary IPv4 assumption. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87367 13f79535-47bb-0310-9956-ffa450edef68
* Get rid of some IPv4 dependencies by passing the hash function theJeff Trawick2000-12-161-16/+28
| | | | | | | apr_sockaddr_t * instead of the IPv4 address. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87366 13f79535-47bb-0310-9956-ffa450edef68
* Fix the call to apr_snprintf() for formatting the sockaddr inJeff Trawick2000-12-161-2/+1
| | | | | | | a vhost entry when dumping the vhost config. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87365 13f79535-47bb-0310-9956-ffa450edef68
* move closer to IPv6 support by changing the server_addr_recJeff Trawick2000-12-151-21/+29
| | | | | | | | | | | | | | | | | representation of the bound address to something which handles IPv6; this also allows us to switch to APR resolver routines in places instead of calling gethostbyname() and gethostbyaddr() directly Issues remaining with this set of changes: 1) apr_snprintf()'s %pA formatting needs to change to take apr_sockaddr_t * instead of sockaddr_in * -OR- just get rid of that type of formatting 2) apr_get_inaddr() is no longer used and should be removed git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87363 13f79535-47bb-0310-9956-ffa450edef68
* The local_addr and remote_addr fields in the conn_rec are nowJeff Trawick2000-12-141-4/+3
| | | | | | | | apr_sockaddr_t * instead of sockaddr_in. This is a small step towards IPv6 support. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87342 13f79535-47bb-0310-9956-ffa450edef68
* updates to changed interfaces to apr_set_port(), apr_get_port(),Jeff Trawick2000-11-211-3/+11
| | | | | | | apr_set_ipaddr(), and apr_get_ipaddr() git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87050 13f79535-47bb-0310-9956-ffa450edef68
* Change references of AF_ to reflect APR_ so they should workDavid Reid2000-11-181-1/+1
| | | | | | | on all systems. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87012 13f79535-47bb-0310-9956-ffa450edef68
* More local/remote changes and tidy up http_vhost a bit.David Reid2000-11-101-45/+7
| | | | | | | Also add a new function to get an ap_ina_addr_t from a socket. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86910 13f79535-47bb-0310-9956-ffa450edef68