From 8623faab7c5470c392a39ebfae0f7f384645bfe0 Mon Sep 17 00:00:00 2001 From: Brett Gordon Date: Sat, 11 Nov 2017 15:26:44 -0500 Subject: [PATCH] htget: dump rest of lines buffer before main content xfer --- Applications/netd/htget.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Applications/netd/htget.c b/Applications/netd/htget.c index 14aa19a5..6e40a436 100644 --- a/Applications/netd/htget.c +++ b/Applications/netd/htget.c @@ -185,6 +185,10 @@ int main(int argc, char *argv[]) /* FIXME: if we saw a Transfer-Encoding: chunked" we need to do this bit differently */ if (code == 200) { + if (write(of, readp, bufend - readp) < 0){ + perror("write"); + exit(1); + } while((len = xread()) > 0) { if (write(of, buf, len) != len) { perror("write"); -- 2.34.1