httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject PR#77 issue 301 for "foo -> foo/" directory redirects
Date Sat, 01 Feb 1997 22:54:11 GMT
Submitted by: Markus Gyger <mgyger@itr.ch>

Issue a 301 response instead of a 302 response when returning a directory
redirect for "/foo" to "/foo/".  This allows the redirect to be cached.

Nothing in rfc2068 would lead me to belive this is a bad idea.  But one
problem that might occur is the inability to change "/foo" to a file or
other resource instead of a directory without caching problems.  But this
is true of a bunch of things... 

Navigator seems to only cache the redirect in memory not on disk. 

Netscape-Enterprise/2.01, and CERN/3.0A issue 302s just like Apache
presently does. 

I'm all for improving cacheability.

Dean

Index: mod_dir.c
===================================================================
RCS file: /export/home/cvs/apache/src/mod_dir.c,v
retrieving revision 1.20
diff -c -3 -r1.20 mod_dir.c
*** mod_dir.c	1997/01/12 20:11:53	1.20
--- mod_dir.c	1997/02/01 22:33:23
***************
*** 784,790 ****
  
  	table_set (r->headers_out, "Location",
  		   construct_url(r->pool, ifile, r->server));
! 	return REDIRECT;
      }
  
      /* KLUDGE --- make the sub_req lookups happen in the right directory.
--- 784,790 ----
  
  	table_set (r->headers_out, "Location",
  		   construct_url(r->pool, ifile, r->server));
! 	return MOVED;
      }
  
      /* KLUDGE --- make the sub_req lookups happen in the right directory.


Mime
View raw message