Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
> curl -i -H"Link: <file:///local/file/storage/wonderful.tiff>; rel=\"http://fedora.info/definitions/fcrepo#ExternalContent\"; handling=\"proxy\"; type=\"image/tiff\"" -XPUT -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/test_proxy_local_file
HTTP/1.1 201 Created
Date: Fri, 29 Jun 2018 14:15:54 GMT
Set-Cookie: JSESSIONID=aedg7ilmx9zxugi8x9em7l8h;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Thu, 28-Jun-2018 14:15:54 GMT
ETag: "0e409de61b53a864ad3a87f4faf884d88cf041ff"
Last-Modified: Fri, 29 Jun 2018 14:15:55 GMT
Link: <http://localhost:8080/rest/test_proxy_local_file/fcr:metadata>; rel="describedby"; anchor="http://localhost:8080/rest/test_proxy_local_file"
Link: <http://localhost:8080/static/constraints/NonRDFSourceConstraints.rdf>; rel="http://www.w3.org/ns/ldp#constrainedBy"
Content-Location: file:/local/file/storage/wonderful.tiff
Link: <http://localhost:8080/rest/test_proxy_local_file/fcr:acl>; rel="acl"
Location: http://localhost:8080/rest/test_proxy_local_file
Content-Type: text/plain
Content-Length: 48
Server: Jetty(9.3.1.v20150714)

http://localhost:8080/rest/test_proxy_local_file

HEAD request against the LDP-NRResults of a request

Code Block
> curl -Ii http://localhost:8080/rest/test_proxy_local_file -ufedoraAdmin:fedoraAdmin
HTTP/1.1 200 OK
Date: Fri, 29 Jun 2018 1416:1740:5648 GMT
Set-Cookie: JSESSIONID=1xkerzmclrq7vytfzi60zbjvizhy7150ie8vo1bsc9ycb1ghu1;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Thu, 28-Jun-2018 1416:1740:5648 GMT
ETag: "0e409de61b53a864ad3a87f4faf884d88cf041ff"
Last-Modified: Fri, 29 Jun 2018 14:15:55 GMT
Content-Type: image/tiff
Accept-Ranges: bytes
Content-Disposition: attachment; filename=""; creation-date="Fri, 29 Jun 2018 14:15:55 GMT"; modification-date="Fri, 29 Jun 2018 14:15:55 GMT"; size=14761236
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://www.w3.org/ns/ldp#NonRDFSource>;rel="type"
Link: <http://localhost:8080/rest/test_proxy_local_file/fcr:acl>; rel="acl"
Content-Location: file:/localUsers/filewhikloj/storageDesktop/wonderful.tiff
Link: <http://localhost:8080/rest/test_proxy_local_file/fcr:metadata>; rel="describedby"
Link: <http://localhost:8080/static/constraints/NonRDFSourceConstraints.rdf>; rel="http://www.w3.org/ns/ldp#constrainedBy"
Accept-External-Content-Handling: copy,redirect,proxy
Allow: DELETE,HEAD,GET,PUT,OPTIONS
Cache-Control: no-transform, must-revalidate, max-age=0
Content-Length: 14761236
Server: Jetty(9.3.1.v20150714)

...<BODY CONTENT>...


Redirect to an external URI

Creating the redirect LDP-NR

Code Block
> curl -i -H"Link: <http://localhost:8111/wonderful.jp2>; rel=\"http://fedora.info/definitions/fcrepo#ExternalContent\"; handling=\"redirect\"; type=\"image/jp2\"" -XPUT -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/test_redirect_remote_file
HTTP/1.1 201 Created
Date: Fri, 29 Jun 2018 16:11:16 GMT
Set-Cookie: JSESSIONID=1rv3ytcylpb093ra1mhznx9dp;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Thu, 28-Jun-2018 16:11:16 GMT
ETag: "009b79832d68313dd45ca6aab0528b34f9054713"
Last-Modified: Fri, 29 Jun 2018 16:11:16 GMT
Link: <http://localhost:8080/rest/test_redirect_remote_file/fcr:metadata>; rel="describedby"; anchor="http://localhost:8080/rest/test_redirect_remote_file"
Link: <http://localhost:8080/static/constraints/NonRDFSourceConstraints.rdf>; rel="http://www.w3.org/ns/ldp#constrainedBy"
Content-Location: http://localhost:8111/wonderful.jp2
Link: <http://localhost:8080/rest/test_redirect_remote_file/fcr:acl>; rel="acl"
Location: http://localhost:8080/rest/test_redirect_remote_file
Content-Type: text/plain
Content-Length: 52
Server: Jetty(9.3.1.v20150714)

http://localhost:8080/rest/test_redirect_remote_file

Results of a request

Code Block
> curl -i http://localhost:8080/rest/test_redirect_remote_file -ufedoraAdmin:fedoraAdmin -L
HTTP/1.1 307 Temporary Redirect
Date: Fri, 29 Jun 2018 16:11:59 GMT
Set-Cookie: JSESSIONID=cg9yt3o4whnmmxe9vllwerdz;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Thu, 28-Jun-2018 16:11:59 GMT
ETag: "009b79832d68313dd45ca6aab0528b34f9054713"
Last-Modified: Fri, 29 Jun 2018 16:11:16 GMT
Content-Type: image/jp2
Accept-Ranges: bytes
Content-Disposition: attachment; filename=""; creation-date="Fri, 29 Jun 2018 16:11:16 GMT"; modification-date="Fri, 29 Jun 2018 16:11:16 GMT"; size=305517
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://www.w3.org/ns/ldp#NonRDFSource>;rel="type"
Link: <http://localhost:8080/rest/test_redirect_remote_file/fcr:acl>; rel="acl"
Content-Location: http://localhost:8111/wonderful.jp2
Link: <http://localhost:8080/rest/test_redirect_remote_file/fcr:metadata>; rel="describedby"
Link: <http://localhost:8080/static/constraints/NonRDFSourceConstraints.rdf>; rel="http://www.w3.org/ns/ldp#constrainedBy"
Accept-External-Content-Handling: copy,redirect,proxy
Allow: DELETE,HEAD,GET,PUT,OPTIONS
Location: http://localhost:8111/wonderful.jp2
Content-Length: 305517
Server: Jetty(9.3.1.v20150714)

HTTP/1.1 200 OK
Date: Fri, 29 Jun 2018 16:12:59 GMT
Server: Apache/2.4.29 (Unix) PHP/7.2.4
Last-Modified: Fri, 29 Jun 2018 16:09:29 GMT
ETag: "4a96d-56fca128f2040"
Accept-Ranges: bytes
Content-Length: 305517

...<BODY CONTENT>...


Copy a remote resource

Create the LDP-NR using external content

Code Block
> curl -i -H"Link: <http://localhost:8111/wonderful.jp2>; rel=\"http://fedora.info/definitions/fcrepo#ExternalContent\"; handling=\"copy\"; type=\"image/jp2\"" -XPUT -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/test_copy_remote_file
HTTP/1.1 201 Created
Date: Fri, 29 Jun 2018 16:19:45 GMT
Set-Cookie: JSESSIONID=1hmga57f6q5hh1td785dghsjfh;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Thu, 28-Jun-2018 16:19:45 GMT
ETag: "d9cc4f3b266a19f0c225356a5caabb9080d680b4"
Last-Modified: Fri, 29 Jun 2018 16:19:45 GMT
Link: <http://localhost:8080/rest/test_copy_remote_file/fcr:metadata>; rel="describedby"; anchor="http://localhost:8080/rest/test_copy_remote_file"
Link: <http://localhost:8080/static/constraints/NonRDFSourceConstraints.rdf>; rel="http://www.w3.org/ns/ldp#constrainedBy"
Link: <http://localhost:8080/rest/test_copy_remote_file/fcr:acl>; rel="acl"
Location: http://localhost:8080/rest/test_copy_remote_file
Content-Type: text/plain
Content-Length: 48
Server: Jetty(9.3.1.v20150714)

http://localhost:8080/rest/test_copy_remote_file

Results of a request

Code Block
> curl -i http://localhost:8080/rest/test_copy_remote_file -ufedoraAdmin:fedoraAdmin 
HTTP/1.1 200 OK
Date: Fri, 29 Jun 2018 16:39:56 GMT
Set-Cookie: JSESSIONID=h0ywas10h63p1340ajakqp1vy;Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Thu, 28-Jun-2018 16:39:56 GMT
ETag: "d9cc4f3b266a19f0c225356a5caabb9080d680b4"
Last-Modified: Fri, 29 Jun 2018 16:19:45 GMT
Content-Type: image/jp2
Accept-Ranges: bytes
Content-Disposition: attachment; filename=""; creation-date="Fri, 29 Jun 2018 16:19:45 GMT"; modification-date="Fri, 29 Jun 2018 16:19:45 GMT"; size=305517
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://www.w3.org/ns/ldp#NonRDFSource>;rel="type"
Link: <http://localhost:8080/rest/test_copy_remote_file/fcr:acl>; rel="acl"
Link: <http://localhost:8080/rest/test_copy_remote_file/fcr:metadata>; rel="describedby"
Link: <http://localhost:8080/static/constraints/NonRDFSourceConstraints.rdf>; rel="http://www.w3.org/ns/ldp#constrainedBy"
Accept-External-Content-Handling: copy,redirect,proxy
Allow: DELETE,HEAD,GET,PUT,OPTIONS
Cache-Control: no-transform, must-revalidate, max-age=0
Content-Length: 305517
Server: Jetty(9.3.1.v20150714)

...<BODY CONTENT>...