]> granicus.if.org Git - apache/commitdiff
Convert the hostname to all-lowercase in fix_hostname() so that
authorBrian Pane <brianp@apache.org>
Sun, 23 Jun 2002 08:10:49 +0000 (08:10 +0000)
committerBrian Pane <brianp@apache.org>
Sun, 23 Jun 2002 08:10:49 +0000 (08:10 +0000)
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

CHANGES
server/vhost.c

diff --git a/CHANGES b/CHANGES
index d1665b08af0290acf74806cef41eea62ac7b03cf..8675e7beec3ed90ae8a939b2d480ecb010d307e8 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,5 +1,8 @@
 Changes with Apache 2.0.40
 
+  *) Normalize the hostname value in the request_rec to all-lowercase
+     [Perry Harrington <pedward@webcom.com>]
+
   *) Fix Win32 cgi 500 errors when QUERY_ARGS or other strings include
      extended characters (non US-ASCII) in non-utf8 format.  This brings
      Win32 back into CGI/1.1 compliance, and leaves charset decoding up
index 07d7e2e0f4bcf67a7a1476fdc51b18cadeb4454e..1ca68733d96bb9e7666bf2a0d2b32e9649a2fd26 100644 (file)
@@ -785,6 +785,9 @@ static void fix_hostname(request_rec *r)
             else if (*dst == '/' || *dst == '\\') {
                 goto bad;
             }
+            else if (apr_isalpha(*dst)) {
+                *dst = apr_tolower(*dst);
+            }
         }
         /* strip trailing gubbins */
         if (dst > host && dst[-1] == '.') {