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

UrlDownloader cannot handle URLs without port definition #87

Closed
aalmiray opened this issue Feb 4, 2021 · 1 comment
Closed

UrlDownloader cannot handle URLs without port definition #87

aalmiray opened this issue Feb 4, 2021 · 1 comment
Assignees
Labels
bug Something isn't working released Issue has been released
Milestone

Comments

@aalmiray
Copy link
Contributor

aalmiray commented Feb 4, 2021

If an URL has no port then the value -1 will be returned. This results in the following exception

Exception in thread "main" java.lang.IllegalArgumentException: port out of range:-1
	at java.base/java.net.InetSocketAddress.checkPort(InetSocketAddress.java:153)
	at java.base/java.net.InetSocketAddress.<init>(InetSocketAddress.java:234)
	at org.moditect.layrry.config.UrlDownloader.setupProxy(UrlDownloader.java:115)
	at org.moditect.layrry.config.UrlDownloader.download(UrlDownloader.java:48)
	at org.moditect.layrry.config.LayersConfigLoader.loadConfig(LayersConfigLoader.java:102)
	at org.moditect.layrry.config.LayersConfigLoader.loadConfig(LayersConfigLoader.java:66)
	at org.moditect.layrry.Layrry.run(Layrry.java:48)
	at org.moditect.layrry.launcher.LayrryLauncher.launch(LayrryLauncher.java:70)
	at org.moditect.layrry.launcher.LayrryLauncher.main(LayrryLauncher.java:41)

Solution: check the value of the given port and use url.getDefaultPort() if needed.

@aalmiray aalmiray added the bug Something isn't working label Feb 4, 2021
@aalmiray aalmiray self-assigned this Feb 4, 2021
aalmiray added a commit to aalmiray/layrry that referenced this issue Feb 4, 2021
@gunnarmorling gunnarmorling added this to the 1.0.0.Beta1 milestone Feb 8, 2021
@github-actions github-actions bot added the released Issue has been released label Oct 31, 2022
@github-actions
Copy link
Contributor

Released in v1.0.0.Alpha2 -> https://github.com/moditect/layrry/releases/tag/v1.0.0.Alpha2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Issue has been released
Projects
None yet
Development

No branches or pull requests

2 participants