From 3711bf09aa1125b5277926c29cc0526df68194ac Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Wed, 19 Oct 2011 11:31:38 +0200 Subject: [PATCH] Flush HTTP recording file --- src/http.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/http.c b/src/http.c index 2df1706..ef88f17 100644 --- a/src/http.c +++ b/src/http.c @@ -926,6 +926,7 @@ static void http_io(IOCHAN i, int event) (long long) iochan_getfd(i), sz); for (hb = hc->iqueue; hb; hb = hb->next) fwrite(hb->buf, 1, hb->len, hc->http_server->record_file); + fflush(hc->http_server->record_file); } #endif if (!(hc->request = http_parse_request(hc, &hc->iqueue, reqlen))) @@ -979,6 +980,8 @@ static void http_io(IOCHAN i, int event) (long long) iochan_getfd(i), sz); fwrite(wb->buf, 1, wb->offset + wb->len, hc->http_server->record_file); + fputc('\n', hc->http_server->record_file); + fflush(hc->http_server->record_file); } #endif hc->oqueue = hc->oqueue->next; -- 1.7.10.4