Helidium / Mitol

Lightweight NodeJS http server
Other
175 stars 5 forks source link

Can't write 400 status code #7

Closed udivankin closed 6 years ago

udivankin commented 6 years ago

Here's the code:

const http = require('mitol');

let server = http.createServer((req, res) => {
    res.statusCode = 400;
    res.end();
});

server.listen(8099, () => {
    console.log('Example app listening on port 8099!')
});

Nothing is returned in response (lets say timeout). When trying to set e.g statusCode = 404, it works as expected.

Helidium commented 6 years ago

I have added the missing status code messages. Now it should be possible to set the status message.