Skip to content

Commit

Permalink
fix #2844 Ignore case sensitivity in canonical URL comparison to prev…
Browse files Browse the repository at this point in the history
…ent unnecessary redirects
  • Loading branch information
marevol committed Sep 26, 2024
1 parent 3dec731 commit 25f7144
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ protected Map<String, Object> processAdditionalData(final Map<String, Object> da
final Document document) {
// canonical
final String canonicalUrl = getCanonicalUrl(responseData, document);
if (canonicalUrl != null && !canonicalUrl.equals(responseData.getUrl()) && isValidUrl(canonicalUrl)
if (canonicalUrl != null && !canonicalUrl.equalsIgnoreCase(responseData.getUrl()) && isValidUrl(canonicalUrl)
&& isValidCanonicalUrl(responseData.getUrl(), canonicalUrl)) {
final Set<RequestData> childUrlSet = new HashSet<>();
childUrlSet.add(RequestDataBuilder.newRequestData().get().url(canonicalUrl).build());
Expand Down

0 comments on commit 25f7144

Please sign in to comment.