~sotirisp/qute-gemini

5f81a61618afa7d592978b181b7201d68966000d — Sotiris Papatheodorou 9 months ago 79a3ae5
Fix mime_type being used before assignment
1 files changed, 2 insertions(+), 2 deletions(-)

M qute-gemini
M qute-gemini => qute-gemini +2 -2
@@ 141,9 141,9 @@ def gemini_fetch_url(url: str) -> Tuple[str, str]:
    error_msg = ""
    # 2x Success
    if status.startswith("2"):
        # Decode according to declared charset
        media_type, media_type_opts = cgi.parse_header(meta)
        if meta.startswith("text/gemini"):
            # Decode according to declared charset
            media_type, media_type_opts = cgi.parse_header(meta)
            content = fp.read()
            content = content.decode(media_type_opts.get("charset", "UTF-8"))
        else: