You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We migrated a DSpace instance from version 6 to version 7.6.2 and discovered that old URLs with spaces in bitstream filenames are not redirecting to the file in the D7 deployment. This issue only occurs in D7 version.
Describe the bug
We migrated a DSpace instance from version 6 to version 7.6.2 and discovered that old URLs with spaces in bitstream filenames are not redirecting to the file in the D7 deployment. This issue only occurs in D7 version.
Example legacy URL that fails to redirect to bitstream
Old DSpace URL with space: https://tspace.library.utoronto.ca/bitstream/1807/68628/1/Powers%20of%20Exclusion%20Intro.pdf
Fails to redirect to https://utoronto.scholaris.ca/server/api/core/bitstreams/662429cf-2bc7-4efc-9e73-9302dbf3a7e1/content
This legacy URL is accessed through Google Scholar: https://scholar.google.ca/citations?view_op=view_citation&hl=en&user=zAF9iOEAAAAJ&citation_for_view=zAF9iOEAAAAJ:UeHWp8X0CEIC
Tried with Brave Browser, Firefox, Safari with same results
The spaces in the filename are encoded twice
%20
resulting in%2520
character.To Reproduce
Steps to reproduce the behavior:
/bitstream/{prefix}/{suffix}/{sequenceId}/{filename}
Expected behavior
It should redirect to the bitstream instead of a 404 error.
Example legacy URL that successfully redirects to bitstream
Old DSpace URL without spaces: https://tspace.library.utoronto.ca/bitstream/1807/67582/1/images-of-community.pdf
Successfully redirects to https://utoronto.scholaris.ca/server/api/core/bitstreams/37c6806d-7c26-4fc8-a08e-5a251d2b8552/content
This legacy URL is accessed through Google Scholar:
https://scholar.google.ca/citations?view_op=view_citation&hl=en&user=zAF9iOEAAAAJ&citation_for_view=zAF9iOEAAAAJ:u-x6o8ySG0sC
Related work
We are currently working on a PR to
dspace-7_x
branch.Encoding
encodeURIComponent
in bitstream-data.service.ts#L174 needs to be removed:RequestParam is already encoding filename
The text was updated successfully, but these errors were encountered: