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: API Question - External Redirect
Date Sat, 20 Apr 1996 16:01:30 GMT
  But send_http_header() does not check r->status anywhere.  I don't see how
  setting the status would affect the headers that are sent.

Sigh... send_http_header calls basic_http_header.  The first thing
basic_http_header sends (if it isn't talking to an HTTP/0.9 client)
is status_lines[index_of_response(r->status)].  The status line sent
*is* what causes the browser to redirect to another URL (the one given
in the Location: header); that is just how HTTP works.

BTW, you do have an option other than explicitly setting r->status,
which is to just return REDIRECT and let the server core dispatch
machinery do it.  (That's how the CGI code forces redirects).

rst

Mime
View raw message