With this PR, 5.x round-tripping of external content now works. I've created two new integration tests that cover both "redirect" and "proxy" handling methods for external content.
To test this manually:
Start up a clean repo
create a resource that references external content using the redirect method.
… 1.0.
Resolves: https://jira.duraspace.org/browse/FCREPO-3017
With this PR, 5.x round-tripping of external content now works. I've created two new integration tests that cover both "redirect" and "proxy" handling methods for external content.
To test this manually:
curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/redirect -i curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/redirect/fcr:metadata -i
create text file at /path/to/local/file/test.txt first
echo "test" > /tmp/test.txt
curl -X PUT -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/proxy-local -H "Link: <file:/tmp/test.txt>; rel=\"http://fedora.info/definitions/fcrepo#ExternalContent\"; handling=\"proxy\"; type=\"text/plain\"" -i
curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/proxy-local -i curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/proxy-local/fcr:metadata -i
curl -X PUT -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/proxy-remote -H "Link: https://www.lyrasis.org/SiteAssets/lyrasis.png; rel=\"http://fedora.info/definitions/fcrepo#ExternalContent\"; handling=\"proxy\"; type=\"image/png\"" -i
curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/proxy-remote -i curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/proxy-remote/fcr:metadata -i
java -jar ~/code/fcrepo-import-export/target/fcrepo-import-export-0.4.0-SNAPSHOT.jar --mode export --predicates "http://www.w3.org/ns/ldp#contains" --resource "http://localhost:8080/rest" --versions --binaries --rdfLang "text/turtle" --dir export-dir -u fedoraAdmin:fedoraAdmin
java -jar ~/code/fcrepo-import-export/target/fcrepo-import-export-0.4.0-SNAPSHOT.jar --mode import --predicates "http://www.w3.org/ns/ldp#contains" --resource "http://localhost:8080/rest" --versions --binaries --rdfLang "text/turtle" --dir export-dir -u fedoraAdmin:fedoraAdmin
curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/redirect -i curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/redirect/fcr:metadata -i
curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/proxy-local -i curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/proxy-local/fcr:metadata -i
curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/proxy-remote -i curl -u fedoraAdmin:fedoraAdmin http://localhost:8080/rest/proxy-remote/fcr:metadata -i