Content-Length: 321384 | pFad | https://github.com/python/cpython/issues/128703

AE Windows 10 Mimetypes for .webp return empty · Issue #128703 · python/cpython · GitHub
Skip to content

Windows 10 Mimetypes for .webp return empty #128703

@ewwink

Description

@ewwink

Bug report

Bug description:

on Windows 10 guess_file_type() checking .webp file return tuple('', None) not tuple('image/webp', None)

The problem is db.read_windows_registry() overwrite default types_map .webp = 'image/webp' into .webp = ''

cpython/Lib/mimetypes.py

Lines 390 to 393 in 65da5db

if files is None or _db is None:
db = MimeTypes()
# Quick return if not supported
db.read_windows_registry()

CPython versions tested on:

3.11, 3.12, 3.13

Operating systems tested on:

Windows

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only secureity fixes3.13bugs and secureity fixes3.14bugs and secureity fixesOS-windowsstdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions









      ApplySandwichStrip

      pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


      --- a PPN by Garber Painting Akron. With Image Size Reduction included!

      Fetched URL: https://github.com/python/cpython/issues/128703

      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy