Skip to content

Commit a4e4e7a

Browse files
chore: broadly detect json family of content-type headers
1 parent e00a169 commit a4e4e7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gitpod/_response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T:
255255
# split is required to handle cases where additional information is included
256256
# in the response, e.g. application/json; charset=utf-8
257257
content_type, *_ = response.headers.get("content-type", "*").split(";")
258-
if content_type != "application/json":
258+
if not content_type.endswith("json"):
259259
if is_basemodel(cast_to):
260260
try:
261261
data = response.json()

0 commit comments

Comments
 (0)