Skip to content

Prevent unnecessary redirects by ignoring case sensitivity in canonical URL comparison #2844

@marevol

Description

@marevol

The current logic in the FessXpathTransformer class checks if the current URL matches the canonical URL specified in the document. If they are not equal, it initiates a redirect to the canonical URL. However, this comparison is case-sensitive, which can lead to unnecessary redirects when the URLs only differ in case (e.g., example.com/Page vs example.com/page).

This issue becomes more problematic when multibyte characters are URL-encoded, and only the case of English letters differs. To prevent these unnecessary redirects, we should use a case-insensitive comparison for the canonical URL check.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions