Fix legacy CNET download link
This commit is contained in:
parent
7edb2f21bc
commit
6bb370c7fd
|
@ -57,6 +57,13 @@ def legacy_download():
|
||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
form = request.form
|
form = request.form
|
||||||
else:
|
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
|
form = request.args
|
||||||
|
|
||||||
method = form.get("method", "index")
|
method = form.get("method", "index")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user