Skip to content

Commit

Permalink
Update MessagPack media type
Browse files Browse the repository at this point in the history
  • Loading branch information
provinzkraut committed Sep 14, 2024
1 parent 206b585 commit 4c06aa4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions docs/release-notes/whats-new-3.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions litestar/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"

Expand Down

0 comments on commit 4c06aa4

Please sign in to comment.