Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

space between filter names in server header PageSpeedFilters forces server header PageSpeed: off to be ignored #979

GoogleCodeExporter opened this issue Apr 6, 2015 · 3 comments


Copy link

@GoogleCodeExporter GoogleCodeExporter commented Apr 6, 2015

What steps will reproduce the problem?
1.  with php code at :

header("PageSpeed: off");
header("PageSpeedFilters: -defer_javascript, -remove_comments");
echo "hello world\n";


2. curl -v ""

What is the expected output? What do you see instead?

Expected pagespeed to be disabled for this request, and X-Mod-Pagespeed header 
should not be included in the resultant headers

the actual output is:

* Hostname was NOT found in DNS cache
*   Trying
* Connected to ( port 8081 (#0)
> GET /blank/test.php HTTP/1.1
> User-Agent: curl/7.35.0
> Host:
> Accept: */*
< HTTP/1.1 200 OK
< Date: Tue, 02 Sep 2014 22:14:11 GMT
* Server Apache/2.4.7 (Ubuntu) is not blacklisted
< Server: Apache/2.4.7 (Ubuntu)
< X-Powered-By: PHP/5.5.9-1ubuntu4.3
< PageSpeed: off
< PageSpeedFilters: -defer_javascript, -remove_comments
< Vary: Accept-Encoding
< X-Mod-Pagespeed:
< Cache-Control: max-age=0, no-cache
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/html
hello world

What version of the product are you using (please check X-Mod-Pagespeed

On what operating system?

Ubuntu 14.04.1 LTS

Which version of Apache?


Which MPM?


URL of broken page:

Original issue reported on by on 2 Sep 2014 at 10:19

Copy link

@GoogleCodeExporter GoogleCodeExporter commented Apr 6, 2015

Hi -- seems reasonable to strip the whitespace before processing, so this is a 
valid bug report.

However, I just want to make sure you are aware that you can solve the problem 
by removing the excess spaces.

Original comment by on 3 Sep 2014 at 2:29

  • Changed state: Accepted
  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect
Copy link

@GoogleCodeExporter GoogleCodeExporter commented Apr 6, 2015

Ya, working around it internally. Removing spaces, or removing the 
PageSpeedFilters altogether when PageSpeed: off is set. Go's default behavior 
for handling multiple values for the same http header is to join with comma and 
spaces, causing headaches to handle the special case. 

Original comment by on 3 Sep 2014 at 2:50

Copy link

@GoogleCodeExporter GoogleCodeExporter commented Apr 6, 2015

This issue was closed by revision r4339.

Original comment by on 6 Nov 2014 at 3:12

  • Changed state: Fixed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant