opacapp/opacclient

SISIS Dresden

StefRe opened this issue · 3 comments

StefRe commented

Since about 2-3 days, the app no longer shows any lent items etc.

The reason seems to be that httpGet in account retrieves a truncated version of the library site without the actually lent items, see the following example (had to rename it to .txt to be able to upload it here):
account.html.txt.

Any thoughts about what could be the reason?

$${\textbf{\color{red}Returned by app:}}$$

grafik

$${\textbf{\color{red}Returned by browser:}}$$

grafik

I have not seen that yet, no :(

StefRe commented

It seems to me that the jsp hasn't yet completely build up the page when it is downloaded - does this make any sense?

Retrieving the account data looks like this in the browser:
image
When I try to replicate the first and third call with Python I get exactly the same incomplete html as the opacapp does, so it appears that most probably they changed something in the opac setup in Dresden.

StefRe commented

I found the culprit: one needs to include the Accept-Language header at least in the get that gets the account items. It doesn't play any role what language you indicate (e.g. de-DE), it even works with * (= any language). That's why I think we can simply add .header("Accept-Language", "*")to the httpGet method in the OkHttpBaseApi and hope that it shouldn't do any harm with other APIs.