geometer / FBReaderJ

Official FBReaderJ project repository
http://www.fbreader.org/FBReaderJ/
1.83k stars 802 forks source link

"Add catalog" functionality treats server port specification in URLs as part of domain name #489

Open fabacab opened 5 years ago

fabacab commented 5 years ago

I'm not sure if this is the correct place to report this issue, so if not please direct me to the correct place. Hopefully this will reach the FBReader devs.

Adding a custom OPDS catalog manually via the "Network library -> Add catalog" interface will fail with error "Failed to resolve host" when the server publishing the OPDS catalog does not use the default port for the protocol.

For example, an OPDS catalog accessible at http://example.com:8080/opds cannot be added to FBReader because the :8080 seems to be treated as part of the domain name. Of course, a domain name example.com:8080 does not exist in DNS, because the : separates the domain name from the port number and 8080 is the port number on which the server is listening for incoming requests.

The behavior I expected is that the URL string entered by the user be parsed with port numbers correctly.

Thanks for a wonderful project.