httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ben Laurie <...@algroup.co.uk>
Subject Re: [PATCH] Win32 fix trailing slashes, PR's 2274 & 2348
Date Mon, 29 Jun 1998 21:35:42 GMT
Bill Stoddard wrote:
> 
> Ben Laurie wrote:
> 
> > Bill Stoddard wrote:
> > >
> > > Ben Laurie wrote:
> > >
> > > > Bill Stoddard wrote:
> > > > >
> > > > > Ben Laurie wrote:
> > > > >
> > > > > > W G Stoddard wrote:
> > > > > > >
> > > > > > > Ben,
> > > > > > > Thanks for taking the time to review my patches.
> > > > > > >
> > > > > > > Putting the check in sub_canonical_file name will handle
cases like
> > > > > > > http://servername/cgiprog.exe//dir1///dir2, etc.  Maybe
there is a better way
> > > > > > > to implement it, though. I missed a problem with the last
patch....  A
> > > > > > > <Directory /> will crash the server.  An updated
patch is on the way....
> > > > > >
> > > > > > Ah, managed to miss this one. I'm not sure I get what you are
trying to
> > > > > > do. Cases such as you mention are _supposed_ to have their multiple
> > > > > > slashes collapsed to one.
> > > > > >
> > > > > > Or am I missing the point?
> > > > > >
> > > > > > Cheers,
> > > > > >
> > > > > > Ben.
> > > > >
> > > > > The path info (everything coming after cgiprog.exe) should be passed
in the PATH_INFO envar just as
> > > > > it appears in the url (multiple slashes and all). Check out how it
works on Unix then read the PR.
> > > > > Win32 is broken....
> > > > >
> > > > > And Win32 is -still- broken in the latest CVS tree, even with this
patch is applied. Recent
> > > > > additions to util_win32.c broke the operation of this patch so we
should not bother integrating it
> > > > > now....
> > > > >
> > > > > Got any suggestions? I'd like to hear them before going at it again...
> > > >
> > > > Now that I've understood what you are trying to do I've constructed my
> > > > own patch for it:
> > > >
> > >
> > > I see the following problems:
> > >
> > > 1. http://hostname/cgi-bin/prtenv.pl/dir1/
> > >     Results in 404 not found. Any path name that ends in / results in 404 not
found
> > >
> > > 2. http://hostname/cgi-bin/prtenv.pl///dir1//dir2
> > >     Results in PATH_INFO /dir1//dir2. The leading slashes are not picked up
and they should be.
> > >
> > > 3. http://hostname/cgi-bin/prtenv.pl/
> > >     Results in Internal Server Error
> > >
> > > 4. SCRIPT_NAME includes path info off the url and it shouldn't
> > >     This has been broken forever and needs fixing.
> >
> > Strange. I just sat down to fix these, but I can't reproduce any of
> > them. I assume this is because of the other changes I've made combining
> > favourably with this patch.
> >
> > I did find another problem, though:
> > http://hostname/cgi-bin/prtenv.pl///dir1// gives a PATH_INFO of
> > ///dir1/.
> >
> > So, I'll fix that, then commit my changes.
> 
> Ready to pull some hair out?
> 
> I see the following problems with apache_19980629130029:
> 
> 1. /cgi-bin/prtenv.pl//
>     Gives PATH_INFO of /. It is // on Unix.

Easily fixed. Coming soon.

> 2. /cgi-bin/prtenv.pl//dir1///dir2/dir3
>     Gives PATH_INFO = /dir1/dir2/dir3/.  SCRIPT_NAME is still mangled.

Aaarg! This is because sub_canonical_filename is completely broken. Oh
boy.

Hmmm ... did your original patch fix all these? If so, my apologies for
ever doubting it was needed.

Anyway, I've started, so I'll finish. But not tonight, probably - I've
got to eat!

Cheers,

Ben.

-- 
Ben Laurie            |Phone: +44 (181) 735 0686| Apache Group member
Freelance Consultant  |Fax:   +44 (181) 735 0689|http://www.apache.org/
and Technical Director|Email: ben@algroup.co.uk |
A.L. Digital Ltd,     |Apache-SSL author     http://www.apache-ssl.org/
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache/

WE'RE RECRUITING! http://www.aldigital.co.uk/recruit/

Mime
View raw message