mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 02:36:54 +02:00
Fix call stack overflow when preparing large multipart/form-data
This commit is contained in:
parent
ccf37c6c17
commit
0bb42ba5f2
1 changed files with 4 additions and 4 deletions
|
@ -248,15 +248,15 @@ var httpMultiPart = (function () {
|
||||||
byteLength += buffer.byteLength;
|
byteLength += buffer.byteLength;
|
||||||
parts.push(buffer);
|
parts.push(buffer);
|
||||||
|
|
||||||
charCodes = [];
|
str = "";
|
||||||
for (i = 0; i < parts.length; i += 1) {
|
for (i = 0; i < parts.length; i += 1) {
|
||||||
|
charCodes = [];
|
||||||
view = new Uint8Array(parts[i]);
|
view = new Uint8Array(parts[i]);
|
||||||
for (j = 0; j < view.length; j += 1) {
|
for(j = 0; j < view.length; j += 1) {
|
||||||
charCodes.push(view[j]);
|
charCodes.push(view[j]);
|
||||||
}
|
}
|
||||||
|
str = str + String.fromCharCode.apply(String, charCodes);
|
||||||
}
|
}
|
||||||
str = String.fromCharCode.apply(String, charCodes);
|
|
||||||
|
|
||||||
return str;
|
return str;
|
||||||
}
|
}
|
||||||
that.response = response;
|
that.response = response;
|
||||||
|
|
Loading…
Reference in a new issue