Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flash: Deno.serve drops response body chunks if empty chunk is enqueued #17194

Closed
Tracked by #17146
kt3k opened this issue Dec 27, 2022 · 1 comment
Closed
Tracked by #17146

flash: Deno.serve drops response body chunks if empty chunk is enqueued #17194

kt3k opened this issue Dec 27, 2022 · 1 comment

Comments

@kt3k
Copy link
Member

kt3k commented Dec 27, 2022

The following example responses with "a". This should response with "ab" instead. (note: If you commented out the 2nd enqueue() call, it responses with "ab".)

Deno.serve(() => {
  const body = new ReadableStream({
    start(controller) {
      controller.enqueue(new Uint8Array([97]))
      controller.enqueue(new Uint8Array([]))
      controller.enqueue(new Uint8Array([98]))
      controller.close();
    }   
  }); 
  return new Response(body);
});

This seems indirectly causing the issue in support of npm:astro. ref:

@kt3k kt3k added the flash label Dec 28, 2022
@kt3k kt3k changed the title Deno.serve drops response body chunks if empty chunk is enqueued flash: Deno.serve drops response body chunks if empty chunk is enqueued Dec 28, 2022
@bartlomieju
Copy link
Member

This issue has been fixed in #18568

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants