Skip to content

HEAD requests via the HANDLE urls return a HTTP code status of 200 instead of 301 (redirect) #4042

@amgciadev

Description

@amgciadev

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:

  1. See curl commands above to test across DSpace versions

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.

Metadata

Metadata

Labels

affects: 7.xIssue impacts 7.x releasesaffects: 8.xIssue impacts 8.x releasesaffects: mainIssue impacts "main" (latest release).bugclaimed: 4Science4Science team is working on this issue & will contribute backcomponent: SEOSearch Engine Optimizationhigh priority

Type

Projects

Status

✅ Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions