Display of image annotations fails in presence of a HTTP-to-HTTPS redirection #1257
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
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.
The text was updated successfully, but these errors were encountered: