thorium-reader
thorium-reader copied to clipboard
LCP: handle the html renewal mode
If the server serves an html page as renew link in the status document, the app fails, displaying:

The app should handle this case, display the html page full screen in the app (this is where the loan extension request is processed), propose a close button, return to the initial state (the info panel or the library view depending the chosen UX).
HTML renew
(i.e. instead of the LSD HTTP POST
request) is currently handled by opening an external web browser. We simply test for the text/html
or application/xml+xhtml
link type
(which maps to HTTP content-type
header).
The screenshot above shows HTTP status code 405
( https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405 ) which suggests that an incorrect POST
/ GET
/ PUT
request was issued to the LSD server.
@llemeurfr could you please share the publication that exposes such HTML renew
link? Thank you!
Note to devs (LSD link type
check):
https://github.com/readium/readium-desktop/blob/aacfe6bbd33db5623a01cfb2939713b6015c8790/src/main/services/lcp.ts#L323-L325
@llemeurfr Laurent, it would be great if the refactored / latest evolution of the LCP server (Go implementation) could include HTML renew links, for testing?
The LCP Server can easily be configured so that Status documents contain a specific renew URL. The corresponding config parameter is license_status/renew_page_url.
I tested the solution with a simple URL. A new tab is open, great.