httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Randy Terbush <ra...@zyzzyva.com>
Subject Re: Alt patch II
Date Tue, 14 Jan 1997 04:08:34 GMT

Yes. no-go on squishing. Sounds like you, I and Marc are in
agreement. I'll start rolling.

> 	So are you go on ENOTDIR and no-go on /-squishing? I just want
> to be clear on what you're doing.. Given Marc's comment that
> /-squishing may cause problems with PATH_INFO, I'd go for that.
> 
> > 
> > Having given some more time to testing of Marc's second patch
> > which adds the check for ENOTDIR, I am changing my vote to be
> > in support of his solution. The primary reason being that a
> > request for http://www.somewhere.com/foo.html///// properly
> > returns a 404. Since Sameer has shown that ENOTDIR exists on
> > quite a few platforms, this seems to be the preferable fix.
> > 
> > I'm going to begin preparing a 1.1.3 with these changes and
> > will check back to see if anyone is screaming NO NO NO.
> > 
> > 
> > > Forgive me if some of the comments below are stupid, I haven't looked at
> > > this in depth...
> > > 
> > > On Mon, 13 Jan 1997, Ben Laurie wrote:
> > > 
> > > > +
> > > > + char *collapse_path(pool *pool, char *path)
> > > > +     {
> > > > +     char *p,*d;
> > > > +     char *np;
> > > > +
> > > > +     for(p=path ; p[1] && (p[0] != '/' || p[1] !='/') ; ++p)
> > > > +       ;
> > > 
> > > What is this doing that strstr() won't?
> > > 
> > > > +     if(!p[1])
> > > > +       return path;
> > > > +
> > > > +     np=palloc(pool,strlen(path));
> > > 
> > > Could use a comment about why you only have to allocate strlen(path) (ie. 
> > > no space for null termination)  bytes (ie. at this point you know you have
> > > to remove at least one '/' so you have to have enough memory). 
> > > 
> > > I also have to echo Alexei's concern over what it does with path_info.  I
> > > have not had time to look in depth, but from what I see if you access:
> > > 
> > > 	http://server/cgi-bin/script/http://host/path/
> > > 
> > > with this patch, then path_info will be something like "http:/host/path/"
> > > not "http://host/path/".  This can NOT be done without at LEAST checking
> > > that out.  If you are running with the patch, try it.
> > > 
> > > In any case, get_path_info is supposed to get the path_info where
> > > path_info is a specific thing, ie. stuff tacked to the end of the URL.
> > > Putting unrelated functionality in there is incorrect.
> > > 
> > > Advantage of the way I suggested: I already screwed things up once, so
> > > second time round can't be worse?  <sigh> I have heard of no bugs in
the
> > > method I proposed other than (possibly very valid) portability concerns. 
> > > 
> > 
> > 
> > 
> 
> 
> -- 
> Sameer Parekh					Voice:   510-986-8770
> President					FAX:     510-986-8777
> C2Net 		    C2Net is having a party: http://www.c2.net/party/
> http://www.c2.net/				sameer@c2.net




Mime
View raw message