Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Retain case of all tag and attribute names by default. #206

GoogleCodeExporter opened this issue Apr 6, 2015 · 2 comments

Retain case of all tag and attribute names by default. #206

GoogleCodeExporter opened this issue Apr 6, 2015 · 2 comments


Copy link

Currently mod_pagespeed lower-cases all tag and attribute names.  This is the 
correct thing to do for HTML, but is the wrong thing to do for XML.  
Unfortunately, XML is frequently served with Content-type: text/html and even a 
.html extension.

An example of a site that breaks due to mod_pagespeed lower-casing XML files is,12114,L-184-244-132,0

When run without mod_pagespeed you see a scrolling list of headlines.  When run 
with mod_pagespeed you see nothing -- no errors either.

The issue is that the site contains a call to AC_FL_RunContent with:


When I run this from the command line, I can see that the content is really XML 
(not HTML), but the Content-Type is specified as text/html:

% wget -O - -q --save-headers 
imestamp=42652030'|head -20
HTTP/1.0 200 OK
Server: Microsoft-IIS/5.0
Content-Length: 2019
Content-Type: text/html
Cache-Control: max-age=814
Date: Wed, 02 Feb 2011 18:35:34 GMT
Connection: keep-alive

<!-- Vignette V6 Wed Feb 02 20:23:36 2011 -->

        <date>02/02/2011 20:19</date>
        <message><![CDATA[           :               ,      "     ]]></message>
        <date>02/02/2011 20:12</date>

The problem is that when your mod_pagespeed-enabled server serves up that 
request, it has an .html extension, and a content-type of text/html.  It also 
begins with a "<".  These are all signals to mod_pagespeed that this is really 
HTML which is not case sensitive.  mod_pagespeed, following best practices, 
will lower-case all the tag names, which probably breaks the site.

The flip-side of this is that web-best-practices suggest that we should 
lower-case html keywords to improve the effectiveness of gzip.  But I think on 
balance it's better not to break sites, so we should make the case-folding be a 
filter that's off by default.

Original issue reported on by on 2 Feb 2011 at 6:44

Copy link

This is fixed in the trunk.  There is a new option
   ModPagespeedLowercaseHtmlNames on
which can be used to case-fold them again.

Original comment by on 14 Feb 2011 at 1:56

  • Changed state: Fixed

Copy link

Original comment by on 24 Feb 2011 at 9:45

  • Added labels: release-note

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

1 participant