/[Apache-SVN]/httpd/httpd/branches/2.2.x/server/vhost.c
ViewVC logotype

Log of /httpd/httpd/branches/2.2.x/server/vhost.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (annotate)
Sticky Revision:

Revision 727616 - (view) (annotate) - [select for diffs]
Modified Thu Dec 18 01:46:00 2008 UTC (11 months, 1 week ago) by rpluem
File length: 33948 byte(s)
Diff to previous 421103 (colored)
Merge r727452 from trunk:

Output -M and -S dumps (modules and vhosts) to stdout instead of stderr.

Submitted by: Dan Poirier <poirier pobox.com>
Reviewed by: rederpj, covener, rpluem

Revision 421103 - (view) (annotate) - [select for diffs]
Modified Wed Jul 12 03:38:44 2006 UTC (3 years, 4 months ago) by fielding
File length: 33948 byte(s)
Diff to previous 396056 (colored)
update license header text

Revision 396056 - (view) (annotate) - [select for diffs]
Modified Sat Apr 22 01:53:06 2006 UTC (3 years, 7 months ago) by pquerna
File length: 33801 byte(s)
Diff to previous 395231 (colored)
Revert r395231 from the 2.2.x branch.  This gets us back to the old place with regard to the copyright statements.

Revision 395231 - (view) (annotate) - [select for diffs]
Modified Wed Apr 19 12:33:16 2006 UTC (3 years, 7 months ago) by colm
File length: 33801 byte(s)
Diff to previous 332309 (colored)
Update the last year of copyright for the 2.2.x branch

Revision 332309 - (view) (annotate) - [select for diffs]
Modified Thu Nov 10 15:20:05 2005 UTC (4 years ago) by jim
File length: 33801 byte(s)
Diff to previous 332307 (colored)
No functional change: remove trailing whitespace. This also means
that "blank" lines, which had consisted of just spaces
and/or tabs are now truly blank lines

Revision 332307 - (view) (annotate) - [select for diffs]
Modified Thu Nov 10 15:15:41 2005 UTC (4 years ago) by jim
File length: 33821 byte(s)
Diff to previous 292540 (colored)
No functional change: detab all indenting to be consistent
with our formatting standards.

Revision 292540 - (view) (annotate) - [select for diffs]
Modified Thu Sep 29 20:44:53 2005 UTC (4 years, 1 month ago) by colm
File length: 33793 byte(s)
Diff to previous 234103 (colored)
Backport the Doxygen changes to the 2.2.x branch. No functional changes,
however backporting these doxygen fixes makes it significantly easier to diff
trunk and the 2.2.x branch, to sort out what's what. And we might as well
release with nicer doxygen markup.

Submitted by: Neale Ranns <neale ranns.org>
Reviewed by:  Ian Holsman

Revision 234103 - (view) (annotate) - [select for diffs]
Modified Sat Aug 20 18:21:45 2005 UTC (4 years, 3 months ago) by pquerna
File length: 33778 byte(s)
Diff to previous 230469 (colored)
Recreate 2.2.x branch from trunk.

Revision 230469 - (view) (annotate) - [select for diffs]
Modified Fri Aug 5 13:49:07 2005 UTC (4 years, 3 months ago) by jorton
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 33778 byte(s)
Diff to previous 230453 (colored)
* server/vhost.c (get_addresses): Fix double negative and make errors
consistent; thanks Joshua.

Revision 230453 - (view) (annotate) - [select for diffs]
Modified Fri Aug 5 12:27:57 2005 UTC (4 years, 3 months ago) by jorton
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 33774 byte(s)
Diff to previous 164538 (colored)
* server/vhost.c (get_addresses): Fail with an error message rather
than an assert() for errors which plague users on Solaris boxes which
don't have a properly configured resolver.

PR: 27525

Revision 164538 - (view) (annotate) - [select for diffs]
Modified Mon Apr 25 05:23:18 2005 UTC (4 years, 7 months ago) by pquerna
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 33640 byte(s)
Diff to previous 151408 (colored)
Add ap_vhost_iterate_given_conn() as I had previously mentioned on the mailing list.

Revision 151408 - (view) (annotate) - [select for diffs]
Modified Fri Feb 4 20:28:49 2005 UTC (4 years, 9 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 32410 byte(s)
Diff to previous 106103 (colored)
Update copyright year to 2005 and standardize on current copyright owner line.

Revision 106103 - (view) (annotate) - [select for diffs]
Modified Sun Nov 21 18:50:36 2004 UTC (5 years ago) by nd
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 32374 byte(s)
Diff to previous 103897 (colored)
general property cleanup

Revision 103897 - (view) (annotate) - [select for diffs]
Modified Fri Jun 11 13:44:14 2004 UTC (5 years, 5 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 32374 byte(s)
Diff to previous 103400 (colored)
<VirtualHost myhost> now applies to all IP addresses for myhost
instead of just the first one reported by the resolver.  This
corrects a regression since 1.3.

Revision 103400 - (view) (annotate) - [select for diffs]
Modified Thu Apr 15 20:36:45 2004 UTC (5 years, 7 months ago) by jorton
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 32354 byte(s)
Diff to previous 102936 (colored)
* server/vhost.c (remove_unused_name_vhosts): Remove redundant check;
catch all port-based NameVirtualHosts without defined VirtualHosts,
preventing segfaults later in some misconfigurations.

PR: 27731

Revision 102936 - (view) (annotate) - [select for diffs]
Modified Thu Mar 11 19:46:35 2004 UTC (5 years, 8 months ago) by jorton
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 32547 byte(s)
Diff to previous 102619 (colored)
* server/vhost.c: Fix comments which got search'n'replaced.

Revision 102619 - (view) (annotate) - [select for diffs]
Modified Mon Feb 9 20:40:53 2004 UTC (5 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 32583 byte(s)
Diff to previous 102589 (colored)
fix name of The Apache Software Foundation

Revision 102589 - (view) (annotate) - [select for diffs]
Modified Sun Feb 8 13:58:22 2004 UTC (5 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 32579 byte(s)
Diff to previous 102525 (colored)
fix copyright dates according to the first check in

Revision 102525 - (view) (annotate) - [select for diffs]
Modified Fri Feb 6 22:58:42 2004 UTC (5 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 32579 byte(s)
Diff to previous 102135 (colored)
apply Apache License, Version 2.0

Revision 102135 - (view) (annotate) - [select for diffs]
Modified Thu Jan 1 13:26:26 2004 UTC (5 years, 10 months ago) by nd
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34798 byte(s)
Diff to previous 101991 (colored)
update license to 2004.

Revision 101991 - (view) (annotate) - [select for diffs]
Modified Fri Dec 5 00:59:29 2003 UTC (5 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34798 byte(s)
Diff to previous 98573 (colored)
stop using apr_sockaddr_port_get() accessor function, as it will
disappear from APR 1.0 API shortly

Revision 98573 - (view) (annotate) - [select for diffs]
Modified Mon Feb 3 17:53:28 2003 UTC (6 years, 9 months ago) by nd
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34849 byte(s)
Diff to previous 96616 (colored)
finished that boring job:
update license to 2003.

Happy New Year! ;-))

Revision 96616 - (view) (annotate) - [select for diffs]
Modified Mon Sep 2 01:37:54 2002 UTC (7 years, 2 months ago) by brianp
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34849 byte(s)
Diff to previous 95993 (colored)
Rearranged the loop in fix_hostname() to run faster in the
common case in which lowercase characters are the most frequent
characters in the hostname

Revision 95993 - (view) (annotate) - [select for diffs]
Modified Wed Jul 10 06:01:14 2002 UTC (7 years, 4 months ago) by orlikowski
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34750 byte(s)
Diff to previous 95866 (colored)
Continue the Bill Rowe apr_size_t crusade.

Revision 95866 - (view) (annotate) - [select for diffs]
Modified Sun Jun 23 08:10:49 2002 UTC (7 years, 5 months ago) by brianp
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34746 byte(s)
Diff to previous 95149 (colored)
Convert the hostname to all-lowercase in fix_hostname() so that
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

Revision 95149 - (view) (annotate) - [select for diffs]
Modified Fri May 17 11:11:39 2002 UTC (7 years, 6 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34648 byte(s)
Diff to previous 94885 (colored)
stop using APLOG_NOERRNO in calls to ap_log_?error()

Revision 94885 - (view) (annotate) - [select for diffs]
Modified Wed May 1 06:41:36 2002 UTC (7 years, 6 months ago) by brianp
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34732 byte(s)
Diff to previous 94655 (colored)
Eliminate some sprintf calls

Revision 94655 - (view) (annotate) - [select for diffs]
Modified Mon Apr 15 02:58:11 2002 UTC (7 years, 7 months ago) by jerenkrantz
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34752 byte(s)
Diff to previous 93988 (colored)
Allow empty Host: header arguments.

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

Revision 93988 - (view) (annotate) - [select for diffs]
Modified Mon Mar 18 01:43:17 2002 UTC (7 years, 8 months ago) by brianp
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34639 byte(s)
Diff to previous 93960 (colored)
Fix for vhosts where the hostname is followed by '.'
PR: 9187
Submitted by:	Ryan Cruse <ryan@estara.com>

Revision 93960 - (view) (annotate) - [select for diffs]
Modified Fri Mar 15 17:47:48 2002 UTC (7 years, 8 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34636 byte(s)
Diff to previous 93922 (colored)
clean up the use of apr_sockaddr_t (stay out of family-specific
struct sockaddr* as much as possible)

Revision 93922 - (view) (annotate) - [select for diffs]
Modified Wed Mar 13 22:34:46 2002 UTC (7 years, 8 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34758 byte(s)
Diff to previous 93918 (colored)
Fix win32 compile breakage.

Revision 93918 - (view) (annotate) - [select for diffs]
Modified Wed Mar 13 20:48:07 2002 UTC (7 years, 8 months ago) by fielding
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34722 byte(s)
Diff to previous 93494 (colored)
Update our copyright for this year.

Revision 93494 - (view) (annotate) - [select for diffs]
Modified Tue Feb 19 16:17:24 2002 UTC (7 years, 9 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34722 byte(s)
Diff to previous 92611 (colored)
fix a v4-specific INADDR_ANY check that kept name-based virtual hosts
from working with IPv6

Revision 92611 - (view) (annotate) - [select for diffs]
Modified Wed Dec 26 21:25:54 2001 UTC (7 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34581 byte(s)
Diff to previous 92607 (colored)
use a new APR function to perform socket address comparison so
that we don't have to handle v4-mapped IPv6 addresses here

Revision 92607 - (view) (annotate) - [select for diffs]
Modified Wed Dec 26 15:51:08 2001 UTC (7 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 35137 byte(s)
Diff to previous 92600 (colored)
Fix matching of vhosts by ip address so we find IPv4
vhost address when target address is v4-mapped form of
that address.

This problem was reported by Don Hughes.

Revision 92600 - (view) (annotate) - [select for diffs]
Modified Tue Dec 25 21:46:10 2001 UTC (7 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34712 byte(s)
Diff to previous 92599 (colored)
add a comment about the need to check for a host after returning
from apr_parse_addr_port()

Revision 92599 - (view) (annotate) - [select for diffs]
Modified Tue Dec 25 21:41:59 2001 UTC (7 years, 11 months ago) by brianp
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34571 byte(s)
Diff to previous 92054 (colored)
Fixed a segfault that occurred during startup if a VirtualHost
directive had a port but no address
Reported by: Don Hughes <support@sannotes.org>

Revision 92054 - (view) (annotate) - [select for diffs]
Modified Tue Nov 20 18:27:07 2001 UTC (8 years ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34498 byte(s)
Diff to previous 91887 (colored)
Get IPv6 vhosts working (again ?).

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

Revision 91887 - (view) (annotate) - [select for diffs]
Modified Mon Nov 12 23:49:08 2001 UTC (8 years ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34340 byte(s)
Diff to previous 91798 (colored)
Begin to abstract out the underlying transport layer.
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.

Revision 91798 - (view) (annotate) - [select for diffs]
Modified Thu Nov 8 14:29:37 2001 UTC (8 years ago) by martin
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34514 byte(s)
Diff to previous 91792 (colored)
Fixed previous patch to reflect what Apache-1.3 did regarding self-
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.

Revision 91792 - (view) (annotate) - [select for diffs]
Modified Wed Nov 7 19:59:51 2001 UTC (8 years ago) by aaron
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 34134 byte(s)
Diff to previous 91470 (colored)
Please do not mix spaces and tabs within the same blocks, and please do not
arbitrarily and inconsistently wrap lines. I apologise ahead of time for
mucking up the cvslog, but this needed to be done.

Revision 91470 - (view) (annotate) - [select for diffs]
Modified Mon Oct 15 15:32:14 2001 UTC (8 years, 1 month ago) by gregames
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 31064 byte(s)
Diff to previous 90734 (colored)
insure that a '*' in <VirtualHost *> or NameVirtualHost * matches all ports.

The recent change to eliminate the Port directive exposed this problem.

Revision 90734 - (view) (annotate) - [select for diffs]
Modified Mon Aug 27 19:51:34 2001 UTC (8 years, 3 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30945 byte(s)
Diff to previous 88298 (colored)
Fix a segfault when a numeric host (e.g., "Host: 123") was specified.

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

Revision 88298 - (view) (annotate) - [select for diffs]
Modified Sat Feb 24 11:23:31 2001 UTC (8 years, 9 months ago) by gstein
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30679 byte(s)
Diff to previous 88184 (colored)
*) fix inline handling. we had: apr_inline, APR_INLINE, USE_GNU_INLINE, and
   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]

Revision 88184 - (view) (annotate) - [select for diffs]
Modified Fri Feb 16 04:26:53 2001 UTC (8 years, 9 months ago) by fielding
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30679 byte(s)
Diff to previous 88120 (colored)
Update copyright to 2001

Revision 88120 - (view) (annotate) - [select for diffs]
Modified Mon Feb 12 21:03:35 2001 UTC (8 years, 9 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30674 byte(s)
Diff to previous 88060 (colored)
include <arpa/inet.h> for the declarations for htons() et al; OS/390 has
macros in arpa/inet.h which turn such "calls" into nothing and does not
have functions to link against in libc

Revision 88060 - (view) (annotate) - [select for diffs]
Modified Sat Feb 10 13:05:29 2001 UTC (8 years, 9 months ago) by gstein
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30618 byte(s)
Diff to previous 88019 (colored)
Clean up some of the includes:
- 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

Revision 88019 - (view) (annotate) - [select for diffs]
Modified Thu Feb 8 07:45:33 2001 UTC (8 years, 9 months ago) by dougm
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30794 byte(s)
Diff to previous 87803 (colored)
renaming various functions for consistency sake
see: http://apr.apache.org/~dougm/apr_rename.pl
PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 87803 - (view) (annotate) - [select for diffs]
Modified Wed Jan 24 01:05:47 2001 UTC (8 years, 10 months ago) by fanf
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30699 byte(s)
Diff to previous 87725 (colored)
Relax the checking of Host: headers so that only character sequences that
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

Revision 87725 - (view) (annotate) - [select for diffs]
Modified Thu Jan 18 23:52:03 2001 UTC (8 years, 10 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30922 byte(s)
Diff to previous 87393 (colored)
  Some missing exports

Revision 87393 - (view) (annotate) - [select for diffs]
Modified Mon Dec 18 02:30:32 2000 UTC (8 years, 11 months ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30910 byte(s)
Diff to previous 87392 (colored)
Get "NameVirtualHost *" option working in Apache 2.0

Revision 87392 - (view) (annotate) - [select for diffs]
Modified Sun Dec 17 23:05:24 2000 UTC (8 years, 11 months ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30740 byte(s)
Diff to previous 87391 (colored)
Clean up some formatting.  Using a tab of 22 characters makes the output
very annoying to read.  8 looks much more reasonable to me.
PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 87391 - (view) (annotate) - [select for diffs]
Modified Sun Dec 17 22:47:32 2000 UTC (8 years, 11 months ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30743 byte(s)
Diff to previous 87377 (colored)
Get -t -D DUMP_VHOSTS working and properly documented.  This removes the
-S option from the docs.

Revision 87377 - (view) (annotate) - [select for diffs]
Modified Sat Dec 16 21:36:33 2000 UTC (8 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30726 byte(s)
Diff to previous 87370 (colored)
get_addresses()
 . 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

Revision 87370 - (view) (annotate) - [select for diffs]
Modified Sat Dec 16 12:54:53 2000 UTC (8 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 30105 byte(s)
Diff to previous 87367 (colored)
Use apr_parse_addr_port() in fix_hostname().  This simplifies the
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

Revision 87367 - (view) (annotate) - [select for diffs]
Modified Sat Dec 16 11:36:16 2000 UTC (8 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 29865 byte(s)
Diff to previous 87366 (colored)
Fix a problem with the last commit...  I missed one of the hashing changes
so some of the code had an unnecessary IPv4 assumption.

Revision 87366 - (view) (annotate) - [select for diffs]
Modified Sat Dec 16 11:10:31 2000 UTC (8 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 29891 byte(s)
Diff to previous 87365 (colored)
Get rid of some IPv4 dependencies by passing the hash function the
apr_sockaddr_t * instead of the IPv4 address.

Revision 87365 - (view) (annotate) - [select for diffs]
Modified Sat Dec 16 02:26:08 2000 UTC (8 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 29477 byte(s)
Diff to previous 87363 (colored)
Fix the call to apr_snprintf() for formatting the sockaddr in
a vhost entry when dumping the vhost config.

Revision 87363 - (view) (annotate) - [select for diffs]
Modified Fri Dec 15 19:20:12 2000 UTC (8 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 29502 byte(s)
Diff to previous 87342 (colored)
move closer to IPv6 support by changing the server_addr_rec
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

Revision 87342 - (view) (annotate) - [select for diffs]
Modified Thu Dec 14 18:47:30 2000 UTC (8 years, 11 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 28888 byte(s)
Diff to previous 87050 (colored)
The local_addr and remote_addr fields in the conn_rec are now
apr_sockaddr_t * instead of sockaddr_in.  This is a small step
towards IPv6 support.

Revision 87050 - (view) (annotate) - [select for diffs]
Modified Tue Nov 21 19:10:25 2000 UTC (9 years ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 28906 byte(s)
Diff to previous 87012 (colored)
updates to changed interfaces to apr_set_port(), apr_get_port(),
apr_set_ipaddr(), and apr_get_ipaddr()

Revision 87012 - (view) (annotate) - [select for diffs]
Modified Sat Nov 18 16:04:06 2000 UTC (9 years ago) by dreid
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 28694 byte(s)
Diff to previous 86910 (colored)
Change references of AF_ to reflect APR_ so they should work
on all systems.

Revision 86910 - (view) (annotate) - [select for diffs]
Modified Fri Nov 10 16:11:14 2000 UTC (9 years ago) by dreid
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 28693 byte(s)
Diff to previous 86898 (colored)
More local/remote changes and tidy up http_vhost a bit.

Also add a new function to get an ap_ina_addr_t from a socket.

Revision 86898 - (view) (annotate) - [select for diffs]
Modified Fri Nov 10 01:34:46 2000 UTC (9 years ago) by fanf
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 29638 byte(s)
Diff to previous 86895 (colored)
In mass hosting setups (using mod_vhost_alias or mod_rewrite) where
the hostname is interpolated into the filename, we need to be sure
that the result of interpolation doesn't expose parts of the
filesystem that should be private. This was done by checking the
syntax of the Host: header according to RFC 1123 and RFC 952. However,
many people have broken configurations that violate this syntax
(frequently because they use underscores in their names), and it also
doesn't accommodate the current effort to internationalize the DNS. I
don't think the former is a compelling reason to relax the syntax
checking, but the latter does justify this change.

The only RFC on internationalized DNS at the moment is RFC 2825 which
is an introduction to how difficult the whole thing is; the other
official documentation is a pile of Internet Drafts produced by the
Internationalized Domain Names Working Group of the IETF (with names
starting "draft-ietf-idn-"). However they have very little to say
about URIs, and the current Internet draft about internationalized
URIs (draft-masinter-url-i18n-05) has very little to say about
hostnames :-( On the gripping hand there is some useful information at
<http://www.apng.org/idns/> where there is some iDNS testbed work
going on. The basic idea is that although the format of the hostnames
in the DNS itself remains compatible with RFC 1123, the actual
hostname presented to the resolver is in UTF8, and therefore the
hostname in the URL and Host: header is also in UTF8.

This change relaxes the checking so that only character sequences that
are sensitive to the filesystem are rejected, i.e. forward slashes,
backward slashes, and sequences of more than one dot.

PR: 6635

Revision 86895 - (view) (annotate) - [select for diffs]
Modified Fri Nov 10 00:58:25 2000 UTC (9 years ago) by dreid
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 29045 byte(s)
Diff to previous 86890 (colored)
Bring the apr_in_addr type into line with naming conventions and make changes
where appropriate.  At least on my system virtual hosts seem to still work :)

Revision 86890 - (view) (annotate) - [select for diffs]
Modified Thu Nov 9 15:09:50 2000 UTC (9 years ago) by dreid
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 29044 byte(s)
Diff to previous 86870 (colored)
Change the code to reflect the recent API changes...
Alter http_vhost.c to use the new apr_get_inaddr fucntion.  Old code is still
there just in case it breaks.  can someone check it who knows this stuff?

Revision 86870 - (view) (annotate) - [select for diffs]
Modified Wed Nov 8 14:47:33 2000 UTC (9 years ago) by dreid
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 28632 byte(s)
Diff to previous 86869 (colored)
This adds the APR_LOCAL/APR_REMOTE to APR and changes the apr_get/set_port
functions to use it.  This is onyl the start and I'll pause a while before
I continue in case people really hate this.  The patch can be backed out and
all evidence will be removed, but I think this makes maintaining/developing
the code easier in the long term.

Revision 86869 - (view) (annotate) - [select for diffs]
Modified Wed Nov 8 12:07:27 2000 UTC (9 years ago) by dreid
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 28617 byte(s)
Diff to previous 86868 (colored)
More cleanup of apr_port_t stuff.

This file will need a lot of work as it's using a lot of "raw" information
from socket structures that won't work with IPv6.  Needs to be abstracted out
and use APR instead.

Revision 86868 - (view) (annotate) - [select for diffs]
Modified Wed Nov 8 11:48:09 2000 UTC (9 years ago) by dreid
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 28592 byte(s)
Diff to previous 86866 (colored)
Doh!  Missed this from the last commit...

Revision 86866 - (view) (annotate) - [select for diffs]
Modified Wed Nov 8 11:35:38 2000 UTC (9 years ago) by dreid
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 28590 byte(s)
Diff to previous 86824 (colored)
Start of moving to apr_port_t in the server code.  This will probably the first
of a few...

Revision 86824 - (view) (annotate) - [select for diffs]
Modified Fri Nov 3 15:09:16 2000 UTC (9 years ago) by dreid
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 28586 byte(s)
Diff to previous 86637 (colored)
Remove some more references to sockaddr structures...

Removing the rest will need someone who knows this code to look through
in more detail.

Revision 86637 - (view) (annotate) - [select for diffs]
Modified Wed Oct 18 04:48:34 2000 UTC (9 years, 1 month ago) by fanf
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 28577 byte(s)
Diff to previous 86609 (colored)
Tighten up the syntax checking of Host: headers to fix a
security bug in some mass virtual hosting configurations
that can allow a remote attacker to retrieve some files
on the system that should be inaccessible. The problem
occured with requests including the line "Host: ..." --
the last dot is stripped and the remaining ".." then
reveals a parent directory.

Reported by: Peter Christoffersen <pch@mindpass.com>
Message-ID: <8quts6$2el$1@news.inet.tele.dk>
Newsgroups: comp.infosystems.www.servers.unix

Revision 86609 - (view) (annotate) - [select for diffs]
Modified Mon Oct 16 06:05:15 2000 UTC (9 years, 1 month ago) by wrowe
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 28484 byte(s)
Diff to previous 86208 (colored)
  Renamed all MODULE_EXPORT symbols to AP_MODULE_DECLARE and all symbols
  for CORE_EXPORT to AP_CORE_DECLARE (namespace protecting the wrapper)
  and retitled API_EXPORT as AP_DECLARE and APR_EXPORT as APR_DECLARE.
  All _VAR_ flavors changes to _DATA to be absolutely clear.
  Thank you Greg, for the most obvious suggestion.

Revision 86208 - (view) (annotate) - [select for diffs]
Modified Tue Sep 12 17:46:40 2000 UTC (9 years, 2 months ago) by fanf
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 28484 byte(s)
Diff to previous 86008 (colored)
This commit adds support for purely name-based virtual hosting that
does not require any IP addresses in httpd.conf and which disregards
the local IP address of any connections. This will be particularly
appreciated by people running little servers on machines with
dynamically configured IP addresses, and by people wishing to use
identical httpd.conf files on all the machines in a load-balanced
cluster.

The syntax is:
        NameVirtualHost *
        <VirtualHost *>
                ServerName my.friend.has.a.silly.vanitydomain.org
                DocumentRoot /usr/local/apache/docs1
        </VirtualHost>
        <VirtualHost *>
                ServerName but.easier.to.spell.than.my.vanitydomain.org
                DocumentRoot /usr/local/apache/docs2
        </VirtualHost>

The implementation is a straightforward extension of what is there
already although the patch is made somewhat larger by the need to
avoid duplicate code for normal and wildcarded NameVirtualHosts.

PR: 5595, 4455

[ported from 1.3.13]

Revision 86008 - (view) (annotate) - [select for diffs]
Modified Sun Aug 6 06:07:53 2000 UTC (9 years, 3 months ago) by wrowe
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27680 byte(s)
Diff to previous 85976 (colored)
  Remaining cleanup of ap_ -> apr_ and AP_ -> APR_ transformation...
  see src/lib/apr/apr_compat.h for most details.
  Also a few minor nits to get Win32 to build.

PR:
Obtained from:
Submitted by:
Reviewed by:

Revision 85976 - (view) (annotate) - [select for diffs]
Modified Wed Aug 2 05:27:38 2000 UTC (9 years, 3 months ago) by dougm
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27675 byte(s)
Diff to previous 85867 (colored)
prefix libapr functions and types with apr_

Revision 85867 - (view) (annotate) - [select for diffs]
Modified Fri Jul 21 19:50:58 2000 UTC (9 years, 4 months ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27632 byte(s)
Diff to previous 85723 (colored)
Move all APR functions related to strings to their own directory, and
create a new header for those functions.  This is the first step to
removing the apr/lib directory completely, and moving those files/functions
to descriptive directories.

Revision 85723 - (view) (annotate) - [select for diffs]
Modified Wed Jun 28 14:33:48 2000 UTC (9 years, 5 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27607 byte(s)
Diff to previous 85599 (colored)
Include strings.h for strcasecmp(), strncasecmp(), and bzero().
Include time.h for time().

This removes a bunch of compiler warnings with gcc -Wall on AIX.
Submitted by:	Jeff Trawick, Victor Orlikowski

Revision 85599 - (view) (annotate) - [select for diffs]
Modified Sat Jun 17 16:29:53 2000 UTC (9 years, 5 months ago) by ben
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27557 byte(s)
Diff to previous 85595 (colored)
More consification, correct command initialisation.

Revision 85595 - (view) (annotate) - [select for diffs]
Modified Sat Jun 17 11:13:05 2000 UTC (9 years, 5 months ago) by ben
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27609 byte(s)
Diff to previous 85567 (colored)
Command handler revamp. Note that this makes the code produce a LOT of
warnings!

Revision 85567 - (view) (annotate) - [select for diffs]
Modified Tue Jun 13 21:36:18 2000 UTC (9 years, 5 months ago) by trawick
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27589 byte(s)
Diff to previous 85558 (colored)
Get the ap_config.h cleanup working on FreeBSD by adding includes of
additional system headers.

A platform check in logresolve.c to determine whether or not we include
<arpa/inet.h> was converted to a feature check.

Revision 85558 - (view) (annotate) - [select for diffs]
Modified Mon Jun 12 23:03:05 2000 UTC (9 years, 5 months ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27533 byte(s)
Diff to previous 85553 (colored)
Protect system header files with the appropriate macros.

Revision 85553 - (view) (annotate) - [select for diffs]
Modified Mon Jun 12 21:47:17 2000 UTC (9 years, 5 months ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27443 byte(s)
Diff to previous 84963 (colored)
Clean up a big chunk of ap_config.h.  This basically stops ap_config.h from
including any files.  Because of this change, other files must include
their own headers.  I also cleaned up a couple of other bugs in some
modules because I had to compile them all.

I expect this to break multiple platforms, but this will be fixed over time.
The massive configure cleanup is almost done.  I will go through the files
one more time after this commit.

Revision 84963 - (view) (annotate) - [select for diffs]
Modified Fri Apr 14 15:59:20 2000 UTC (9 years, 7 months ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27376 byte(s)
Diff to previous 84878 (colored)
Change ap_context_t to ap_pool_t.  This compiles, runs, and serves pages
on Linux, but probably breaks somewhere.

Revision 84878 - (view) (annotate) - [select for diffs]
Modified Fri Mar 31 08:44:21 2000 UTC (9 years, 7 months ago) by fielding
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27394 byte(s)
Diff to previous 84725 (colored)
Update to Apache Software License version 1.1

Revision 84725 - (view) (annotate) - [select for diffs]
Modified Fri Mar 10 00:07:37 2000 UTC (9 years, 8 months ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27539 byte(s)
Diff to previous 84531 (colored)
Fix all the License issues.  Including:
s/Apache Group/Apache Software Foundation/
s/1999/2000/
s/Sascha's license/ASF license

Revision 84531 - (view) (annotate) - [select for diffs]
Modified Fri Jan 28 18:02:29 2000 UTC (9 years, 10 months ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27413 byte(s)
Diff to previous 84519 (colored)
Include ap_config.h before httpd.h, this ensures that AP_USE_HSREGEX is
defined correctly in all C files.

Revision 84519 - (view) (annotate) - [select for diffs]
Modified Wed Jan 26 07:07:49 2000 UTC (9 years, 10 months ago) by bjh
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27413 byte(s)
Diff to previous 84493 (colored)
Quiet some warnings.
- 1 'suggest parentheses around assignment used as truth value'
- a few "subscript has type `char'"

Revision 84493 - (view) (annotate) - [select for diffs]
Modified Wed Jan 19 01:16:31 2000 UTC (9 years, 10 months ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27407 byte(s)
Diff to previous 84350 (colored)
Finish the commits for the change in the header files.  Basically, this hides
all of the Apache macros that modules don't need access to.  This should
have been committed with the modules, but I wasn't paying attention to the
directory I was in when I ran the commit.
Submitted by:	Manoj Kasichainula and Ryan Bloom

Revision 84350 - (view) (annotate) - [select for diffs]
Modified Tue Dec 21 14:45:53 1999 UTC (9 years, 11 months ago) by stoddard
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27384 byte(s)
Diff to previous 84349 (colored)
Fix compile break introduced to Apache 2.0 by the mass vhosting security fix.

Revision 84349 - (view) (annotate) - [select for diffs]
Modified Tue Dec 21 11:33:23 1999 UTC (9 years, 11 months ago) by fanf
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27381 byte(s)
Diff to previous 84294 (colored)
Fix the mass vhosting security problem spotted by Lars, as in 1.3
Submitted by:	Ben Hyde
Reviewed by:	Tony Finch

Revision 84294 - (view) (annotate) - [select for diffs]
Modified Wed Dec 15 00:59:56 1999 UTC (9 years, 11 months ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 26833 byte(s)
Diff to previous 84131 (colored)
Cleanup the Windows build a bit by getting rid of more platform dependant
code.  Still won't compile cleanly, but we are closer.  I am hoping for a
clean Windows compile by Friday.

Revision 84131 - (view) (annotate) - [select for diffs]
Modified Wed Nov 17 21:39:42 1999 UTC (10 years ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 26885 byte(s)
Diff to previous 84128 (colored)
Cleaned up the APRFile uses in Apache.  Also removed the apr.h header file
because it is no longer used.  Finally, I updated the dependancies to
compile cleanly.

Revision 84128 - (view) (annotate) - [select for diffs]
Modified Tue Nov 16 18:32:05 1999 UTC (10 years ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 26768 byte(s)
Diff to previous 84007 (colored)
Cleanup the ZZZ comments.  Basically these used to mark places where APR
is needed.  It is much easier to do this conversion by hand than by
searching for old comments, so they are going away now.

Revision 84007 - (view) (annotate) - [select for diffs]
Modified Wed Oct 20 12:50:12 1999 UTC (10 years, 1 month ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27063 byte(s)
Diff to previous 83852 (colored)
Add a status value to ap_log_error and ap_log_rerror.  This allows us to use
apr_status codes in our error logs.  The main advantage of this, is portable
error codes.  Now, Windows will finally be able to use errno!

Revision 83852 - (view) (annotate) - [select for diffs]
Modified Tue Aug 31 05:35:52 1999 UTC (10 years, 2 months ago) by rbb
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 27045 byte(s)
Diff to previous 83780 (colored)
Changed pools to contexts.  Tested with prefork and pthread mpm's.  I'll
check this out tomorrow and make sure everything was checked in correctly.

Revision 83780 - (view) (annotate) - [select for diffs]
Modified Thu Aug 26 16:34:15 1999 UTC (10 years, 3 months ago) by fielding
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 26962 byte(s)
Diff to previous 83779 (colored)
Replace file descriptors with APRFile.

Submitted by:	Bill Stoddard

Revision 83779 - (view) (annotate) - [select for diffs]
Modified Thu Aug 26 16:30:39 1999 UTC (10 years, 3 months ago) by fielding
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 26862 byte(s)
Diff to previous 83765 (colored)
Odd comments and leftover bits from the pthreads version.
The comments really should be deleted, or at least cleaned up.

Submitted by:	pthreads leftovers

Revision 83765 - (view) (annotate) - [select for diffs]
Modified Thu Aug 26 12:13:02 1999 UTC (10 years, 3 months ago) by fielding
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 26604 byte(s)
Diff to previous 83750 (colored)
Parts where server was eliminated from connection rec.

Submitted by:	Dean Gaudet

Revision 83750 - (view) (annotate) - [select for diffs]
Added Tue Aug 24 06:46:03 1999 UTC (10 years, 3 months ago) by fielding
Original Path: httpd/httpd/trunk/server/vhost.c
File length: 26638 byte(s)
Apache 1.3.9 baseline for the Apache 2.0 repository.

Obtained from: Apache 1.3.9 (minus unused files), tag APACHE_1_3_9
Submitted by: Apache Group

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

apache@apache.org
ViewVC Help
Powered by ViewVC 1.1.2