httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sameer <sam...@c2.net>
Subject Re: Alternative solution for stat() problems
Date Mon, 13 Jan 1997 22:50:49 GMT
	The problem with / compression is, like alexei said, some people
are doing

http://www.site1.com/cgi-bin/zippify/http://www.site2.com/

	I would rather not break these people.

> I agree that this solution may be better. I gave the code below
> a run against my 1.2 installations and found that it does not work.
> I'll start trying to figure what is happening in this function.
> Timesaving hints welcome...
> 
> 
> > How about this (untested) patch instead (against 1.1.1, for clarity)?
> > 
> > Index: http_request.c
> > ===================================================================
> > RCS file: /export/home/cvs/apache/src/http_request.c,v
> > retrieving revision 1.11
> > diff -r1.11 http_request.c
> > 137a138,155
> > >
> > > char *collapse_path(pool *pool, char *path)
> > >     {
> > >     char *p,*d;
> > >     char *np;
> > >
> > >     for(p=path ; p[1] && (p[0] != '/' || p[1] !='/') ; ++p)
> > >       ;
> > >     if(!p[1])
> > >       return path;
> > >
> > >     np=palloc(pool,strlen(path));
> > >     for(d=np,p=path ; *d=*p ; ++p,++d)
> > >       while(d[0] == '/' && d[1] == '/')
> > >           ++d;
> > >
> > >     return np;
> > >     }
> > 146c164
> > <     char *end = &path[strlen(path)];
> > ---
> > >     char *end;
> > 150a169,172
> > >
> > >     path=collapse_path(r->pool,path);
> > >
> > >     end=&path[strlen(path)];
> > 
> > -- 
> > Ben Laurie                Phone: +44 (181) 994 6435  Email: ben@algroup.co.uk
> > Freelance Consultant and  Fax:   +44 (181) 994 6472
> > Technical Director        URL: http://www.algroup.co.uk/Apache-SSL
> > A.L. Digital Ltd,         Apache Group member (http://www.apache.org)
> > London, England.          Apache-SSL author
> 
> 
> 


-- 
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