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: Apache Buckets and Brigade
Date Wed, 01 May 2013 14:15:20 GMT
On Wed, May 1, 2013 at 9:48 AM, Sindhi Sindhi <sindhi.for@gmail.com> wrote:

> I doubt if I can use ModPagespeedSubstitute, because
> our string replacement actually uses some business logic. For ex. in
> "oldString", if i find a "old" string at offset 0 i'll replace it with
>

I agree: that configuration-only solution I proposed wouldn't meet your
needs.  Before I give up on it completely, is your business logic going to
always be in C++?  I am just trying to avoid overconstraining the solution.
 For example, would Lua be a suitable vehicle for your business logic? See
https://httpd.apache.org/docs/trunk/mod/mod_lua.html.

I wonder if there's some way mod_lua & an enhanced mod_pagespeed could work
together to provide the substitution with rich business logic.  The reason
I ask is that building & hacking mod_pagespeed's source for your purposes
is a great way to get something working, but I don't have a great answer
for how you'd maintain that over time as mod_pagespeed updates roll out.


> The HTML-centric fetch of data as you mentioned suits the best for me. But
> I dont want mod_pagespeed to actually modify anything in my HTML file, if
> it can give me either the entire HTML file OR HTML-centric fetch of data
> that will solve my problem :)
>

I'm not sure I understand your concern.  mod_pagespeed will not change the
HTML file on disk.  It acts as an Apache output filter changing the bytes
of HTML as they stream out.  As the writer of a mod_pagespeed filter, you
get to interpose C++ handlers for HTML lexical tokens (including
Characters()) and mutate those tokens before they are serialized out to the
next filter.  Is that what you want?

-Josh

>

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