Skip to content

Commit fe3c8a0

Browse files
committed
build: use https links
1 parent eded901 commit fe3c8a0

File tree

3 files changed

+2539
-2539
lines changed

3 files changed

+2539
-2539
lines changed

scripts/fetch-iana.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,14 +102,14 @@ function addTemplateData (data, options) {
102102
}
103103

104104
return function * get () {
105-
var res = yield * cogent('http://www.iana.org/assignments/media-types/' + data.template, { retries: 3 })
105+
var res = yield * cogent('https://www.iana.org/assignments/media-types/' + data.template, { retries: 3 })
106106
var ref = data.type + '/' + data.name
107107
var rfc = getRfcReferences(data.reference)[0]
108108

109109
if (res.statusCode === 404 && data.template !== ref) {
110110
console.log('template ' + data.template + ' not found, retry as ' + ref)
111111
data.template = ref
112-
res = yield * cogent('http://www.iana.org/assignments/media-types/' + ref, { retries: 3 })
112+
res = yield * cogent('https://www.iana.org/assignments/media-types/' + ref, { retries: 3 })
113113

114114
// replace the guessed mime
115115
if (res.statusCode === 200) {
@@ -119,7 +119,7 @@ function addTemplateData (data, options) {
119119

120120
if (res.statusCode === 404 && rfc !== undefined) {
121121
console.log('template ' + data.template + ' not found, fetch ' + rfc)
122-
res = yield * cogent('http://tools.ietf.org/rfc/' + rfc.toLowerCase() + '.txt')
122+
res = yield * cogent('https://tools.ietf.org/rfc/' + rfc.toLowerCase() + '.txt')
123123
}
124124

125125
if (res.statusCode === 404) {
@@ -223,7 +223,7 @@ function extractTemplateExtensions (body) {
223223
}
224224

225225
function * get (type, options) {
226-
var res = yield * cogent('http://www.iana.org/assignments/media-types/' + encodeURIComponent(type) + '.csv', { retries: 3 })
226+
var res = yield * cogent('https://www.iana.org/assignments/media-types/' + encodeURIComponent(type) + '.csv', { retries: 3 })
227227

228228
if (res.statusCode !== 200) {
229229
throw new Error('got status code ' + res.statusCode + ' from ' + type)
@@ -381,6 +381,6 @@ function normalizeHeader (val) {
381381

382382
function parseReferences (reference) {
383383
return getUrlReferences(reference).concat(getRfcReferences(reference).map(function (rfc) {
384-
return 'http://tools.ietf.org/rfc/' + rfc.toLowerCase() + '.txt'
384+
return 'https://tools.ietf.org/rfc/' + rfc.toLowerCase() + '.txt'
385385
}))
386386
}

src/custom-types.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"application/ecmascript": {
1515
"compressible": true,
1616
"sources": [
17-
"http://tools.ietf.org/rfc/rfc4329.txt",
18-
"http://www.iana.org/assignments/media-types/application/ecmascript"
17+
"https://tools.ietf.org/rfc/rfc4329.txt",
18+
"https://www.iana.org/assignments/media-types/application/ecmascript"
1919
]
2020
},
2121
"application/edi-x12": {
@@ -39,8 +39,8 @@
3939
"application/geo+json": {
4040
"extensions": ["geojson"],
4141
"sources": [
42-
"http://tools.ietf.org/rfc/rfc7946.txt",
43-
"http://www.iana.org/assignments/media-types/application/geo+json"
42+
"https://tools.ietf.org/rfc/rfc7946.txt",
43+
"https://www.iana.org/assignments/media-types/application/geo+json"
4444
]
4545
},
4646
"application/gzip": {
@@ -824,7 +824,7 @@
824824
"charset": "UTF-8",
825825
"compressible": true,
826826
"sources": [
827-
"http://tools.ietf.org/html/draft-pantos-http-live-streaming-13"
827+
"https://tools.ietf.org/html/draft-pantos-http-live-streaming-13"
828828
]
829829
},
830830
"text/x-gwt-rpc": {

0 commit comments

Comments
 (0)