low-http-server
low-http-server copied to clipboard
add writeAllHeaders in write method
recently in fastify v3.28 and v4, they use res.write to send payload before calling res.end and it causes problem that your request in browser can't receive data and the status will be pending forever. I found out that it because you write headers in res.end so if we use res.write, it means the server will be send header after sending data and that what cases the problem (i don't know about pending part, probably from uWs itself). Anyway, i only add writeAllHeaders in write method.