mirror of
https://github.com/expressjs/express.git
synced 2026-02-22 03:51:36 +00:00
feat: Added check to support Uint8Array in response sending (#6285)
Unified usage of ArrayBuffer.isView to comprehend Buffer and removed isView function check Co-authored-by: Wes Todd <wes@wesleytodd.com> Added Uint8Array test with encoding fix: added history.md entry
This commit is contained in:
committed by
Wes Todd
parent
af7cd90893
commit
55869f49a6
@@ -130,7 +130,7 @@ res.send = function send(body) {
|
||||
case 'object':
|
||||
if (chunk === null) {
|
||||
chunk = '';
|
||||
} else if (Buffer.isBuffer(chunk)) {
|
||||
} else if (ArrayBuffer.isView(chunk)) {
|
||||
if (!this.get('Content-Type')) {
|
||||
this.type('bin');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user