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

Mod PageSpeed fails to retrieve combined objects with error, "Invalid escaped URL segment" #380

GoogleCodeExporter opened this issue Apr 6, 2015 · 11 comments


Copy link

What steps will reproduce the problem?
1. Upload the attached HTML document (pagespeed_test.html) to a pagespeed 
enabled server
2. Enable the PageSpeed filter combine_javascript
3. Create two bogus javascript files, /example_1.js and /example_2.js at the 
web document root. The contents of these files does not matter.
4. Access http://servername/pagespeed_test.html twice.

What is the expected output? What do you see instead?
Expected Behavior: The combined JavaScript file should be created and 
accessible by pagespeed.

Actual Behavior: PagSpeed combines the JavaScript files, but the combined file 
is inaccessible.  The HTTP response code is 404 when the browser makes the 
below request: 

The following error is present in the appache error log:
[Thu Feb 09 11:19:26 2012] [error] [mod_pagespeed @2121] Invalid 
escaped URL segment: example_1.js%2bexample_2.js

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

On what operating system?
# cat /etc/SuSE-release
openSUSE 11.4 (x86_64)
VERSION = 11.4
CODENAME = Celadon

# uname -a
Linux linux-ghzy #1 SMP PREEMPT 2011-07-21 02:17:24 +0200 
x86_64 x86_64 x86_64 GNU/Linux

Which version of Apache?
Apache/2.2.17 (Linux/SUSE)

Which MPM?

Please provide any additional information below, especially a URL or an
HTML file that exhibits the problem.

We are running the mod_pagespeed engine on Apache as a reverse-proxy to our web 

We did not see this issue in the previously released version:

We see the same error when mod_pagespeed combines CSS files, however we had 
more difficulty reproducing this issue with CSS imports.

The issue may be unique to our environment.  We would be glad to provide more 
details if required.

Original issue reported on by on 9 Feb 2012 at 5:07


Copy link

Looks like we may need to decode "%2b" -> "+" somewhere.

Original comment by on 9 Feb 2012 at 6:36

Copy link

I tried your HTML/js on my stock install of and it worked correctly, 
no error messages.

Could you please provide your pagespeed.conf, edited to obfuscate as necessary?

Original comment by on 9 Feb 2012 at 6:38

Copy link

Another data point. The URL my Apache generated was:
which means both JS were rewritten (JS minified) then combined.
The reported URL is combined only.

Original comment by on 9 Feb 2012 at 6:52

Copy link

Also, what browser are you using? It could be that some browsers are deciding 
to escape "+" -> "%2b"

Original comment by on 9 Feb 2012 at 8:04

Copy link

I believe I have located the source of issue.  The + is being translated to a 
"%2b" by a proxy server.

We are using Oracle iPlanet web server to reverse-proxy requests to the Apache 
mod_pagespeed service.  The proxy server is encoding the + (as requested by the 
browser) to "%2b".

When the browser requests content directly from the apache server it is 
retrieved successfully.

Interestingly this setup worked fine with the previous version of mod_pagespeed 
(i.e. pagespeed was able to decode/translate the encoded URL to the combined 

I can gladly provide the pagespeed.conf file if you feel it would provide value 
to this case, but I believe this should be enough information to determine how 
you would like to proceed.

Thank you,


Original comment by on 9 Feb 2012 at 8:27

Copy link

No, you've found the problem. I know we changed encoding rules recently so we 
will start looking there.
Other than disabling combining, do you have a work-around?

Original comment by on 9 Feb 2012 at 8:56

Copy link

Our current work-around is to revert to mod_pagespeed version

Original comment by on 9 Feb 2012 at 9:19

Copy link

Jan has fixed this bug and it is available now in trunk, and will be released 

Original comment by on 10 May 2012 at 7:54

  • Changed state: Fixed
  • Added labels: release-note

Copy link

Original comment by on 22 May 2012 at 7:24

  • Added labels: Milestone-v22

Copy link

I have confirmed the fix in the binary release

Thank you,

Eric Achelis

Original comment by on 1 Jun 2012 at 9:18

Copy link

Thanks for double-checking the fix, Eric.  Marking as Verified.

Original comment by on 4 Jun 2012 at 2:22

  • Changed state: Verified

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