diff --git a/docs/release-notes/whats-new-3.rst b/docs/release-notes/whats-new-3.rst index 6b64c7ca22..a076ebc8f6 100644 --- a/docs/release-notes/whats-new-3.rst +++ b/docs/release-notes/whats-new-3.rst @@ -194,3 +194,13 @@ Removal of deprecated ``litestar.middleware.exceptions`` module and ``ExceptionH The deprecated ``litestar.middleware.exceptions`` module and the ``ExceptionHandlerMiddleware`` have been removed. Since ``ExceptionHandlerMiddleware`` has been applied automatically behind the scenes if necessary, no action is required. + + +Update MessagePack media type to ``application/vnd.msgpack`` +------------------------------------------------------------ + +Change the media type of :attr:`~enums.MediaType.MESSAGEPACK` and +:attr:`~enums.RequestEncodingType.MESSAGEPACK` from ``application/x-msgpack`` to the +newly introduced official ``application/vnd.msgpack``. + +https://www.iana.org/assignments/media-types/application/vnd.msgpack diff --git a/litestar/enums.py b/litestar/enums.py index a8d9c2daf9..3f0a83fc8f 100644 --- a/litestar/enums.py +++ b/litestar/enums.py @@ -28,7 +28,7 @@ class MediaType(str, Enum): """An Enum for ``Content-Type`` header values.""" JSON = "application/json" - MESSAGEPACK = "application/x-msgpack" + MESSAGEPACK = "application/vnd.msgpack" HTML = "text/html" TEXT = "text/plain" CSS = "text/css" @@ -46,7 +46,7 @@ class RequestEncodingType(str, Enum): """An Enum for request ``Content-Type`` header values designating encoding formats.""" JSON = "application/json" - MESSAGEPACK = "application/x-msgpack" + MESSAGEPACK = "application/vnd.msgpack" MULTI_PART = "multipart/form-data" URL_ENCODED = "application/x-www-form-urlencoded"