httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ras...@madhaus.utcs.utoronto.ca
Subject Re: Apache BUG
Date Wed, 17 Jul 1996 03:17:53 GMT
> Every once in a while, I'll have to move a CGI script, so what I will do is
> execute a Location:, and also write something to a log file with the
> referrer recorded. This way, I can go fix any references to the script.
> 
> Another example, I have a database application that does some updates, but
> outputs a Location: header to reload the original page, so basically,
> people just see an update to the original page, even though there is
> intervening output. If this were to be killed in the middle of an update,
> nasty things might happen cause of not all the database updates completing.

You lost me here.  Why exactly can't you write your log files and update
your databases before you send the Location header?  Perhaps I haven't been
paying close enough attention to this discussion, but here is something
I do all the time in mod_php parsed pages:

<? if($condition && $some_other_condition) {
     msql($db,"update table set field='$value' where field2='$value2'");
     Header("Location: $URL");
   }
   else>
<HTML>....</HTML>
<?  endif>

This would check some conditions, do a database update and then redirect,
or alternatively simply display some HTML.

-Rasmus

Mime
View raw message