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] PR1265: proxy caching broken on win32
Date Tue, 30 Dec 1997 19:37:40 GMT
Marc Slemko wrote:
> 
> On Tue, 30 Dec 1997, Ben Laurie wrote:
> 
> > Marc Slemko wrote:
> > >
> > > Index: util_win32.c
> > > ===================================================================
> > > RCS file: /export/home/cvs/apachen/src/os/win32/util_win32.c,v
> > > retrieving revision 1.7
> > > diff -u -r1.7 util_win32.c
> > > --- util_win32.c        1997/12/26 15:29:40     1.7
> > > +++ util_win32.c        1997/12/30 08:14:32
> > > @@ -58,6 +58,8 @@
> > >  {
> > >      char buf[HUGE_STRING_LEN];
> > >
> > > +    if (!strncmp(szFile, "proxy:", 6))
> > > +       return pstrdup(pPool, szFile);
> > >      sub_canonical_filename(buf, szFile);
> > >      buf[0]=tolower(buf[0]);
> > >      return pstrdup(pPool, buf);
> >
> > I considered doing it this way, but isn't it symptomatic of a deeper
> > problem (i.e. that things starting "proxy:" should never be treated as
> > filenames)? What happens under Unix if I make files called
> > proxy:somethingclever in appropriate places?
> 
> The problem is the proxy module period.
> 
> It uses three ways to mark something as a proxy request.

:-) When I was messing with the proxy module, I had a distinct suspicion
that one of the design principles was that it should use every hook in
the module structure (I believe it is the only module to do this).

> What happens is that the access control code is the same for proxy access
> and for other stuff.

Ah.

> I suppose perhaps os_canonical_filename should be moved to below the if
> "(test_filename[0] != '/')" section of directory_walk.

I hope that's really an os_is_path_absolute()...

>  Note that that
> section will always return and will always be called for proxy: (or any
> non-file) requests, so it isn't actually treated as a file.
> 
> Yea, ok, I guess I can go for the bug being in the location of the call to
> os_canonical_filename.  As long as there are no other "fake filenames"
> that do need canonicalization.

Not that I can think of, and I guess if I'm wrong we'll find out!

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 |Apache-SSL author
A.L. Digital Ltd,     |http://www.algroup.co.uk/Apache-SSL
London, England.      |"Apache: TDG" http://www.ora.com/catalog/apache

Mime
View raw message