httpd-modules-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Marantz <jmara...@google.com>
Subject Re: Overriding mod_rewrite from another module
Date Mon, 03 Jan 2011 16:40:05 GMT
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 <info@bnoordhuis.nl> wrote:

> On Sat, Jan 1, 2011 at 00:16, Joshua Marantz <jmarantz@google.com> 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!
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message