There was an error while loading. Please reload this page.
1 parent f2e9b51 commit 31b6582Copy full SHA for 31b6582
1 file changed
micropip/package_index.py
@@ -250,16 +250,14 @@ def _select_parser(
250
"""
251
Select the function to parse the response based on the content type.
252
253
- match content_type:
+ main_content_type = content_type.split(';')[0].strip()
254
+
255
+ match main_content_type:
256
case "application/vnd.pypi.simple.v1+json":
257
return ProjectInfo.from_simple_json_api
258
case "application/json":
259
return ProjectInfo.from_json_api
- case (
- "application/vnd.pypi.simple.v1+html"
260
- | "text/html"
261
- | "text/html; charset=utf-8"
262
- ):
+ case "application/vnd.pypi.simple.v1+html" | "text/html":
263
return partial(
264
ProjectInfo.from_simple_html_api,
265
pkgname=pkgname,
0 commit comments