bitreich-short

fork of git.z3bra.org/bitreich-short
git clone git://git.pyratebeard.net/bitreich-short.git
Log | Files | Refs | README | LICENSE

commit 1d63bfa9303355b61925256bb06169e17e38f4f5
parent f03e566220bca9b8371d4a188cbc5e580e4b2274
Author: Christoph Lohmann <20h@r-36.net>
Date:   Fri, 24 Jul 2020 22:07:56 +0200

Fix headers and date.

Diffstat:
Mbitreich-httpd.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bitreich-httpd.c b/bitreich-httpd.c @@ -39,7 +39,7 @@ printheaders(char *ctype) t = time(NULL); if (t > 0) - printf("Date: %s\r\n", asctime(gmtime(&t))); + printf("Date: %s", asctime(gmtime(&t))); printf("X-Future: Gopher ftw!\r\n"); printf("Content-Type: %s\r\n", ctype); printf("X-Irritate: Be irritated.\r\n"); @@ -73,6 +73,7 @@ servefile(char *path, char *ctype, int sock) printf("Content-Length: %ld\r\n", st.st_size); printf("\r\n"); + fflush(stdout); sendb = xmalloc(bufsiz); while ((len = read(fd, sendb, bufsiz)) > 0) {