chunky-dev / chunky

A path tracer to create realistic images of your Minecraft worlds.
https://chunky-dev.github.io/docs
GNU General Public License v3.0
633 stars 76 forks source link

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

Closed ThisIsBrady closed 3 months ago

ThisIsBrady commented 3 months ago

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 commented 3 months ago

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