Skip to content

Support */* Accept header for RDF data #276

Closed

Description

@jvherweg

The BasicResponseWriter errors when it receives non-binary data, so we should make sure this never happens. Currently it can still happen with an */* accept header if the backend returns a stream of Quads.

Activity

  1. added
    🐛 bug
    on Oct 20, 2020
  2. RubenVerborgh commented on Oct 21, 2020

    @RubenVerborgh
  3. RubenVerborgh commented on Nov 3, 2020

    @RubenVerborgh
    Member

    What I suggest here is a default expansion of the Accept header. Basically, a text/turtle=0.01 can be added silently, if no text/* or text/turtle occurs in the request.

    So perhaps an optional setting of defaultContentType to the header parser?

  4. jvherweg commented on Nov 4, 2020

    @jvherweg
    MemberAuthor

    This woul be a fix for the demo, but the problem with this solution is that it would also convert json-ld documents if no Accept header was given, and I think we always want to return the original input document if no change is requested.

    In my opinion the most correct solution would convert data somewhere between the DataAccessor and the ResponseWriter if a) the data has content-type internal/quads and b) this is not one of the requested types in the preferences. So we only pass around quads if it has been specifically requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛 bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions