Describe the bug
Discovered via Testathon, but I've reproduced it locally as well.
When using the OAI Harvester feature as any user, the feature always returns an error response. The backend error is always
2026-04-14 17:12:15,526 INFO 28a920d5-0cf4-4dd0-b17b-aab07d347ede e8d10cad-9564-4727-8494-5e644a7aeef8 org.dspace.app.rest.utils.DSpaceAPIRequestLoggingFilter @ Before request [PUT /server/api/core/collections/5c91d3a5-00ed-462f-b88f-78e45b5ffa6e/harvester] originated from /collections/5c91d3a5-00ed-462f-b88f-78e45b5ffa6e/edit/source
[Fatal Error] :-1:-1: Premature end of file.
2026-04-14 17:12:15,786 ERROR 28a920d5-0cf4-4dd0-b17b-aab07d347ede e8d10cad-9564-4727-8494-5e644a7aeef8 org.dspace.app.rest.exception.DSpaceApiExceptionControllerAdvice @ Unprocessable or invalid entity (status:422)
org.dspace.app.rest.exception.UnprocessableEntityException: Incorrect harvest settings in request. The following errors were found: [invalidAddress: OAI server could not be reached.]
at org.dspace.app.rest.repository.HarvestedCollectionRestRepository.update(HarvestedCollectionRestRepository.java:99)
at org.dspace.app.rest.CollectionHarvestSettingsController.updateHarvestSettingsEndpoint(CollectionHarvestSettingsController.java:115)
(Be sure to notice the odd "Premature end of file error" that's buried in between the initial PUT request and the ERROR stacktrace)
To Reproduce
Steps to reproduce the behavior:
- Login as an Admin
- Create a new Collection for harvesting
- Edit Collection and go to the "Content Source" tab.
- Check the checkbox which says "This collection harvests its content from an external source"
- Now, fill out the required information. For example, I used this simple setup:
- OAI Provider:
https://demo.dspace.org/server/oai/request
- OAI specific set id:
col_123456789_1131 (NOTE: This is the Collection called "DCAT Test Papers")
- Metadata Format:
Simple Dublin Core
- Click "Save"
- You'll see an error appear in the UI saying the "provided settings were tested and did not work". The error in the backend logs will be the one I've shared above.
NOTE: This also appears to be reproducible on https://demo.dspace.org. So, I believe it also impacts 9.x
Expected behavior
Harvesting should obviously work again.
Describe the bug
Discovered via Testathon, but I've reproduced it locally as well.
When using the OAI Harvester feature as any user, the feature always returns an error response. The backend error is always
(Be sure to notice the odd "Premature end of file error" that's buried in between the initial PUT request and the ERROR stacktrace)
To Reproduce
Steps to reproduce the behavior:
https://demo.dspace.org/server/oai/requestcol_123456789_1131(NOTE: This is the Collection called "DCAT Test Papers")Simple Dublin CoreNOTE: This also appears to be reproducible on https://demo.dspace.org. So, I believe it also impacts 9.x
Expected behavior
Harvesting should obviously work again.