@@ -102,14 +102,14 @@ function addTemplateData (data, options) {
102
102
}
103
103
104
104
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 } )
106
106
var ref = data . type + '/' + data . name
107
107
var rfc = getRfcReferences ( data . reference ) [ 0 ]
108
108
109
109
if ( res . statusCode === 404 && data . template !== ref ) {
110
110
console . log ( 'template ' + data . template + ' not found, retry as ' + ref )
111
111
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 } )
113
113
114
114
// replace the guessed mime
115
115
if ( res . statusCode === 200 ) {
@@ -119,7 +119,7 @@ function addTemplateData (data, options) {
119
119
120
120
if ( res . statusCode === 404 && rfc !== undefined ) {
121
121
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' )
123
123
}
124
124
125
125
if ( res . statusCode === 404 ) {
@@ -223,7 +223,7 @@ function extractTemplateExtensions (body) {
223
223
}
224
224
225
225
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 } )
227
227
228
228
if ( res . statusCode !== 200 ) {
229
229
throw new Error ( 'got status code ' + res . statusCode + ' from ' + type )
@@ -381,6 +381,6 @@ function normalizeHeader (val) {
381
381
382
382
function parseReferences ( reference ) {
383
383
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'
385
385
} ) )
386
386
}
0 commit comments