This adds a requirement for a DID Resolution Result HTTP response to set a Content-Type header to indicate that it is a DID Resolution Result, as specified in DID Resolution:
Without the Content-Type header, a resolver-client might expect the response to be a DID Document rather than a DID Resolution Result, as https://w3c-ccg.github.io/did-resolution/#bindings-https currently specifies that if the Accept header is not used, the HTTP response body contains the DID Document (didDocumentStream) rather than the DID Resolution Result object. Determining the response type from the response body (content sniffing) would be possible, but it may be preferable to rely on the Content-Type header. With this header set, a client can determine that they've received a DID Resolution Result object rather than a DID document, without having to parse the response body.
This adds a requirement for a DID Resolution Result HTTP response to set a Content-Type header to indicate that it is a DID Resolution Result, as specified in DID Resolution:
Setting this Content-Type header is proposed in a PR to the ION implementation: https://github.com/decentralized-identity/ion/pull/244.
Without the Content-Type header, a resolver-client might expect the response to be a DID Document rather than a DID Resolution Result, as https://w3c-ccg.github.io/did-resolution/#bindings-https currently specifies that if the Accept header is not used, the HTTP response body contains the DID Document (
didDocumentStream
) rather than the DID Resolution Result object. Determining the response type from the response body (content sniffing) would be possible, but it may be preferable to rely on the Content-Type header. With this header set, a client can determine that they've received a DID Resolution Result object rather than a DID document, without having to parse the response body.