Kareadita / Kavita

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
http://www.kavitareader.com
GNU General Public License v3.0
6.23k stars 323 forks source link

HTTP Requests to OPDS URL Fail with 406 when Accept-Encoding Header Set to Prevent Compression #1627

Closed Rvby1 closed 1 year ago

Rvby1 commented 1 year ago

Describe the bug When using certain applications like KOReader to request traffic from a Kavita server using the OPDS URL, you get errors. These seem to occur when the application specifically prevents compression in its Accept-Encoding header, which causes the Kavita server to return Error 406. According to Mozilla specifications, this should never happen.

https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Encoding https://www.rfc-editor.org/rfc/rfc2616#section-14.3

Link to KoReader Gitter Chat: https://gitter.im/koreader/koreader

To Reproduce

  1. Use any system that utilizes OPDS to request content with Accept-Encoding set to prevent compression (KOReader, for example).
  2. Note that a 406 error is returned, causing the operation to fail.

Expected behavior When a request is sent to the OPDS URL with Accept-Encoding set to prevent compression, content should just be sent without compression.

Desktop (please complete the following information):

Rvby1 commented 1 year ago

Embarrassing as it is, issue was that I didn't have OPDS enabled. I thought this feature was on by default due to Tachiyomi using the OPDS URL and working, but Tachiyomi does not actually use ODPS. Enabling this has caused KoReader and other systems to work perfectly.