Return-Path: X-Original-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 81ED0F716 for ; Wed, 1 May 2013 14:16:07 +0000 (UTC) Received: (qmail 26925 invoked by uid 500); 1 May 2013 14:16:07 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 26775 invoked by uid 500); 1 May 2013 14:16:06 -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 26766 invoked by uid 99); 1 May 2013 14:16:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 14:16:06 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jmarantz@google.com designates 209.85.214.175 as permitted sender) Received: from [209.85.214.175] (HELO mail-ob0-f175.google.com) (209.85.214.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 14:16:01 +0000 Received: by mail-ob0-f175.google.com with SMTP id wp18so1302140obc.6 for ; Wed, 01 May 2013 07:15:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=u+qkMpWXGHZjc4mBhV57x0XMxZnDw2DbO/W2JdAE4QM=; b=deYp4TlQkb2O8SAwcA6dELMyKa/YOlaIiGQC867BqL4w1LarhOwVCofuJuhRtxeNCa d+WSzyNk7F4n0OMASnqUWWakX0/mGLsrLVEplR53pwH/yZBW754+4EOXqvCZv6hWVy+o PUXpAGIA3nANjM27tfh/iC6raF3bYaSiqemUFGEr4tfjdNTrKGBs25ZUqMMY5Hs+j83P +hS65Fx/Gr6tPeY6N2jVukkBbdIaRpVFg/oRToJfIxTzc+YPv7IhQG8v9rDkKIu8XyMO SJdksgH2pqP9w3kR0tfFfKCr4o4sYQ+O9Dh0NITRQALaf/axy3iMpFPOVHmOFL0Jyb3D uAtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type:x-gm-message-state; bh=u+qkMpWXGHZjc4mBhV57x0XMxZnDw2DbO/W2JdAE4QM=; b=NHZ70j9iHhCDY5YMo2m5owgFHqc5mFD+CraTGJwnSJD2P054p6KCgXQ3EbiJBfAaqV WJoDzxTcQvn+Gop5pIKx35o/M9FPs5ig/dtdSWMHWUREe3AhRqDUwTfv6ZznmhLlZWsa fxu8Uld7WK1+x7VnhchwYvNS52PGlVOcSddyvLB/RZv/5nTFU14Fvvw8Y4mKzSUIy/mC UZWP7lmavRjcLNwHxzpP/yFzkJQT/n7BFstW8VrqORiXLuVD6E88c9rpRh1blNFutNHl VBKXEs6g/fzVmnxmpTD33YAfrnFtyvdZcfU3Vg+MVTqg6U23NHrd/LsgXA7kde4tM7gd XAdQ== X-Received: by 10.60.174.72 with SMTP id bq8mr669841oec.123.1367417740656; Wed, 01 May 2013 07:15:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.76.20.107 with HTTP; Wed, 1 May 2013 07:15:20 -0700 (PDT) In-Reply-To: References: From: Joshua Marantz Date: Wed, 1 May 2013 10:15:20 -0400 Message-ID: Subject: Re: Apache Buckets and Brigade To: "modules-dev@httpd.apache.org" Content-Type: multipart/alternative; boundary=089e01228a44b123f404dba8c05e X-Gm-Message-State: ALoCoQnHZFkhaZCCt9GoGL0u5aGX8SIIDG2C1Y6ubUl0klR9yryX2vSRoaaZTkyw9bCNGwgeewIbQ0MQ1JoGI4Jm8nutVcrUYCM36nJwII9gJz3cCFrZdxbtzUDWUhTaKyVw/ynP1RDK/558zY2Ga/o/stb9ax7IQdmRQihcSBBC/R1+erYiwrPixj8s7YShjOsOrRxDBJ4mXylIjftJ14pUzCUv2xWGkg== X-Virus-Checked: Checked by ClamAV on apache.org --089e01228a44b123f404dba8c05e Content-Type: text/plain; charset=ISO-8859-1 On Wed, May 1, 2013 at 9:48 AM, Sindhi Sindhi 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 > --089e01228a44b123f404dba8c05e--