Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 61654 invoked from network); 8 Jan 2006 05:41:32 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 8 Jan 2006 05:41:31 -0000 Received: (qmail 78982 invoked by uid 500); 8 Jan 2006 05:41:24 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 78957 invoked by uid 500); 8 Jan 2006 05:41:24 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 78946 invoked by uid 99); 8 Jan 2006 05:41:24 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jan 2006 21:41:24 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of rooneg@gmail.com designates 64.233.184.195 as permitted sender) Received: from [64.233.184.195] (HELO wproxy.gmail.com) (64.233.184.195) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 07 Jan 2006 21:41:22 -0800 Received: by wproxy.gmail.com with SMTP id i24so2402774wra for ; Sat, 07 Jan 2006 21:41:01 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references; b=PC9d5sxZZSv0381XoQReib4W0V8ZGmGpuNDXvIarnmbTNn/7/WL8NiFSRVC3JyLY3rCTN0xxRJi4u/0YKnyy94CMwe//uVjc0wnfS/3zIdC1SPIkViNAdEkhXkPDVRpiQkGSgkcxih6BpNxQORE2S0uFN4XSXHaB29aS8jgRJkc= Received: by 10.54.114.7 with SMTP id m7mr6929314wrc; Sat, 07 Jan 2006 21:41:01 -0800 (PST) Received: by 10.54.121.15 with HTTP; Sat, 7 Jan 2006 21:41:01 -0800 (PST) Message-ID: <7edfeeef0601072141h73e9ead4q45a3c52ef38a7758@mail.gmail.com> Date: Sat, 7 Jan 2006 21:41:01 -0800 From: Garrett Rooney Sender: rooneg@gmail.com To: dev@httpd.apache.org Subject: Re: [patch] FCGI -- pass path-info to FCGI process In-Reply-To: <7edfeeef0601052051l542fdf99h9de3dc2f920b95b6@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_13944_22245008.1136698861402" References: <43BCE5B9.6000600@holsman.net> <7edfeeef0601052051l542fdf99h9de3dc2f920b95b6@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_13944_22245008.1136698861402 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On 1/5/06, Garrett Rooney wrote: > On 1/5/06, Ian Holsman wrote: > > this allows you to pass a 'path' to the fast cgi process > > to use: > > ProxyPass /forum fcgi-tcp://127.0.0.1:8005/foruX > > > > request > > /forum/zx will have a path_info of /foruX/zx > > > > posting it as a patch, as the code is a bit fugly. > > The question is, what should PATH_INFO actually be set to. Your way > of doing things gives some interesting flexibility, but intuitively it > seems to me that it would be the portion of the request URI after > /forum (for this example), not include /forum at all. > > Also, I'm not sure about this syntax because I'm not clear how it > would work for local fcgi processes that use a unix domain socket. > I've assumed that the fcgi-local:// scheme would do something like > fcgi-local://localhost/path/to/socket, and in that case how can you > tell the difference between the socket and the path extension? FWIW, here's my alternate patch to implement PATH_INFO. It seems to give results that match what I'd assume (i.e. for a ProxyPass on /fcgi, and a request to /fcgi/foo?bar&baz you'd get PATH_INFO =3D "foo", QUERY_STRING =3D "bar?baz"), and I imagine you can play mod_rewrite tricks to get more interesting behavior if you're so inlined. -garrett ------=_Part_13944_22245008.1136698861402 Content-Type: text/x-patch; name=proxy-fcgi-path-info.diff; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="proxy-fcgi-path-info.diff" Index: modules/proxy/mod_proxy_fcgi.c =================================================================== --- modules/proxy/mod_proxy_fcgi.c (revision 366985) +++ modules/proxy/mod_proxy_fcgi.c (working copy) @@ -64,6 +64,8 @@ r->filename = apr_pstrcat(r->pool, "proxy:", scheme, host, sport, "/", NULL); + + r->path_info = apr_pstrdup(r->pool, url); } else if (strncmp(url, "local://", 8) == 0) { url += 6; ------=_Part_13944_22245008.1136698861402--