remove unnecessary one byte from html page

dev
vanlink 2019-02-11 16:32:32 +08:00
parent d3f2221c0c
commit ec61049c5f
2 changed files with 2 additions and 2 deletions

View File

@ -93,7 +93,7 @@ int loop(void *arg)
char buf[256];
size_t readlen = ff_read(clientfd, buf, sizeof(buf));
ff_write(clientfd, html, sizeof(html));
ff_write(clientfd, html, strlen(html));
} else {
printf("unknown event: %8.8X\n", event.flags);
}

View File

@ -89,7 +89,7 @@ int loop(void *arg)
char buf[256];
size_t readlen = ff_read( events[i].data.fd, buf, sizeof(buf));
if(readlen > 0) {
ff_write( events[i].data.fd, html, sizeof(html));
ff_write( events[i].data.fd, html, strlen(html));
} else {
ff_epoll_ctl(epfd, EPOLL_CTL_DEL, events[i].data.fd, NULL);
ff_close( events[i].data.fd);