fix(stream-responses): Don't modify body stream regardless of content type
MODIFY
packages/core/src/response/responseBody.factory.ts
packages/core/src/response/responseBody.factory.ts
import { HttpHeaders } from '../http.interface';
-import { ContentType } from '../+internal';
+import { ContentType, isStream } from '../+internal';
export const bodyFactory = (headers: HttpHeaders) => (body: any) => {
+ if(isStream(body)){
+ return body;
+ }
switch (headers['Content-Type']) {
case ContentType.APPLICATION_JSON:
return JSON.stringify(body);

fix(stream-responses): Don't modify body stream regardless of content type