ailiboy / ebookdroid

Automatically exported from code.google.com/p/ebookdroid
0 stars 0 forks source link

OPDS: dismisses port in URL #304

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Add URL for calibre OPDS feed including port number, e.g. 
http://foo:8080/opds
2. Download feed (works), click on "By newest" to obtain book listing
3. Display indicates "not found"

What is the expected output?
I expect to see a list of my books.

What do you see instead?
An error message indicating "not found" or simply a "Connecting..." window.

What version of the product are you using?
v1.5.1

On what operating system?
Android 4.1

What device are you using?
Nexus 7

Please provide any additional information below.

It appears the host name is extracted from the URL to resolve relative links in 
the XML:

<entry>
    <title>By Authors</title>
    <id>calibre-navcatalog:810d28ab48d4596c6183132df5e11e26bee8d4d7</id>
    <updated>2012-09-05T10:13:06+00:00</updated>
    <content type="text">Books sorted by Authors</content>
    <link href="/opds/navcatalog/4e617574686f7273" type="application/atom+xml;type=feed;profile=opds-catalog"/>
  </entry>

However, the port is not extracted correctly, as indicated by adb logcat:

D/EBookDroid.HTTP( 6572): Connecting to: 
http://foo/opds/navcatalog/4f6e6577657374
E/EBookDroid.OPDS( 6572): Error on OPDS catalog access: null

Note that ebookdroid should connect to http://foo:8080/ instead of http://foo/. 
On a side note, using an IP adress in the URL instead of a proper host name 
results in an error message indicating that domain can't be null.

Kind regards,

Michael

Original issue reported on code.google.com by michhaa...@googlemail.com on 5 Sep 2012 at 10:36

GoogleCodeExporter commented 9 years ago
Fixed in trunk. Try 1.5.2-dev

Original comment by Alexander.V.Kasatkin@gmail.com on 5 Sep 2012 at 11:49