Pārlūkot izejas kodu

Fix legacy CNET download link

pull/2/head
Noah Petherbridge pirms 4 gadiem
vecāks
revīzija
6bb370c7fd
1 mainītis faili ar 7 papildinājumiem un 0 dzēšanām
  1. +7
    -0
      kirsle_legacy.py

+ 7
- 0
kirsle_legacy.py Parādīt failu

@@ -57,6 +57,13 @@ def legacy_download():
if request.method == "POST":
form = request.form
else:
# CNET links to the MS-DOS download using semicolon delimiters in the
# query string. Fix that if detected.
query = request.query_string.decode()
if not '&' in query and ';' in query:
url = re.sub(r';|%3b', '&', request.url, flags=re.IGNORECASE)
return redirect(url)

form = request.args

method = form.get("method", "index")


Notiek ielāde…
Atcelt
Saglabāt