creationix/luvit — Issue #9: way hard error handler
Author: dvv
Created: 2011-10-17 08:53:55+00:00
State: open

Hi!

Currently, when HTTP parser fails, at https://github.com/creationix/luvit/blob/master/lib/http.lua#L62 we emit 'error' event, which we _have no chance to set_ handler for. This just causes `error()` to execute, since this is default behavior at https://github.com/creationix/luvit/blob/master/lib/emitter.lua#L29 . In effect, failure to parse request causes luvit dump.

I start to face this today, after pulling afresh luvit dependencies. luvit now chokes at WebSocket connection (i believe 8 bytes of binary nonce frighten the parser).

Please, consider softer way to report early errors.

TIA,
--Vladimir