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) {
513513 if ( typeof chunk === 'string' ) {
514514 this . _responseText += chunk ;
515515 } 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
518516 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
520524 } else if ( chunk instanceof ArrayBuffer ) {
521525 this . _response = chunk ;
522526 } else {
You can’t perform that action at this time.
0 commit comments