From 2844aefe787417da1f456c1fe513af71dfb10271 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Tue, 1 Dec 2020 19:58:47 +0100 Subject: [PATCH] Debugging #1 --- src/client.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/client.cpp b/src/client.cpp index 1033d8b..e2e1793 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -450,6 +450,7 @@ bool connection_handler(const char *preprefix, const char *col1, const char *col } websocket = statuscode == 101 && req.isExistingResponseField("Connection") && req.getResponseField("Connection") == "upgrade"; + printf("STAGE 2\n"); fclose(file); file = pipes.stdout; @@ -459,6 +460,7 @@ bool connection_handler(const char *preprefix, const char *col1, const char *col } else { fclose(pipes.stdin); int c = fgetc(pipes.stdout); + printf("STAGE 3\n"); if (c == -1) { // No Data -> Error req.respond((statuscode == 0) ? 500 : statuscode); @@ -481,6 +483,7 @@ bool connection_handler(const char *preprefix, const char *col1, const char *col if (compress) { req.setField("Accept-Ranges", "none"); } + printf("STAGE 4\n"); if (compress && req.isExistingField("Range")) { req.respond(416); @@ -518,6 +521,7 @@ bool connection_handler(const char *preprefix, const char *col1, const char *col } else { req.respond(statuscode, file, compress); } + printf("STAGE 5\n"); fclose(file); if (childpid > 0) {