diff --git a/pyproject.toml b/pyproject.toml index 8690347..8eaefb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pyotr" -version = "0.6.0" +version = "0.7.0" description = "Python OpenAPI-to-REST (and back) framework " authors = ["Berislav Lopac "] license = "MIT" diff --git a/src/pyotr/validation/responses/starlette.py b/src/pyotr/validation/responses/starlette.py index 2136a5c..ab4b742 100644 --- a/src/pyotr/validation/responses/starlette.py +++ b/src/pyotr/validation/responses/starlette.py @@ -8,8 +8,9 @@ class StarletteOpenAPIResponseFactory: @classmethod def create(cls, response): """Create Starlette response.""" + mimetype, *_ = response.headers.get("content-type", "").split(";") return OpenAPIResponse( data=response.body, status_code=response.status_code, - mimetype=response.headers.get("content-type"), + mimetype=mimetype, )