httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@ai.mit.edu (Robert S. Thau)
Subject Re: Sloppy URLs (was Re: double slashes)
Date Wed, 08 Nov 1995 15:13:27 GMT
  URL: /foo/bar/inc.shtml
  <!--#include virtual="../somedoc.html"-->

I don't see why sending redirects is necessary to handle this properly;
it's far easier for everybody to just handle it right in getparents().
That's also less work for the client, and you don't have to worry about
the possibility of setting up redirect loops.  Here is a *very* simple
patch which does the job:

*** util.c.prepatch	Mon Nov  6 12:16:48 1995
--- util.c	Wed Nov  8 10:06:55 1995
***************
*** 203,208 ****
--- 203,209 ----
  
                      l=l-3;
                      if(l>=0) {
+ 			while((l!=0) && (name[l]=='/')) --l;
                          while((l!=0) && (name[l]!='/')) --l;
                      }
                      else l=0;

Mime
View raw message