Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
marevol opened this issue Sep 26, 2024 · 0 comments
Assignees
Milestone

Comments

@marevol
Copy link
Contributor

marevol commented Sep 26, 2024

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.

@marevol marevol added this to the 14.17.0 milestone Sep 26, 2024
@marevol marevol self-assigned this Sep 26, 2024
marevol added a commit that referenced this issue Sep 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant