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.
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.