[Django] #25778: Update docs links to use https

26 views
Skip to first unread message

Django

unread,
Nov 19, 2015, 11:10:28 AM11/19/15
to django-...@googlegroups.com
#25778: Update docs links to use https
------------------------------------------------+------------------------
Reporter: timgraham | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Keywords:
Triage Stage: Accepted | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 1
UI/UX: 0 |
------------------------------------------------+------------------------
Search the docs for links using "http:" and update them to "https:" for
all sites that support it.

--
Ticket URL: <https://code.djangoproject.com/ticket/25778>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Nov 19, 2015, 11:55:25 AM11/19/15
to django-...@googlegroups.com
#25778: Update docs links to use https
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner:
Type: | andersonresende
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master
Severity: Normal | Resolution:

Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by andersonresende):

* owner: nobody => andersonresende
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/25778#comment:1>

Django

unread,
Nov 29, 2015, 12:47:50 PM11/29/15
to django-...@googlegroups.com
#25778: Update docs links to use https
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner:
Type: | andersonresende
Cleanup/optimization | Status: assigned
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by jdufresne):

* cc: jon.dufresne@… (added)
* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/25778#comment:2>

Django

unread,
Dec 1, 2015, 8:02:26 AM12/1/15
to django-...@googlegroups.com
#25778: Update docs links to use https
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner:
Type: | andersonresende
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* 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>

Django

unread,
Dec 1, 2015, 8:04:16 AM12/1/15
to django-...@googlegroups.com
#25778: Update docs links to use https
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner:
Type: | andersonresende
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
Dec 1, 2015, 8:39:21 AM12/1/15
to django-...@googlegroups.com
#25778: Update docs links to use https
-------------------------------------+-------------------------------------
Reporter: timgraham | Owner:
Type: | andersonresende
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
Jan 29, 2020, 12:05:02 AM1/29/20
to django-...@googlegroups.com
#25778: Update docs links to use https
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Anderson
Type: | Resende
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
Jan 29, 2020, 12:07:36 AM1/29/20
to django-...@googlegroups.com
#25778: Update docs links to use https
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Anderson
Type: | Resende
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
Jan 29, 2020, 3:34:49 AM1/29/20
to django-...@googlegroups.com
#25778: Update docs links to use https
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Anderson
Type: | Resende
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
Jan 29, 2020, 3:36:25 AM1/29/20
to django-...@googlegroups.com
#25778: Update docs links to use https
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Anderson
Type: | Resende
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Django

unread,
Nov 29, 2023, 5:56:37 AM11/29/23
to django-...@googlegroups.com
#25778: Update docs links to use https
-------------------------------------+-------------------------------------
Reporter: Tim Graham | Owner: Anderson
Type: | Resende
Cleanup/optimization | Status: closed
Component: Documentation | Version: dev
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------

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>

Reply all
Reply to author
Forward
0 new messages