Specify resolution result Content-Type #1168
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: decentralized-identity/ion#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.