Skip to content

should use writeFromReadableStream() for a ReadableStream #144

@usualoma

Description

@usualoma

It's time to refactor response from an un-cached request object

https://github.com/usualoma/node-server/blob/b34b9a94c8006810fd21c5189cb663982fa98e59/src/listener.ts#L86-L130

Although it is partly correct to base the decision on the resHeaderRecord, it is more expected to base the decision on the type of the body.

Currently, if the body is not "Transfer-Encoding: chunked", it is returned from arrayBuffer even if the original body is a readbleStream, but we should use writeFromReadableStream() for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions