From Discord: Return Stream.empty for HTTP requests with an empty body

Aperta
#10,461 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@pujitha24 ci sta già lavorando.

Dal 8/11/2026.

  • #10462 di @pujitha24 — aperta

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
30/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
typescript
Ambito
api, backend

Direzione di ricerca

Read BunHttpServer.ts and trace how HttpServerRequest.stream handles a Web Request with a null body. Check the existing empty stream fallback and the emptyReadbleStream typo mentioned in the issue. Done means an empty request body produces Stream.empty; the linked pull request #10462 is already open.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Summary

HttpServerRequest.stream currently fails with “can not create stream from empty body” when a Web Request has a null body, such as a PUT request with content-length: 0, even though request.arrayBuffer correctly returns an empty ArrayBuffer. The expected behavior is for the body stream to resolve to Stream.empty. There appears to be an intended fallback in BunHttpServer.ts, but it is never evaluated. Also noted a typo: emptyReadbleStream should be emptyReadableStream.

Discord thread

https://discord.com/channels/795981131316985866/1568755708139143249

Lingua principale
TypeScript
Stelle
16.7k
Fork
808
Merge medio
12h 17m
PR unite (30g)
805

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Effect-TS/effect

Tutte le issue di Effect-TS/effect

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.