diff options
Diffstat (limited to 'plop.c')
-rw-r--r-- | plop.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -100,6 +100,7 @@ int handle_client(lua_State * L, struct pollfd * pfd, char ** data, const int sh if (-1 == collect_request(pfd->fd, data)) { + respond_only_status(pfd->fd, STATUS_BAD_REQUEST); return -1; // TODO: Handle errors properly } @@ -114,6 +115,10 @@ int handle_client(lua_State * L, struct pollfd * pfd, char ** data, const int sh { respond_with_body(pfd->fd, STATUS_OK, body, (int) length); } + else + { + respond_only_status(pfd->fd, STATUS_INTERNAL_SERVER_ERROR); + } close(pfd->fd); (pfd - shift_by)->fd = -1; |