Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: (qmail 94493 invoked from network); 3 Jan 2011 16:40:57 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 3 Jan 2011 16:40:57 -0000 Received: (qmail 67078 invoked by uid 500); 3 Jan 2011 16:40:56 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 66909 invoked by uid 500); 3 Jan 2011 16:40:55 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 66901 invoked by uid 99); 3 Jan 2011 16:40:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jan 2011 16:40:54 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jmarantz@google.com designates 74.125.121.67 as permitted sender) Received: from [74.125.121.67] (HELO smtp-out.google.com) (74.125.121.67) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jan 2011 16:40:48 +0000 Received: from wpaz37.hot.corp.google.com (wpaz37.hot.corp.google.com [172.24.198.101]) by smtp-out.google.com with ESMTP id p03GeRYT020781 for ; Mon, 3 Jan 2011 08:40:27 -0800 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1294072828; bh=pQbYeAb6ilU7E7T5+AwfB8rOZJo=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Content-Type; b=jEsWcc0qBC5XA/A8uhjlY1Y+G4T/pWErE8wSJlBUnFp8PUNh7I4beknUcSMktCoxt 5Y3ChaA7ojAm7z4WvC6eQ== Received: from iyj21 (iyj21.prod.google.com [10.241.51.85]) by wpaz37.hot.corp.google.com with ESMTP id p03GeNkP009818 for ; Mon, 3 Jan 2011 08:40:26 -0800 Received: by iyj21 with SMTP id 21so12519687iyj.16 for ; Mon, 03 Jan 2011 08:40:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:content-type; bh=vd3Anq0BzTeDA4ZIWJhgvcGEixC8lTLBMMiCNb/BtW0=; b=rTet6Ohwk5e5kNVURzellIFJmsjtTxvF9XFK6thVxo015S5TPX82NwHKhH5mJ6u5E7 NKE/wLxP6Ti5a/R/smgw== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; b=Xsme2iRHVlRms5g+UqEvJ6J8Y4WOP4kcGiUCBjXSb/Yj0xcRYPzuR8+V4Or1mEWi65 kBaJolqUoru6QHWLsltA== Received: by 10.231.206.80 with SMTP id ft16mr4571077ibb.110.1294072825969; Mon, 03 Jan 2011 08:40:25 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.40.11 with HTTP; Mon, 3 Jan 2011 08:40:05 -0800 (PST) In-Reply-To: References: From: Joshua Marantz Date: Mon, 3 Jan 2011 11:40:05 -0500 Message-ID: Subject: Re: Overriding mod_rewrite from another module To: modules-dev@httpd.apache.org Content-Type: multipart/alternative; boundary=90e6ba53a6a21afe070498f3cf15 X-System-Of-Record: true X-Virus-Checked: Checked by ClamAV on apache.org --90e6ba53a6a21afe070498f3cf15 Content-Type: text/plain; charset=ISO-8859-1 OK I tried to find a more robust alternative but could not. I was thinking I could duplicate whatever mod_rewrite was doing to set the request filename that appears to be complex and probably no less brittle. I have another query on this. In reality we do *not* want our rewritten resources to be associated with a filename at all. Apache should never look for such things in the file system under ../htdocs -- they will not be there. We also do not need it to validate or authenticate on these static resources. In particular, we have found that there is some path through Apache that imposes what looks like a file-system-based limitation on URL segments (e.g. around 256 bytes). This limitation is inconvenient and, as far as I can tell, superfluous. URL limits imposed by proxies and browsers are more like 2k bytes, which would allow us to encode more metadata in URLs (e.g. sprites). Is there some magic setting we could put into the request structure to tell Apache not to interpret the request as being mapped from a file, but just to pass it through to our handler? Thanks! -Josh On Sat, Jan 1, 2011 at 6:24 AM, Ben Noordhuis wrote: > On Sat, Jan 1, 2011 at 00:16, Joshua Marantz wrote: > > Thanks for the quick response and the promising idea for a hack. Looking > at > > mod_rewrite.c this does indeed look a lot more surgical, if, perhaps, > > fragile, as mod_rewrite.c doesn't expose that string-constant in any > formal > > interface (even as a #define in a .h). Nevertheless the solution is > > easy-to-implement and easy-to-test, so...thanks! > > You're welcome, Joshua. :) > > You could try persuading a core committer to add this as a > (semi-)official extension. Nick Kew reads this list, Paul Querna often > idles in #node.js at freenode.net. > > > I'm also still wondering if there's a good source of official > documentation > > for the detailed semantics of interfaces like ap_hook_translate_name. > > Neither a Google Search, a stackoverflow.com search, nor the Apache > > Modules< > http://www.amazon.com/Apache-Modules-Book-Application-Development/dp/0132409674/ref=sr_1_1?ie=UTF8&qid=1293837117&sr=8-1 > >book > > offer much detail. > > code.google.com fares a little better but just points to 4 existing > usages. > > This question comes up often. In my experience the online > documentation is almost always outdated, incomplete or outright wrong. > I don't bother looking things up, I go straight to the source. > > It's a kind of job security, I suppose. There are only a handful of > people that truly and deeply understand Apache. We can ask any hourly > rate we want! > --90e6ba53a6a21afe070498f3cf15--