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

RDF documents persisted as binaries result in an exception

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Fedora 4.5.1
    • Fix Version/s: Fedora 4.6.0, Fedora 4.7.0
    • Component/s: f4-core
    • Labels:
    • Environment:
      Windows 10 (1511) x64, 1.8.0_101-b13
    • Roadmap Theme:
      API Specification
    • Sprint:
      Sprint 2016 - 16

      Description

      Creating a binary resource containing an RDF document can be achieved as follows:

      curl -X POST --data-binary "@ore.rdf" -H "Content-Type: application/rdf+xml" -H "Slug: ore.rdf" -H "Content-Disposition: attachment; filename=\"ore.rdf\"" http://localhost:8080/rest

      This creates a binary resource with mime type of application/rdf+xml as expected. Retrieving its contents via GET results in an exception, however (stack trace attached).

      The problem is that ContentExposingResource is treating the binary content in a non-opaque fashion. It appears to be parsing its contents as RDF, adding (server-managed) triples from the associated object, and returning the union graph. An exception is thrown at some point during this process.

      A possible solution is to simply treat all binary resources opaquely as bytes, eliminating the exception for RDF.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                birkland Aaron Birkland
                Reporter:
                birkland Aaron Birkland
                Reviewer:
                A. Soroka
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: