phroxy

Gopher to HTTP proxy
git clone git://git.z3bra.org/phroxy.git
Log | Files | Refs | LICENSE

commit de16181ef04c64ba57523496ec68b02354505525
parent ef2d71ffb25c671f716109b8d9bb640fd0a5a9c4
Author: Willy Goiffon <dev@z3bra.org>
Date:   Thu, 24 Sep 2020 09:56:42 +0200

Flush stdout after HTTP headers

Diffstat:
Mphroxy.c | 2++
1 file changed, 2 insertions(+), 0 deletions(-)

diff --git a/phroxy.c b/phroxy.c @@ -303,6 +303,7 @@ serveitem(char item, char *path, char *data, size_t len) case '1': // menu case '0': // text printf("\r\n"); + fflush(stdout); write(1, head, strlen(head)); if (item == '1') printmenu(1, data); if (item == '0') printhtml(1, data, len); @@ -318,6 +319,7 @@ serveitem(char item, char *path, char *data, size_t len) case 'h': // http redirect printf("Content-Length: %ld\r\n", len); printf("\r\n"); + fflush(stdout); send = data; while (len > 0) { if ((sent = write(1, send, len)) < 0)