Skip to content

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
amgciadev opened this issue Feb 27, 2025 · 2 comments
Assignees
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

Comments

@amgciadev
Copy link
Contributor

amgciadev commented Feb 27, 2025

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.

@amgciadev amgciadev added bug needs triage New issue needs triage and/or scheduling labels Feb 27, 2025
@github-project-automation github-project-automation bot moved this to 🆕 Triage in DSpace Backlog Feb 27, 2025
@atarix83
Copy link
Contributor

atarix83 commented Feb 27, 2025

@tdonohue we can take a look at this

@atarix83 atarix83 added the claimed: 4Science 4Science team is working on this issue & will contribute back label Feb 27, 2025
@tdonohue tdonohue moved this from 📋 To Do to 🏗 In Progress in DSpace 8.x and 7.6.x Maintenance Feb 27, 2025
@tdonohue tdonohue added component: SEO Search Engine Optimization affects: main Issue impacts "main" (latest release). affects: 8.x Issue impacts 8.x releases and removed needs triage New issue needs triage and/or scheduling labels Feb 27, 2025
@tdonohue tdonohue moved this from 📋 To Do to 🏗 In Progress in DSpace 9.0 Release Apr 23, 2025
@AndreaBarbasso
Copy link
Contributor

@tdonohue, I added a comment that is relevant to this issue on this related PR: #4227.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: 🏗 In Progress
Development

No branches or pull requests

4 participants