diff --git a/net_io.c b/net_io.c index 1ff16b1..2ff6c94 100644 --- a/net_io.c +++ b/net_io.c @@ -737,7 +737,8 @@ int handleHTTPRequest(struct client *c, char *p) { } // Send header and content. - if (write(c->fd, hdr, hdrlen) == -1 || write(c->fd, content, clen) == -1) { + if ( (write(c->fd, hdr, hdrlen) != hdrlen) + || (write(c->fd, content, clen) != clen) ) { free(content); return 1; }