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

Display of image annotations fails in presence of a HTTP-to-HTTPS redirection #1257

Open
gouttegd opened this issue Jan 16, 2025 · 0 comments
Assignees
Labels
Status: Reproduced For issues that are (critical) bugs, denotes that the bug is reproduced, but no further action taken Type: Bug Indicates that Protege is not working as expected

Comments

@gouttegd
Copy link
Collaborator

When the value of an annotation is a URL that looks like it is pointing to an image, Protégé can fetch and display the remote image in the annotations view, instead of the URL (commit 2d6c0e6).

But this does not work if a cross-protocol redirection is required to fetch the image. For example, if the original URL is a plain HTTP url but the server returns a redirection to a HTTPS URL; in that case, the fetch fails, and Protégé displays a “warning” icon instead.

This is seemingly due to a conscious design decision in the JDK networking API: only follow redirects as long as the same protocol is used, never follow them from one protocol to another (HTTPS is considered a different protocol than HTTP in that context). In case of a cross-protocol redirect, “it’s the application’s responsibility to follow the redirect.”

So ideally, Protégé should explicitly handle the case where an image URL is redirected to a different protocol.

Failing that, it should at least detect that it was not able to fetch the remote image, and fallback to display the URL instead.

@gouttegd gouttegd self-assigned this Jan 16, 2025
@gouttegd gouttegd added Type: Bug Indicates that Protege is not working as expected Status: Reproduced For issues that are (critical) bugs, denotes that the bug is reproduced, but no further action taken labels Jan 16, 2025
@gouttegd gouttegd changed the title Display image annotations fail in presence of a HTTP-to-HTTPS redirection Display of image annotations fails in presence of a HTTP-to-HTTPS redirection Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Reproduced For issues that are (critical) bugs, denotes that the bug is reproduced, but no further action taken Type: Bug Indicates that Protege is not working as expected
Projects
None yet
Development

No branches or pull requests

1 participant