Return-Path: owner-new-httpd Received: by taz.hyperreal.com (8.6.10/8.6.5) id JAA10978; Fri, 10 Mar 1995 09:54:25 -0800 Received: from ooo.lanl.gov by taz.hyperreal.com (8.6.10/8.6.5) with SMTP id JAA10967; Fri, 10 Mar 1995 09:54:21 -0800 Received: by ooo.lanl.gov (1.38.193.4/16.2) id AA18020; Fri, 10 Mar 1995 10:54:08 -0700 From: Rob Hartill Message-Id: <9503101754.AA18020@ooo.lanl.gov> Subject: redirection patch To: new-httpd@hyperreal.com Date: Fri, 10 Mar 95 10:54:08 MST In-Reply-To: <199503101215.EAA08365@lazlo.steam.com>; from "Cliff Skolnick" at Mar 10, 95 4:15 am Organization: Theoretical Division, T-8. Los Alamos National Laboratory Address: LANL Theoretical Divi' T-8, MS B285, P.O Box 1663, Los Alamos NM 87545 Fax: (505) 667 5585 Phone: (505) 665-2280 or 667-5336 (T-8 Secretary) Mailer: Elm [revision: 70.85] Sender: owner-new-httpd@hyperreal.com Precedence: bulk Reply-To: new-httpd@hyperreal.com I was just looking at my patch for "302" redirects - what it doesn't do is add a body to the header to say "This URL has moved to somewhere else on behalf of dumb clients. I suspect this is why Rob McCool decided to thump all redirects and treat them special with a die(REDIRECT). Decission time - should redirect scripts be responsible for their own body, and choose to add or omit one, and have the server leave it all up to the script, or should httpd add a body if there isn't one - as it does now, but overwrite any body produced by the script, or should httpd look for a body, add one if there isn't one. The last option sounds the most reasonable, but will need some additional coding. I think we'd need to change "send_fd" from being a void function to one returning the number of bytes (long) sent. If it returns 0, then we send the redirect blurb... so in http_script.c cgi_stub() & exec_post_NCSA() exec_get_NCSA() the line send_fd(?,??,kill_children); would change to if (!send_fd(?,??,kill_children) && location[0] == '/') { title_html(??,"Document moved"); fprintf(??,"This document has moved here.

%c",err_string,LF); } Does anyone see any problem with that ? rob h