Open Aksem opened 10 months ago
Right now the solution is call write_status first, this is a uWS thing https://github.com/cirospaciari/uWebSockets/blob/d5ec941fd8d29f3df6afbc73164d3c8bf0f49079/src/Http3Response.h#L33-L41 will change this in the future
Describe the bug If at least one header is written in response and then status code, e.g. 404, then provided status code is ignored and is always 200. Without header, status code is correct.
To Reproduce Steps to reproduce the behavior:
def handler(response, req): response.write_header( "Access-Control-Allow-Origin", "*" ) response.write_status(404) response.end("Not found")
app = App() app.any("/*", handler) app.listen(3000, lambda config: print("Listening on port http://localhost:%d now\n" % config.port)) app.run()