danielemery / keys

Static web app acting as a source of truth for public ssh keys, known hosts and pgp keys
2 stars 0 forks source link

Reserve content types for later use #45

Closed danielemery closed 3 months ago

danielemery commented 3 months ago

v2 is a breaking change release, it's intended that in a 2.x release content type headers will be properly supported.

In order to not require further breaking change when these are done in https://github.com/danielemery/keys/issues/33 and https://github.com/danielemery/keys/issues/34 these content types should already be reserved and 400 errors returned if requested.

This will ensure no one running v2 will rely on plain text being returned even when the content type header requests when of these other types (eg. currently in the browser the plain text response in returned, however after the change different content will be returned and this could cause breaking change issues downstream).

Bad request and a suitable error should be returned for any value of content type that is not either blank of text/plain.