apache/incubator-pagespeed-ngx

System test: convert_meta_tags

jeffkaufman opened this issue · 4 comments

TEST: convert_meta_tags
wget -H -p -S -o /tmp/mod_pagespeed_test.jefftk/fetched_directory/wget_output.txt -nd -P /tmp/mod_pagespeed_test.jefftk/fetched_directory -e robots=off --header=ModPagespeedFilters:convert_meta_tags http://localhost:8050/mod_pagespeed_example/convert_meta_tags.html
Checking for Charset header.
     check grep -qi CONTENT-TYPE: text/html; *charset=UTF-8 /tmp/mod_pagespeed_test.jefftk/fetched_directory/wget_output.txt
      failure at line 483
FAIL.

I think this is trying to modify a header in response to seeing something in the body. This doesn't work with our current code because we don't even see the body until after the headers have been sent.

To reproduce:

curl -D- -s -H ModPagespeedFilters:convert_meta_tags  http://localhost:8050/mod_pagespeed_example/convert_meta_tags.html

The charset should have been moved from the meta tag to the Content-Type header, but it won't have been.

I'm going to try this in apache and see where we're different.

fixed in 3927541