mirror of https://github.com/F-Stack/f-stack.git
remove unnecessary one byte from html page
This commit is contained in:
parent
d9665c93cb
commit
81a671f58f
|
@ -93,7 +93,7 @@ int loop(void *arg)
|
||||||
char buf[256];
|
char buf[256];
|
||||||
size_t readlen = ff_read(clientfd, buf, sizeof(buf));
|
size_t readlen = ff_read(clientfd, buf, sizeof(buf));
|
||||||
|
|
||||||
ff_write(clientfd, html, sizeof(html));
|
ff_write(clientfd, html, strlen(html));
|
||||||
} else {
|
} else {
|
||||||
printf("unknown event: %8.8X\n", event.flags);
|
printf("unknown event: %8.8X\n", event.flags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ int loop(void *arg)
|
||||||
char buf[256];
|
char buf[256];
|
||||||
size_t readlen = ff_read( events[i].data.fd, buf, sizeof(buf));
|
size_t readlen = ff_read( events[i].data.fd, buf, sizeof(buf));
|
||||||
if(readlen > 0) {
|
if(readlen > 0) {
|
||||||
ff_write( events[i].data.fd, html, sizeof(html));
|
ff_write( events[i].data.fd, html, strlen(html));
|
||||||
} else {
|
} else {
|
||||||
ff_epoll_ctl(epfd, EPOLL_CTL_DEL, events[i].data.fd, NULL);
|
ff_epoll_ctl(epfd, EPOLL_CTL_DEL, events[i].data.fd, NULL);
|
||||||
ff_close( events[i].data.fd);
|
ff_close( events[i].data.fd);
|
||||||
|
|
Loading…
Reference in New Issue