Uploaded image for project: 'Marmotta'
  1. Marmotta
  2. MARMOTTA-426

Sparql Update POST urlencoded expects wrong parameter

    XMLWordPrintableJSON

    Details

      Description

      According to the 1.1 Sparql protocol spec table at:
      http://www.w3.org/TR/sparql11-protocol/#query-operation

      A urlencoded post should use the "query" parameter for the query, currently marmotta seems to be using the "update" parameter which is wrong.
      This causes the user to get a 400 reponse saying with the (currently confusing) message "no SPARQL query specified"

      Test that reproduces this below:

          @Test
          public void testUpdate() throws IOException, InterruptedException {
      
              String insert =
                      "PREFIX dc: <http://purl.org/dc/elements/1.1/>\n" +
                      "INSERT DATA { <http://example/egbook3> dc:title \"This is an example title\" }";
      
              expect().
                  log().ifError().
                      statusCode(200).
                      given().
                      contentType("application/x-www-form-urlencoded").
                      header("Accept", "application/xml").
                      formParameter("query", insert).
                      when().
                      post("/sparql/update");
          }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                wikier Sergio Fernández
                Reporter:
                francisdb Francis De Brabandere
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: