You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <Ke...@MeepZor.Com> on 2001/01/21 20:14:16 UTC
Possible breakage in 1.3.15
I am getting a name vhost matching failure in 1.3.16-dev when a
non-default port is used. I am hoping someone can
double-check this..
If a non-default port is used, the Host header field is
going to contain something like "foo.com:8000". That is
going to go into r->hostname, which is used by check_hostaliases()
in http_vhost.c. And it is going to fail at line 876:
if (!strcasecmp(host, sar->virthost)) {
because it will be comparing "foo.com:10000" against "foo.com".
So *all* requests fall back to the 'default' catchall vhost.
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.
Can someone try running some name vhosts on a server with a
port number other than 80 and see if they work? Or if they
fall back to the catchall?
I don't have a fix yet; I am not positive it is a genuine
problem..
If anyone can reproduce this, I think it is a showstopper for
1.3.16..
--
#ken P-)}
Ken Coar <http://Golux.Com/coar/>
Apache Software Foundation <http://www.apache.org/>
"Apache Server for Dummies" <http://Apache-Server.Com/>
"Apache Server Unleashed" <http://ApacheUnleashed.Com/>
RE: Possible breakage in 1.3.15
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: Tony Finch [mailto:dot@dotat.at]
> Sent: Tuesday, January 23, 2001 3:25 AM
>
> Tony Finch <do...@dotat.at> wrote:
> >Rodent of Unusual Size <Ke...@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?
Of course you may, we are in 1.3.17-dev. The question is, do we
toss this tarball and roll again? I'm +1 for killing 1.3.16 over
this specific issue.
Bill
Re: Possible breakage in 1.3.15
Posted by Tony Finch <do...@dotat.at>.
Tony Finch <do...@dotat.at> wrote:
>Rodent of Unusual Size <Ke...@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."
Re: Possible breakage in 1.3.15
Posted by Tony Finch <do...@dotat.at>.
Rodent of Unusual Size <Ke...@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.
Sorry!
Tony.
--
f.a.n.finch fanf@covalent.net dot@dotat.at
"You realize there's a government directive stating
that there is no such thing as a flying saucer?"