Re: Problem with upgrade to 0.10.22.4

51 views
Skip to first unread message

Joshua Marantz

unread,
Jun 15, 2012, 4:47:30 AM6/15/12
to mod-pagesp...@googlegroups.com
The reason you are seeing this change is that we removed "trim_urls" from the core filter set.  You can add it back with
   ModPagespeedEnableFilters trim_urls

The reason that we removed it was that we were having numerous reports of mod_pagespeed breaking HTML that is served via an Ajax request, where mod_pagespeed had the wrong idea of what base URL the browser was going to interpret the code with.  If this is not an issue for you then it should be safe to add back in "trim_urls".

Another command-sequence you might want to be aware of is
   ModPagespeedRewriteDomain https://your_site http://your_site
   ModPagespeedEnableFilters rewrite_domains
You might not need it on your site because the previous situation worked fine for you, where mod_pagespeed thought it was serving http:// to the browser but trim_urls made the point moot.

But this pair of commands might come in handy if you do need to move other absolutely-specified resources onto https://.  This command will work even for many URLs found in HTML files that are not otherwise rewritten or optimized by mod_pagespeed.

-Josh

On Fri, Jun 15, 2012 at 2:37 AM, Pete Storey <petes...@gmail.com> wrote:
Hi,

we updated to the latest v22 from v21 yesterday and it's caused a problem with our site.  The problem is that it has started turning all the re-written URLs into absolute ones, and because we have an SSL accelerator in front of Apache, it doesn't know that it is in secure mode, so the re-written URLs are going to http:// even when the browser is actually running in https://.  This means that browsers complain and don't load the CSS and images on the site when in HTTPS mode.

What filter would be causing this?

thanks
Pete

Joshua Marantz

unread,
Jun 20, 2012, 2:00:37 AM6/20/12
to mod-pagesp...@googlegroups.com
This is a fair question.  We figured at the time that it was easy to keep things absolute and use a separate filter to trim it down.  This way the various domain-mapping directives can be applied to the resource without extra context.

But we didn't anticipate the situation where we can't figure out what the base URL of a page is.  In this context, our reliance on trim_urls is not idea and it would have been better not to absolutify them in the first place.

We could consider trying to keep these links relative in the first place, as you suggest.  I'm not sure when we'd be able to do that though.

-Josh

On Mon, Jun 18, 2012 at 3:11 PM, Pete Storey <petes...@gmail.com> wrote:
Thanks, yes I figured that and changed it - is there a reason it adds in absolute URLs anyway?
thanks
Pete


On Friday, 15 June 2012 18:47:30 UTC+10, jmarantz wrote:
The reason you are seeing this change is that we removed "trim_urls" from the core filter set.  You can add it back with
   ModPagespeedEnableFilters trim_urls

The reason that we removed it was that we were having numerous reports of mod_pagespeed breaking HTML that is served via an Ajax request, where mod_pagespeed had the wrong idea of what base URL the browser was going to interpret the code with.  If this is not an issue for you then it should be safe to add back in "trim_urls".

Another command-sequence you might want to be aware of is
   ModPagespeedRewriteDomain https://your_site http://your_site
   ModPagespeedEnableFilters rewrite_domains
You might not need it on your site because the previous situation worked fine for you, where mod_pagespeed thought it was serving http:// to the browser but trim_urls made the point moot.

But this pair of commands might come in handy if you do need to move other absolutely-specified resources onto https://.  This command will work even for many URLs found in HTML files that are not otherwise rewritten or optimized by mod_pagespeed.

-Josh

Andrew Mattie

unread,
Jun 21, 2012, 6:58:57 PM6/21/12
to mod-pagesp...@googlegroups.com
You may want to update the config_filters docs if trim_urls has been removed from the core set. It's still listed in there.

Andrew

Joshua Marantz

unread,
Oct 24, 2012, 9:00:44 AM10/24/12
to mod-pagespeed-discuss
Following up: the above-mentioned doc issue was corrected with the v1.0 release.

-Josh

filan coo

unread,
Jan 14, 2016, 11:04:23 AM1/14/16
to mod-pagespeed-discuss
sorry dude, but I could not understand your text, is it related to #503 response issue?

пятница, 15 июня 2012 г., 11:47:30 UTC+3 пользователь jmarantz написал:
Reply all
Reply to author
Forward
0 new messages