Skip to content

dag-json test requires X-Content-Type-Options which is not part of the spec #257

@achingbrain

Description

@achingbrain

The test TestNativeDag/GET_response_for_application%2Fvnd.ipld.dag-json_has_expected_Content-Type/Header_X-Content-Type-Options has the following hint:

Make sure expected HTTP headers are returned with the dag- block·········
Error: Header 'X-Content-Type-Options' expected one element (includes nosniff hint)

The spec says of the X-Content-Type-Options header:

X-Content-Type-Options: nosniff should be returned with application/vnd.ipld.car and application/vnd.ipld.raw responses to indicate that the Content-Type should be followed and not be changed. This is a security feature, ensures that non-executable binary response types are not used in <script> and <style> HTML tags.

It makes no reference to application/vnd.ipld.dag-json so there's either a gap in the spec or the test is incorrect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions