Buffer from

This commit is contained in:
斟酌 鵬兄 2022-04-06 13:52:43 +09:00
parent 54790b3235
commit 96c0899240

View File

@ -7,9 +7,9 @@ var qstr = require( "./querystr.js" );
module.exports = {
form_multipart: function( boundary, request, handler )
{
boundary = new Buffer( "--" + boundary );
var delim = new Buffer( "0D0A0D0A", "hex" );
var endBuff = new Buffer( "2D2D0D0A", "hex" );
boundary = Buffer.from( "--" + boundary );
var delim = Buffer.from( "0D0A0D0A", "hex" );
var endBuff = Buffer.from( "2D2D0D0A", "hex" );
var st = request.resultStream();
var firstRead = true;
@ -73,7 +73,7 @@ module.exports = {
throw new Error( "Invalid form data" );
}
content = content.map( ( v ) => new Buffer( v ) );
content = content.map( ( v ) => Buffer.from( v ) );
var item;
var formData = [];