jkyberneees / low-http-server

HTTP Server implementation in top of uWebSocket.js
MIT License
50 stars 7 forks source link

add writeAllHeaders in write method #21

Closed rafidzia closed 2 years ago

rafidzia commented 2 years ago

recently in fastify v3.28 and v4, they use res.write before res.end and it cause problem because yours low-http-server is writing header at 'res.end'. If we send header after sending data, the status will be pending forever (i don't know about this, probably bug at uWebSocket.js itself). I only add 'res.write' in write method so that it can't send header after send data to client.