solve an infinite loop with certificate 6X

This commit is contained in:
Ploum 2023-12-18 10:11:17 +01:00
parent ba5f6ecb91
commit 1ed8ba749e
2 changed files with 8 additions and 3 deletions

View File

@ -1,5 +1,10 @@
# Offpunk History
## 2.2 - Unpublished
- netcache : solve an infinite gemini loop with code 6X (see also bug #31)
## 2.1 - December 15th 2023
- freshly updated gemtext/rss links are highlighted ("new_link" theme option)
- offpunk : new "copy title" and "copy link" function

View File

@ -731,9 +731,9 @@ def _fetch_gemini(url,timeout=DEFAULT_TIMEOUT,interactive=True,accept_bad_ssl_ce
raise RuntimeError(meta)
# Client cert
elif status.startswith("6"):
print("Handling certificates for status 6X are not supported by offpunk\n")
print("See bug #31 for discussion about the problem")
_fetch_gemini(url)
error = "Handling certificates for status 6X are not supported by offpunk\n"
error += "See bug #31 for discussion about the problem"
raise RuntimeError(error)
# Invalid status
elif not status.startswith("2"):
raise RuntimeError("Server returned undefined status code %s!" % status)