Aktueller Stand
This commit is contained in:
8
backend/node_modules/content-disposition/index.js
generated
vendored
8
backend/node_modules/content-disposition/index.js
generated
vendored
@@ -20,7 +20,6 @@ module.exports.parse = parse
|
||||
*/
|
||||
|
||||
var basename = require('path').basename
|
||||
var Buffer = require('safe-buffer').Buffer
|
||||
|
||||
/**
|
||||
* RegExp to match non attr-char, *after* encodeURIComponent (i.e. not including "%")
|
||||
@@ -243,7 +242,7 @@ function format (obj) {
|
||||
for (var i = 0; i < params.length; i++) {
|
||||
param = params[i]
|
||||
|
||||
var val = param.substr(-1) === '*'
|
||||
var val = param.slice(-1) === '*'
|
||||
? ustring(parameters[param])
|
||||
: qstring(parameters[param])
|
||||
|
||||
@@ -281,6 +280,7 @@ function decodefield (str) {
|
||||
value = getlatin1(binary)
|
||||
break
|
||||
case 'utf-8':
|
||||
case 'utf8':
|
||||
value = Buffer.from(binary, 'binary').toString('utf8')
|
||||
break
|
||||
default:
|
||||
@@ -332,7 +332,7 @@ function parse (string) {
|
||||
var value
|
||||
|
||||
// calculate index to start at
|
||||
index = PARAM_REGEXP.lastIndex = match[0].substr(-1) === ';'
|
||||
index = PARAM_REGEXP.lastIndex = match[0].slice(-1) === ';'
|
||||
? index - 1
|
||||
: index
|
||||
|
||||
@@ -369,7 +369,7 @@ function parse (string) {
|
||||
if (value[0] === '"') {
|
||||
// remove quotes and escapes
|
||||
value = value
|
||||
.substr(1, value.length - 2)
|
||||
.slice(1, -1)
|
||||
.replace(QESC_REGEXP, '$1')
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user