Uploaded image for project: 'Fedora Repository Project'
  1. Fedora Repository Project
  2. FCREPO-2694

fcr:metadata endpoint lists timemaps incorrectly

    XMLWordPrintable

    Details

      Description

      While reviewing FCREPO-2690 I noticed that if you GET the description of a binary it has some incorrect headers.

      > curl -i http://localhost:8080/rest/binaryVersion/fcr:metadata
      HTTP/1.1 200 OK
      Date: Tue, 06 Mar 2018 00:02:56 GMT
      ETag: W/"fe17af263d6a9bb04bff914eb3fd98d34dd501e4"
      Last-Modified: Fri, 02 Mar 2018 20:09:34 GMT
      Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
      Link: <http://www.w3.org/ns/ldp#RDFSource>;rel="type"
      Vary: Accept
      Vary: Range
      Vary: Accept-Encoding
      Vary: Accept-Language
      Vary: Accept-Datetime
      Link: <http://localhost:8080/rest/binaryVersion>; rel="describes"
      Link: <http://fedora.info/definitions/fcrepo#VersionedResource>; rel="type"
      Link: <http://localhost:8080/rest/binaryVersion/fcr:metadata>; rel="timegate"
      Link: <http://localhost:8080/rest/binaryVersion/fcr:metadata/fcr:versions>; rel="timemap"
      Accept-Patch: application/sparql-update
      Allow: HEAD,GET,DELETE,PUT,PATCH,OPTIONS
      Preference-Applied: return=representation
      Vary: Prefer
      Content-Type: text/turtle;charset=utf-8
      Content-Length: 1887
      Server: Jetty(9.3.1.v20150714)

      The wrong one is

      Link: <http://localhost:8080/rest/binaryVersion/fcr:metadata/fcr:versions>; rel="timemap"

      This is my fault, but it should check if it is a NonRdfSource description and if so use the binary as the resource.

      https://github.com/fcrepo4/fcrepo4/blob/memento-versioning/fcrepo-http-api/src/main/java/org/fcrepo/http/api/ContentExposingResource.java#L449

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              whikloj Jared Whiklo
              Reporter:
              whikloj Jared Whiklo
              Reviewer:
              Danny Bernstein
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: