Received: by taz.hyperreal.com (8.6.12/8.6.5) id TAA26543; Thu, 14 Dec 1995 19:56:11 -0800 Received: from krishna.vidya.com by taz.hyperreal.com (8.6.12/8.6.5) with ESMTP id TAA26538; Thu, 14 Dec 1995 19:56:05 -0800 Received: (from myddryn@localhost) by krishna.vidya.com (8.6.12/8.6.9) id TAA03447 for new-httpd@hyperreal.com; Thu, 14 Dec 1995 19:13:52 -0800 From: Adam Sussman Message-Id: <199512150313.TAA03447@krishna.vidya.com> Subject: Re: mod_actions (patch and questions) To: new-httpd@hyperreal.com Date: Thu, 14 Dec 1995 19:13:52 -0800 (PST) In-Reply-To: <199512150025.SAA04139@sierra.zyzzyva.com> from "Randy Terbush" at Dec 14, 95 06:25:59 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: 1540 Sender: owner-new-httpd@apache.org Precedence: bulk Reply-To: new-httpd@apache.org This module has a couple of other problems. It does not re-esape the uri or preserve the query string before issuing its redirect. Here is a patch that I use. It includes your patch. *** mod_actions.c.orig Thu Dec 14 18:48:53 1995 --- mod_actions.c Thu Dec 14 19:07:12 1995 *************** *** 129,135 **** action_dir_config *conf = (action_dir_config *)get_module_config(r->per_dir_config, &action_module); ! if (!strcmp(table_get(conf->action_types, r->content_type), NULL)) return(DECLINED); if (r->finfo.st_mode == 0) { --- 129,135 ---- action_dir_config *conf = (action_dir_config *)get_module_config(r->per_dir_config, &action_module); ! if (table_get(conf->action_types, r->content_type) == NULL) return(DECLINED); if (r->finfo.st_mode == 0) { *************** *** 137,144 **** return NOT_FOUND; } ! internal_redirect(pstrcat (r->pool, table_get(conf->action_types, ! r->content_type), r->uri, NULL),r); return OK; } --- 137,150 ---- return NOT_FOUND; } ! if (r->args != NULL) ! internal_redirect(pstrcat (r->pool, table_get(conf->action_types, ! r->content_type), escape_uri(r->pool, r->uri), ! "?", r->args, NULL),r); ! else ! internal_redirect(pstrcat (r->pool, table_get(conf->action_types, ! r->content_type), escape_uri(r->pool, r->uri), ! r->uri, NULL),r); return OK; }