I've been running calibre-server 4.20 behind Apache using digest authentication with no problems. But I wanted the sync feature to work so I got rid of digest authentication and setup the calibre user database. Now I'm having trouble with the Viewer webapp. I've cleared the browser cache, credentials, etc but the problem persists.
All catalog browsing functions appear to work and downloading always works, but when a book is selected and "Read" is pressed, I see this error error in the browser: (firefox)
Code:
Could not download book
Could not open MyBook. Failed to download some book data, click "Show details" for more information
Details:
Code:
OEBPS/Text/vde31.05.xhtml
Failed to communicate with "/book-file/827/EPUB/789472/15944457100/OEBPS/Text%2Fvde31.05.xhtml? library_id=Calibre_Library&1594651600287", with status: [400 (error)] Bad Request
The uri in the Request Line and the Authorization header do not match
From the system log
Code:
server calibre-server[1636444]: Authorization URI mismatch:
(u'book-file', u'827', u'EPUB', u'789472', u'15944457100', u'OEBPS', u'Text', u'vde31.05.xhtml')
!=
(u'book-file', u'827', u'EPUB', u'789472', u'15944457100', u'OEBPS', u'Text/vde31.05.xhtml')
from client: 127.0.0.1
Calibre server is started from a systemd script:
Code:
[Unit]
Description=calibre content server
After=network.target
[Service]
Type=simple
User=calibre
Group=calibre
ExecStart=/opt/calibre/calibre-server \
--port 8082 \
--listen-on 127.0.0.1 \
--userdb /etc/httpd/calibre.sqlite \
--enable-auth \
"/share/Calibre Library"
[Install]
WantedBy=multi-user.target
Apache configuration:
Code:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
<VirtualHost *:80>
ServerName calibre.myserver.com
AllowEncodedSlashes On
ProxyPreserveHost On
ProxyPass "/" http://localhost:8082/
</VirtualHost>
To make the problem more mysterious, some titles in my collection work ok with the Viewer. But all of them worked before I switched to using the built-in calibre user database instead of apache authentication.
Thanks for any insights.