--
Ticket URL: <https://code.djangoproject.com/ticket/25778>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* owner: nobody => andersonresende
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/25778#comment:1>
* cc: jon.dufresne@… (added)
* has_patch: 0 => 1
--
Ticket URL: <https://code.djangoproject.com/ticket/25778#comment:2>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"7aabd6238028f4bb78d0687bbccc97bcf634e28b" 7aabd62]:
{{{
#!CommitTicketReference repository=""
revision="7aabd6238028f4bb78d0687bbccc97bcf634e28b"
Fixed #25778 -- Updated docs links to use https when available.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25778#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"bf76cf07e0e0713020974f47dacfaddcedbe1abf" bf76cf07]:
{{{
#!CommitTicketReference repository=""
revision="bf76cf07e0e0713020974f47dacfaddcedbe1abf"
[1.9.x] Fixed #25778 -- Updated docs links to use https when available.
Backport of 7aabd6238028f4bb78d0687bbccc97bcf634e28b from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25778#comment:4>
Comment (by jdufresne):
For future reference, here is the quick and (extremely) dirty script I
used to search and replace these URLs. I also did a manual check of the
final diff and had to make some slight corrections. Feel free to use
however you find convenient.
{{{
#!/usr/bin/env python3
import os
import re
import requests
import subprocess
import urllib
URL_RE = re.compile(br'http://[a-z0-9.]+')
EXCLUDE = [
'.git',
]
done = set()
for dirpath, dirnames, filenames in os.walk(os.getcwd()):
j = 0
for i, dn in enumerate(dirnames):
if dn in EXCLUDE:
del dirnames[i - j]
j += 1
for fn in filenames:
if fn.endswith('.mo'):
continue
path = os.path.join(dirpath, fn)
print('%s' % path)
with open(path, 'rb') as fp:
for line in fp:
pos = 0
# TODO: Ports?
while True:
match = URL_RE.search(line, pos)
if not match:
break
pos = match.end()
old = match.group(0).decode('ascii')
if old not in done:
o1 = urllib.parse.urlparse(old)
new = 'https://%s' % o1.netloc
print(' checking %s' % new)
try:
r = requests.head(new, allow_redirects=True,
verify=True, timeout=10)
except (requests.exceptions.ConnectionError,
requests.exceptions.SSLError,
requests.exceptions.InvalidURL,
requests.exceptions.ReadTimeout):
pass
else:
if r.status_code == 200:
o2 = urllib.parse.urlparse(r.url)
# Check didn't redirect to http.
if o2.scheme == 'https':
print(' %s -> %s' % (old, new))
# Works with https
subprocess.check_call([
'find',
os.getcwd(),
'-name', '.git', '-prune', '-o',
'(',
'-type', 'f',
'-not', '-name', '*.mo',
')',
'-exec',
'sed',
'-i',
'-e',
's|%s|%s|g' % (old, new),
'{}',
';'
])
done.add(old)
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25778#comment:5>
Comment (by GitHub <noreply@…>):
In [changeset:"32166a9f7c8afd6d34ff7e7c0a13a46a6eedcc5e" 32166a9f]:
{{{
#!CommitTicketReference repository=""
revision="32166a9f7c8afd6d34ff7e7c0a13a46a6eedcc5e"
Refs #25778 -- Updated sphinx-doc.org links to HTTPS.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25778#comment:6>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"d346f075d06aeb501ddbc3f6a0870c78bea1a9e9" d346f075]:
{{{
#!CommitTicketReference repository=""
revision="d346f075d06aeb501ddbc3f6a0870c78bea1a9e9"
[3.0.x] Refs #25778 -- Updated sphinx-doc.org links to HTTPS.
Backport of 32166a9f7c8afd6d34ff7e7c0a13a46a6eedcc5e from master.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25778#comment:7>
Comment (by GitHub <noreply@…>):
In [changeset:"0ac8ac8b0dece68072548900e992fc31493154c1" 0ac8ac8]:
{{{
#!CommitTicketReference repository=""
revision="0ac8ac8b0dece68072548900e992fc31493154c1"
Refs #25778 -- Updated some links to HTTPS and new locations.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25778#comment:8>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"27e4ebc0baa0c522a2ac7758e9dba4f654eac8fe" 27e4ebc]:
{{{
#!CommitTicketReference repository=""
revision="27e4ebc0baa0c522a2ac7758e9dba4f654eac8fe"
[3.0.x] Refs #25778 -- Updated some links to HTTPS and new locations.
Backport of 0ac8ac8b0dece68072548900e992fc31493154c1 from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25778#comment:9>
Comment (by Mariusz Felisiak <felisiak.mariusz@…>):
In [changeset:"272ceb9584a68c7df464e8633c02eb4f997da092" 272ceb9]:
{{{
#!CommitTicketReference repository=""
revision="272ceb9584a68c7df464e8633c02eb4f997da092"
Refs #25778 -- Updated some links and references to HTTPS.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/25778#comment:10>