| Date: Sun, 7 Jun 2020 21:43:26 +0200
Use write instead of send everywhere.
Sorry, Evil_Bob, had to garble your patch. Thanks for the hint!
Diffstat:
M ind.c | 2 +-
M main.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--- |
| @@ -123,7 +123,7 @@ xsendfile(int fd, int sock)
while ((len = read(fd, sendb, bufsiz)) > 0) {
sendi = sendb;
while (len > 0) {
- if ((sent = send(sock, sendi, len, 0)) < 0) {
+ if ((sent = write(sock, sendi, len)) < 0) {
free(sendb);
return -1;
} |
| @@ -170,7 +170,7 @@ handlerequest(int sock, char *req, int rlen, char *base, char *ohost,
recvb + 4, recvb + 4, recvb + 4);
if (len > sizeof(path))
len = sizeof(path);
- send(sock, path, len, 0);
+ write(sock, path, len);
if (loglvl & HTTP)
logentry(clienth, clientp, recvc, "HTTP redirect");
return; |