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

Fix HTTP Redirects in the launcher when fetching JFX versions #1711

Merged
merged 3 commits into from
Mar 19, 2024

Conversation

ThisIsBrady
Copy link
Member

@ThisIsBrady ThisIsBrady commented Mar 19, 2024

HttpURLConnection does not handle redirects from HTTP to HTTPS. This PR fixes being unable to fetch JavaFX versions from the update site when a redirect across protocols occurs. Handles the HTTP 307 and 308 responses by following the redirect.

This leaves only HTTP 300 and 304 unhandled. 300 could be handled by choosing the Location field if it exists on the response. 304 should never be seen here and would require caching a previous response.

@leMaik
Copy link
Member

leMaik commented Mar 19, 2024

Thank you! 👏 I didn't test this and just assumed that a permanent redirects would just work when I added it to my update site.

@leMaik leMaik merged commit 609db8c into chunky-dev:master Mar 19, 2024
1 check passed
@ThisIsBrady ThisIsBrady deleted the launcher-http-307-fix branch April 7, 2024 05:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants