Received: by taz.hyperreal.com (8.6.12/8.6.5) id XAA23543; Wed, 3 Jan 1996 23:34:48 -0800 Received: from krishna.vidya.com by taz.hyperreal.com (8.6.12/8.6.5) with ESMTP id XAA23538; Wed, 3 Jan 1996 23:34:43 -0800 Received: (from myddryn@localhost) by krishna.vidya.com (8.6.12/8.6.9) id XAA26951 for new-httpd@hyperreal.com; Wed, 3 Jan 1996 23:40:32 -0800 From: Adam Sussman Message-Id: <199601040740.XAA26951@krishna.vidya.com> Subject: again - patch correction To: new-httpd@hyperreal.com Date: Wed, 3 Jan 1996 23:40:32 -0800 (PST) In-Reply-To: <199601040724.XAA26804@krishna.vidya.com> from "Adam Sussman" at Jan 3, 96 11:24:56 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1912 Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@apache.org This just is not my night. I must not be paying proper attention. Here is the -correct- patch. I forgot the pstrdup in the mod_cgi patch. I think I'm gonna stop working and go home before I cause any more damage :). -- snip -- From: asussman@vidya.com (Adam Sussman) Subject: Preserve HTTP Method accross an internal redirect. Affects: http_request.c mod_cgi.c ChangeLog: The current internal_redirect code always hard sets the new request to a GET method. This is not always desireable. This patch causes internal_redirect to preserve the original request method except in the case of a redirect from the CGI module. *** http_request.c.old Fri Nov 17 13:33:15 1995 --- http_request.c Wed Jan 3 01:34:14 1996 *************** *** 658,671 **** new->prev = r; r->next = new; - /* We are redirecting. Treat the internally generated transaction - * as a GET, since there is not a chance of its getting POST-style - * arguments. - */ - new->method = "GET"; - new->method_number = M_GET; - /* Inherit the rest of the protocol info... */ new->status = r->status; new->assbackwards = r->assbackwards; --- 658,667 ---- new->prev = r; r->next = new; /* Inherit the rest of the protocol info... */ + + new->method = pstrdup(r->pool, r->method); + new->method_number = r->method_number; new->status = r->status; new->assbackwards = r->assbackwards; *** mod_cgi.c.old Wed Jan 3 23:16:52 1996 --- mod_cgi.c Wed Jan 3 23:16:05 1996 *************** *** 315,320 **** --- 315,324 ---- continue; kill_timeout (r); + /* set the request method to get for the reidirect */ + r->method = pstrdup(r->pool, "GET"); + r->method_number = M_GET; + internal_redirect (location, r); return OK; }