Uploaded image for project: 'Blazegraph (by SYSTAP)'
  1. Blazegraph (by SYSTAP)
  2. BLZG-718

UpdateServlet fails to parse MIMEType when doing conneg.

    Details

      Description

      There is a bug/feature in the Bigdata UpdateServlet line 520:

      final RDFFormat format = RDFFormat.forMIMEType(contentType);
      

      If you use a separate Content-Type header, then the contentType variable in that place will contain exactly the string you inserted in the header. That string isn't parsed. So if you happened to use something like this:

      Content-Type: text/turtle; charset=UTF-8

      Then the code will call:

      final RDFFormat format = RDFFormat.forMIMEType("text/turtle; charset=UTF-8");
      

      ... which in turn won't work, because RDFFormat doesn't do content type parsing either. Only Content-Type: text/turtle will work. AFAIU, for proper processing of non-ASCII data, the charset MUST be specified in the overall headers of the HTTP request, as in the example in point 1.

        Activity

        Hide
        bryanthompson bryanthompson added a comment -

        I checked the code for all invocations of

        final RDFFormat format = RDFFormat.forMIMEType(contentType);
        

        I identified several other locations where the same problem exists:


        - UpdateServlet
        - DeleteServlet
        - InsertServlet
        - AST2BOpUpdate (SPARQL LOAD operation).

        All locations have been fixed.

        Committed revision r6714.

        Show
        bryanthompson bryanthompson added a comment - I checked the code for all invocations of final RDFFormat format = RDFFormat.forMIMEType(contentType); I identified several other locations where the same problem exists: - UpdateServlet - DeleteServlet - InsertServlet - AST2BOpUpdate (SPARQL LOAD operation). All locations have been fixed. Committed revision r6714.

          People

          • Assignee:
            bryanthompson bryanthompson
            Reporter:
            bryanthompson bryanthompson
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: