httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <p...@ukweb.com>
Subject Redirect of DirectoryIndex SEGV
Date Tue, 15 Apr 1997 21:02:33 GMT
On Tue, 15 Apr 1997, Dean Gaudet wrote:
> 1.2 Showstoppers with no patches yet:
>   * redirect of index file causes SEGV [Marc]
> 	Status: have a way to stop the core dump, but that doesn't make
> 	it work properly.
> 	See also: <Pine.BSF.3.91.970210204402.12197B-100000@localhost.imdb.com>

The problem is a SEGV if you have

  DirectoryIndex /index.html
  Redirect /index.html http://whatever/

This is because mod_dir does a sub-req lookup for /index.html and gets a
302 status and "Location" in headers_out, then returns 302 which applies
to the _main request_, which does NOT have a Location entry in headers_out
so send_error_response dumps when it processes the location (i.e. NULL).

This patch moves the Location header into headers_out of the main request,
if mod_dir is about to return a redirect status. 

While this appears to fix this particular bug, is this another case where
the 'promote sub-req' stuff now going into mod_negotiation should be used? 

//pcs



Mime
View raw message