close connection after malformed request
change err from int to handler_result_t
close connection after failure to read request
fixing and suppressing leaks
suppressing bad memories