gusmobile

Unnamed repository; edit this file 'description' to name the repository.
git clone git://code.clttr.info/gusmobile.git
Log | Files | Refs | LICENSE

commit a252aed301aa182a19571465c725a832530f95c7
parent c2be5b45fb0576857cc0a5fe7ef2e5f43a740ae0
Author: Natalie Pendragon <natpen@natpen.net>
Date:   Sun, 24 May 2020 08:28:41 -0400

Fail more gracefully on missing meta in success responses

Diffstat:
Mgusmobile/client.py | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/gusmobile/client.py b/gusmobile/client.py @@ -137,6 +137,9 @@ def fetch(raw_url): # Handle success assert status.startswith("2") + if len(header_split) < 2: + print("ERROR: Success status requires a meta value in header!") + return mime = meta if mime == "": mime = "text/gemini; charset=utf-8"