httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <...@dotat.at>
Subject Re: Possible breakage in 1.3.15
Date Tue, 23 Jan 2001 09:25:13 GMT
Tony Finch <dot@dotat.at> wrote:
>Rodent of Unusual Size <Ken.Coar@MeepZor.Com> wrote:
>>
>>I have only noticed this in 1.5.15-dev and later; I am not sure
>>whether it was in earlier versions or not, and I am writing
>>this on a plane w/o access to the webcvs stuff.
>
>Oh bollocks, I broke fix_hostname. Fix imminent.

Can I commit this, Jim?

Index: http_vhost.c
===================================================================
RCS file: /home/cvs/apache-1.3/src/main/http_vhost.c,v
retrieving revision 1.24
diff -u -r1.24 http_vhost.c
--- http_vhost.c	2001/01/15 17:05:03	1.24
+++ http_vhost.c	2001/01/23 09:23:42
@@ -717,15 +717,19 @@
 	if (*src == '/' || *src == '\\') {
 	    goto bad;
 	}
+        if (*src == ':') {
+            /* check the port part */
+            while (*++src) {
+                if (!ap_isdigit(*src)) {
+                    goto bad;
+                }
+            }
+            if (src[-1] == ':')
+                goto bad;
+            else
+                break;
+        }
 	*dst++ = *src++;
-    }
-    /* check the port part */
-    if (*src++ == ':') {
-	while (*src) {
-	    if (!ap_isdigit(*src++)) {
-		goto bad;
-	    }
-	}
     }
     /* strip trailing gubbins */
     if (dst > host && dst[-1] == '.') {


Tony.
-- 
f.a.n.finch    fanf@covalent.net    dot@dotat.at
"Perhaps on your way home you will pass someone in the dark,
and you will never know it, for they will be from outer space."

Mime
View raw message