tus / draft-digest-fields-problem-types

An Internet Draft defining Problem Types for Digest Fields
https://tus.github.io/draft-digest-fields-problem-types/draft-kleidl-digest-fields-problem-types.html
Other
1 stars 1 forks source link

Unsupported algorithm: one or all? #18

Closed Acconut closed 3 weeks ago

Acconut commented 1 month ago

The draft currently says (emphasis mine):

This section defines the "https://iana.org/assignments/http-problem-types#unsupported-hashing-algorithm" problem type. A server MAY use this problem type if it wants to communicate to the client that one of the hashing algorithms referenced in the integrity or integrity preference fields present in the request is not supported.

In https://github.com/tus/draft-digest-fields-problem-types/pull/13#discussion_r1691777434, @ioggstream mentioned that we might want to change it to say

A server MAY use this problem type if it wants to communicate to the client that none of the hashing algorithms referenced in the integrity or integrity preference fields present in the request is not supported.

How should a server react if it receives integrity fields with unsupported and supported algorithms? The server might ignore the unsupported algorithms and handle just the supported ones. Or it might return this problem type and reject the request entirely.

Or should this problem type only be used of none of the requested algorithms are supported?

ioggstream commented 1 month ago

Thinking it twice, the server is free to ignore any algorithm, even if supported.

The server could explicitly mention in the response if (none|one) of the provided algorithms triggered the error.

Acconut commented 1 month ago

Thinking it twice, the server is free to ignore any algorithm, even if supported.

I agree. In that case we can keep the text as it is right now and close this issue. Does that sound good to you?