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

DELETE DATA sparql-updates appear to succeed but don't happen

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Fedora 6.0.0
    • Fix Version/s: Fedora 6.0.0
    • Component/s: f4-core
    • Labels:

      Description

      If you attempt to use a PATCH request with a statement using DELETE DATA it returns the 204 No Content response but did not actually change anything. This happens with both normal users and admin users.

      The below example works because there is an ACL allowing testuser read/write access at http://localhost:8080/rest/test_indirect/336ca60e-d771-47c7-bba7-eaaf667556a2

       

      > curl -utestuser:testpass http://localhost:8080/rest/test_indirect/336ca60e-d771-47c7-bba7-eaaf667556a2/indirect
      @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
      @prefix fedora: <http://fedora.info/definitions/v4/repository#> .
      @prefix ldp: <http://www.w3.org/ns/ldp#> .
      @prefix dc: <http://purl.org/dc/elements/1.1/> .

      <http://localhost:8080/rest/test_indirect/336ca60e-d771-47c7-bba7-eaaf667556a2/indirect>
      ldp:insertedContentRelation <http://example.org/test#something> ;
      dc:title "The indirect container" ;
      ldp:hasMemberRelation <http://example.org/test#predicateToCreate> ;
      ldp:membershipResource <http://localhost:8080/rest/test_indirect/336ca60e-d771-47c7-bba7-eaaf667556a2/mockTarget> ;
      rdf:type ldp:RDFSource ;
      rdf:type ldp:Container ;
      rdf:type fedora:Container ;
      rdf:type fedora:Resource ;
      fedora:created "2020-05-08T18:22:01.397496Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
      fedora:lastModified "2020-05-08T18:29:16.946769Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
      rdf:type ldp:IndirectContainer .

       

      > curl -i -utestuser:testpass -XPATCH -H"Content-type: application/sparql-update" --data "prefix ldp: <http://www.w3.org/ns/ldp#> DELETE DATA { <> ldp:membershipResource <http://localhost:8080/rest/test_indirect/336ca60e-d771-47c7-bba7-eaaf667556a2/mockTarget> }" http://localhost:8080/rest/test_indirect/336ca60e-d771-47c7-bba7-eaaf667556a2/indirect
      HTTP/1.1 204 No Content
      Date: Fri, 08 May 2020 18:31:40 GMT
      Set-Cookie: JSESSIONID=node0npx9jrp3wbiy845m0csbmc0n134.node0; Path=/
      Expires: Thu, 01 Jan 1970 00:00:00 GMT
      Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Thu, 07-May-2020 18:31:40 GMT
      ETag: W/"F560D3C6690B4CF9C661C9F89B9F3A60"
      X-State-Token: F560D3C6690B4CF9C661C9F89B9F3A60
      Last-Modified: Fri, 08 May 2020 18:29:16 GMT
      Server: Jetty(9.4.24.v20191120)

       

      > curl -utestuser:testpass http://localhost:8080/rest/test_indirect/336ca60e-d771-47c7-bba7-eaaf667556a2/indirect
      @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
      @prefix fedora: <http://fedora.info/definitions/v4/repository#> .
      @prefix ldp: <http://www.w3.org/ns/ldp#> .
      @prefix dc: <http://purl.org/dc/elements/1.1/> .

      <http://localhost:8080/rest/test_indirect/336ca60e-d771-47c7-bba7-eaaf667556a2/indirect>
      ldp:insertedContentRelation <http://example.org/test#something> ;
      dc:title "The indirect container" ;
      ldp:hasMemberRelation <http://example.org/test#predicateToCreate> ;
      ldp:membershipResource <http://localhost:8080/rest/test_indirect/336ca60e-d771-47c7-bba7-eaaf667556a2/mockTarget> ;
      rdf:type ldp:RDFSource ;
      rdf:type ldp:Container ;
      rdf:type fedora:Container ;
      rdf:type fedora:Resource ;
      fedora:created "2020-05-08T18:22:01.397496Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
      fedora:lastModified "2020-05-08T18:31:40.401404Z"^^<http://www.w3.org/2001/XMLSchema#dateTime> ;
      rdf:type ldp:IndirectContainer .

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support