|
|
'use strict'; |
|
|
|
|
|
function parseContentType(str) { |
|
|
if (str.length === 0) |
|
|
return; |
|
|
|
|
|
const params = Object.create(null); |
|
|
let i = 0; |
|
|
|
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (TOKEN[code] !== 1) { |
|
|
if (code !== 47 || i === 0) |
|
|
return; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
if (i === str.length) |
|
|
return; |
|
|
|
|
|
const type = str.slice(0, i).toLowerCase(); |
|
|
|
|
|
|
|
|
const subtypeStart = ++i; |
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (TOKEN[code] !== 1) { |
|
|
|
|
|
if (i === subtypeStart) |
|
|
return; |
|
|
|
|
|
if (parseContentTypeParams(str, i, params) === undefined) |
|
|
return; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
if (i === subtypeStart) |
|
|
return; |
|
|
|
|
|
const subtype = str.slice(subtypeStart, i).toLowerCase(); |
|
|
|
|
|
return { type, subtype, params }; |
|
|
} |
|
|
|
|
|
function parseContentTypeParams(str, i, params) { |
|
|
while (i < str.length) { |
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (code !== 32 && code !== 9) |
|
|
break; |
|
|
} |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
break; |
|
|
|
|
|
|
|
|
if (str.charCodeAt(i++) !== 59) |
|
|
return; |
|
|
|
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (code !== 32 && code !== 9) |
|
|
break; |
|
|
} |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
return; |
|
|
|
|
|
let name; |
|
|
const nameStart = i; |
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (TOKEN[code] !== 1) { |
|
|
if (code !== 61) |
|
|
return; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
return; |
|
|
|
|
|
name = str.slice(nameStart, i); |
|
|
++i; |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
return; |
|
|
|
|
|
let value = ''; |
|
|
let valueStart; |
|
|
if (str.charCodeAt(i) === 34) { |
|
|
valueStart = ++i; |
|
|
let escaping = false; |
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (code === 92) { |
|
|
if (escaping) { |
|
|
valueStart = i; |
|
|
escaping = false; |
|
|
} else { |
|
|
value += str.slice(valueStart, i); |
|
|
escaping = true; |
|
|
} |
|
|
continue; |
|
|
} |
|
|
if (code === 34) { |
|
|
if (escaping) { |
|
|
valueStart = i; |
|
|
escaping = false; |
|
|
continue; |
|
|
} |
|
|
value += str.slice(valueStart, i); |
|
|
break; |
|
|
} |
|
|
if (escaping) { |
|
|
valueStart = i - 1; |
|
|
escaping = false; |
|
|
} |
|
|
|
|
|
if (QDTEXT[code] !== 1) |
|
|
return; |
|
|
} |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
return; |
|
|
|
|
|
++i; |
|
|
} else { |
|
|
valueStart = i; |
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (TOKEN[code] !== 1) { |
|
|
|
|
|
if (i === valueStart) |
|
|
return; |
|
|
break; |
|
|
} |
|
|
} |
|
|
value = str.slice(valueStart, i); |
|
|
} |
|
|
|
|
|
name = name.toLowerCase(); |
|
|
if (params[name] === undefined) |
|
|
params[name] = value; |
|
|
} |
|
|
|
|
|
return params; |
|
|
} |
|
|
|
|
|
function parseDisposition(str, defDecoder) { |
|
|
if (str.length === 0) |
|
|
return; |
|
|
|
|
|
const params = Object.create(null); |
|
|
let i = 0; |
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (TOKEN[code] !== 1) { |
|
|
if (parseDispositionParams(str, i, params, defDecoder) === undefined) |
|
|
return; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
const type = str.slice(0, i).toLowerCase(); |
|
|
|
|
|
return { type, params }; |
|
|
} |
|
|
|
|
|
function parseDispositionParams(str, i, params, defDecoder) { |
|
|
while (i < str.length) { |
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (code !== 32 && code !== 9) |
|
|
break; |
|
|
} |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
break; |
|
|
|
|
|
|
|
|
if (str.charCodeAt(i++) !== 59) |
|
|
return; |
|
|
|
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (code !== 32 && code !== 9) |
|
|
break; |
|
|
} |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
return; |
|
|
|
|
|
let name; |
|
|
const nameStart = i; |
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (TOKEN[code] !== 1) { |
|
|
if (code === 61) |
|
|
break; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
return; |
|
|
|
|
|
let value = ''; |
|
|
let valueStart; |
|
|
let charset; |
|
|
|
|
|
name = str.slice(nameStart, i); |
|
|
if (name.charCodeAt(name.length - 1) === 42) { |
|
|
|
|
|
|
|
|
const charsetStart = ++i; |
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (CHARSET[code] !== 1) { |
|
|
if (code !== 39) |
|
|
return; |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
return; |
|
|
|
|
|
charset = str.slice(charsetStart, i); |
|
|
++i; |
|
|
|
|
|
|
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (code === 39) |
|
|
break; |
|
|
} |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
return; |
|
|
|
|
|
|
|
|
++i; |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
return; |
|
|
|
|
|
valueStart = i; |
|
|
|
|
|
let encode = 0; |
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (EXTENDED_VALUE[code] !== 1) { |
|
|
if (code === 37) { |
|
|
let hexUpper; |
|
|
let hexLower; |
|
|
if (i + 2 < str.length |
|
|
&& (hexUpper = HEX_VALUES[str.charCodeAt(i + 1)]) !== -1 |
|
|
&& (hexLower = HEX_VALUES[str.charCodeAt(i + 2)]) !== -1) { |
|
|
const byteVal = (hexUpper << 4) + hexLower; |
|
|
value += str.slice(valueStart, i); |
|
|
value += String.fromCharCode(byteVal); |
|
|
i += 2; |
|
|
valueStart = i + 1; |
|
|
if (byteVal >= 128) |
|
|
encode = 2; |
|
|
else if (encode === 0) |
|
|
encode = 1; |
|
|
continue; |
|
|
} |
|
|
|
|
|
return; |
|
|
} |
|
|
break; |
|
|
} |
|
|
} |
|
|
|
|
|
value += str.slice(valueStart, i); |
|
|
value = convertToUTF8(value, charset, encode); |
|
|
if (value === undefined) |
|
|
return; |
|
|
} else { |
|
|
|
|
|
|
|
|
++i; |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
return; |
|
|
|
|
|
if (str.charCodeAt(i) === 34) { |
|
|
valueStart = ++i; |
|
|
let escaping = false; |
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (code === 92) { |
|
|
if (escaping) { |
|
|
valueStart = i; |
|
|
escaping = false; |
|
|
} else { |
|
|
value += str.slice(valueStart, i); |
|
|
escaping = true; |
|
|
} |
|
|
continue; |
|
|
} |
|
|
if (code === 34) { |
|
|
if (escaping) { |
|
|
valueStart = i; |
|
|
escaping = false; |
|
|
continue; |
|
|
} |
|
|
value += str.slice(valueStart, i); |
|
|
break; |
|
|
} |
|
|
if (escaping) { |
|
|
valueStart = i - 1; |
|
|
escaping = false; |
|
|
} |
|
|
|
|
|
if (QDTEXT[code] !== 1) |
|
|
return; |
|
|
} |
|
|
|
|
|
|
|
|
if (i === str.length) |
|
|
return; |
|
|
|
|
|
++i; |
|
|
} else { |
|
|
valueStart = i; |
|
|
|
|
|
for (; i < str.length; ++i) { |
|
|
const code = str.charCodeAt(i); |
|
|
if (TOKEN[code] !== 1) { |
|
|
|
|
|
if (i === valueStart) |
|
|
return; |
|
|
break; |
|
|
} |
|
|
} |
|
|
value = str.slice(valueStart, i); |
|
|
} |
|
|
|
|
|
value = defDecoder(value, 2); |
|
|
if (value === undefined) |
|
|
return; |
|
|
} |
|
|
|
|
|
name = name.toLowerCase(); |
|
|
if (params[name] === undefined) |
|
|
params[name] = value; |
|
|
} |
|
|
|
|
|
return params; |
|
|
} |
|
|
|
|
|
function getDecoder(charset) { |
|
|
let lc; |
|
|
while (true) { |
|
|
switch (charset) { |
|
|
case 'utf-8': |
|
|
case 'utf8': |
|
|
return decoders.utf8; |
|
|
case 'latin1': |
|
|
case 'ascii': |
|
|
case 'us-ascii': |
|
|
case 'iso-8859-1': |
|
|
case 'iso8859-1': |
|
|
case 'iso88591': |
|
|
case 'iso_8859-1': |
|
|
case 'windows-1252': |
|
|
case 'iso_8859-1:1987': |
|
|
case 'cp1252': |
|
|
case 'x-cp1252': |
|
|
return decoders.latin1; |
|
|
case 'utf16le': |
|
|
case 'utf-16le': |
|
|
case 'ucs2': |
|
|
case 'ucs-2': |
|
|
return decoders.utf16le; |
|
|
case 'base64': |
|
|
return decoders.base64; |
|
|
default: |
|
|
if (lc === undefined) { |
|
|
lc = true; |
|
|
charset = charset.toLowerCase(); |
|
|
continue; |
|
|
} |
|
|
return decoders.other.bind(charset); |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
const decoders = { |
|
|
utf8: (data, hint) => { |
|
|
if (data.length === 0) |
|
|
return ''; |
|
|
if (typeof data === 'string') { |
|
|
|
|
|
|
|
|
|
|
|
if (hint < 2) |
|
|
return data; |
|
|
|
|
|
data = Buffer.from(data, 'latin1'); |
|
|
} |
|
|
return data.utf8Slice(0, data.length); |
|
|
}, |
|
|
|
|
|
latin1: (data, hint) => { |
|
|
if (data.length === 0) |
|
|
return ''; |
|
|
if (typeof data === 'string') |
|
|
return data; |
|
|
return data.latin1Slice(0, data.length); |
|
|
}, |
|
|
|
|
|
utf16le: (data, hint) => { |
|
|
if (data.length === 0) |
|
|
return ''; |
|
|
if (typeof data === 'string') |
|
|
data = Buffer.from(data, 'latin1'); |
|
|
return data.ucs2Slice(0, data.length); |
|
|
}, |
|
|
|
|
|
base64: (data, hint) => { |
|
|
if (data.length === 0) |
|
|
return ''; |
|
|
if (typeof data === 'string') |
|
|
data = Buffer.from(data, 'latin1'); |
|
|
return data.base64Slice(0, data.length); |
|
|
}, |
|
|
|
|
|
other: (data, hint) => { |
|
|
if (data.length === 0) |
|
|
return ''; |
|
|
if (typeof data === 'string') |
|
|
data = Buffer.from(data, 'latin1'); |
|
|
try { |
|
|
const decoder = new TextDecoder(this); |
|
|
return decoder.decode(data); |
|
|
} catch {} |
|
|
}, |
|
|
}; |
|
|
|
|
|
function convertToUTF8(data, charset, hint) { |
|
|
const decode = getDecoder(charset); |
|
|
if (decode) |
|
|
return decode(data, hint); |
|
|
} |
|
|
|
|
|
function basename(path) { |
|
|
if (typeof path !== 'string') |
|
|
return ''; |
|
|
for (let i = path.length - 1; i >= 0; --i) { |
|
|
switch (path.charCodeAt(i)) { |
|
|
case 0x2F: |
|
|
case 0x5C: |
|
|
path = path.slice(i + 1); |
|
|
return (path === '..' || path === '.' ? '' : path); |
|
|
} |
|
|
} |
|
|
return (path === '..' || path === '.' ? '' : path); |
|
|
} |
|
|
|
|
|
const TOKEN = [ |
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
|
0, 1, 0, 1, 1, 1, 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, 0, 0, 0, 0, 0, 0, |
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, |
|
|
]; |
|
|
|
|
|
|
|
|
const HEX_VALUES = [ |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -1, -1, -1, -1, -1, |
|
|
-1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, 10, 11, 12, 13, 14, 15, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, |
|
|
]; |
|
|
|
|
|
|
|
|
module.exports = { |
|
|
basename, |
|
|
convertToUTF8, |
|
|
getDecoder, |
|
|
parseContentType, |
|
|
parseDisposition, |
|
|
}; |
|
|
|