diff --git a/main.c b/main.c index 5a00135..0b4b774 100644 --- a/main.c +++ b/main.c @@ -142,8 +142,17 @@ int main(int argc, char *argv[]) goto close_client_socket; } - sbuf[slen] = '\0'; - printf("Received selector: \"%s\"\n", sbuf); + /* + * Write an empty response to the client. + */ + do { + errno = 0; + n = write(cfd, ".\r\n", 3); + } while (errno == EINTR); + if (n == -1) { + fprintf(stderr, "Error sending response to client\n"); + goto close_client_socket; + } close_client_socket: close(cfd);