Skip to content

Commit

Permalink
Better escaping of double slashes in urls (for better hitrate) (@jool…
Browse files Browse the repository at this point in the history
  • Loading branch information
aricwatson authored and aricwatson committed Jul 15, 2015
1 parent d19f608 commit 86d1aaf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -403,4 +403,5 @@ Magento CE 1.8+ or EE 1.13+, see [these instructions](https://github.com/nexcess
* Removed session generation code in VCL - see issue #345
* [#586] Updated debug helper (@magedev)
* [#848] Replace Nexcessnet_Turpentine_Model_Dummy_Request with Magento model (@craigcarnell)
* [#849] escape | character (@craigcarnell)
* [#849] escape | character (@craigcarnell)
* Better escaping of double slashes in urls (for better hitrate) (@joolswills)
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ sub vcl_recv {
}

# remove double slashes from the URL, for higher cache hit rate
set req.url = regsuball(req.url, "(.*)//+(.*)", "\1/\2");
set req.url = regsuball(req.url, "([^:])//+", "\1/");

# check if the request is for part of magento
if (req.url ~ "{{url_base_regex}}") {
Expand Down

0 comments on commit 86d1aaf

Please sign in to comment.