This repository was archived by the owner on Feb 23, 2019. It is now read-only.
Additional Home URLs (of Page Cache) not Purging #357
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When working correctly the Additional Home URLs field under Page Cache will purge content for mirrored domains. However, prior to this bug fix it didn't working correctly. It only purged from the domain that it was currently processing from.
Why the Problem Occurs
When constructing the mirror URL for purging, the code forgot to check to make sure that the user had provided a trailing slash for these additional home URLs. Because it neither checked nor added a trailing slash, the user's additional non-trailing slashed home URLs were being concatenated with the non-leading slashed paths, resulting in final URLs that were malformed – no purge for these additional URLs.