HEAD requests via the HANDLE urls return a HTTP code status of 200 instead of 301 (redirect) #4042
Labels
affects: main
Issue impacts "main" (latest release).
affects: 8.x
Issue impacts 8.x releases
bug
claimed: 4Science
4Science team is working on this issue & will contribute back
component: SEO
Search Engine Optimization
high priority
Describe the bug
We are seeing differences between DSpace 7.x and DSpace 8.x in returned http code statuses for handle URLs when doing HEAD requests as opposed to GET requests. The following curl examples show that DSpace 7.x returns as expected a 301 whereas DSpace 8.1 return a 200 code instead.
DSpace 7.6.2: curl -L -I https://diamond-oa.lib.cam.ac.uk/handle/1812/183
DSpace 8.1: curl -L -I https://diamond-f-dev.lib.cam.ac.uk/handle/1812/183
This affects retrieving metadata via signposting links when using the HEAD command (as recommended) as the status code returned is 200 and redirects are not followed to retrieve the link headers.
This affects the PCI Endorsement Notify workflow (see PR #3735 )
Something must have changed between versions.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The return response should be 301 for HEAD requests of handle based URLs.
Related work
Link to any related tickets or PRs here.
The text was updated successfully, but these errors were encountered: