File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -513,10 +513,14 @@ NodeHttpXHR.prototype.send = function (data) {
513
513
if ( typeof chunk === 'string' ) {
514
514
this . _responseText += chunk ;
515
515
} else if ( typeof chunk === 'object' ) {
516
- // binary data usually comes in one chunk (no chunky transfer-encoding)
517
- // or at least, that's what we'll support here for now
518
516
if ( chunk instanceof Buffer ) {
519
- this . _response = chunk . buffer ;
517
+ if ( this . _response ) {
518
+ this . _response = Buffer . concat ( [ this . _response , chunk ] ) ;
519
+ } else {
520
+ this . _response = chunk ;
521
+ }
522
+ // binary data usually comes in one chunk (no chunky transfer-encoding)
523
+ // or at least, that's what we'll support here for now for ArrayBuffer
520
524
} else if ( chunk instanceof ArrayBuffer ) {
521
525
this . _response = chunk ;
522
526
} else {
You can’t perform that action at this time.
0 commit comments