fix/refac: stt default content type

This commit is contained in:
Timothy Jaeryang Baek
2025-12-22 09:45:55 +04:00
parent 7f0ca8c4b7
commit 4ab917c74b
3 changed files with 6 additions and 3 deletions

View File

@@ -622,6 +622,10 @@ def strict_match_mime_type(supported: list[str] | str, header: str) -> Optional[
supported = [s for s in supported if s.strip() and "/" in s]
if len(supported) == 0:
# Default to common types if none are specified
supported = ["audio/*", "video/webm"]
match = mimeparse.best_match(supported, header)
if not match:
return None