ukwa / ukwa-pywb

GNU General Public License v3.0
11 stars 3 forks source link

Make Item In Use responses consistent #89

Open anjackson opened 2 years ago

anjackson commented 2 years ago

Items that are in use (SCU locked) give different errors depending on how they are accessed. Accessed as normal, gives a 200 response that contains, in the replay iframe, this message:

Archived Web Page Locked

The page you have requested is currently in use. Please try again later.

In contrast, accessing the mp_ frame URL directly gives a different page with a 403 response and with the same text but with a header like the calendar pages.

The former should at least respond with the same HTTP status code as the iframe, not a 200.

anjackson commented 2 years ago

For this condition, other possible status codes are 409 Conflict or 423 Locked. Using these would make reporting SCU lockouts easier.

ldbiz commented 11 months ago

@anjackson before I delve into reproducing this, do you know it still to be an issue? I note the code seems to indicate the message is only shown for 403s:

https://github.com/ukwa/ukwa-pywb/blob/master/templates/error.html#L54

anjackson commented 11 months ago

The issue description was wrong, so I've re-written it. I think this might be a long-standing issue, where the outer frame/banner page does not report the embedded page status. This is related to webrecorder/pywb#549

This is an example page you can try, using the DEV deployment of the Reading Room stack:

http://dev1.n45.wa.bl.uk:8201/en/web/19950418155600/http://portico.bl.uk/

This issue is fairly difficult to test as you need a test configuration that implements page locking. e.g. https://git.wa.bl.uk/ukwa/services/ukwa-npld-access-stack

Having re-read that related issue, it's possible that enabling PyWB's redirect_to_exact option might help.