Browse Source

Add assert to check if getreq still works as expected

bel 10 years ago
parent
commit
0b286e4db3
1 changed files with 1 additions and 0 deletions
  1. 1 0
      src/civetweb.c

+ 1 - 0
src/civetweb.c

@@ -7282,6 +7282,7 @@ static void process_new_connection(struct mg_connection *conn)
     conn->data_len = 0;
     conn->data_len = 0;
     do {
     do {
         if (!getreq(conn, ebuf, sizeof(ebuf), TIMEOUT_INFINITE, &reqerr)) {
         if (!getreq(conn, ebuf, sizeof(ebuf), TIMEOUT_INFINITE, &reqerr)) {
+            assert(ebuf[0] != '\0');
             /* The request sent by the client could not be understood by the server,
             /* The request sent by the client could not be understood by the server,
                or it was incomplete or a timeout. Send an error message and close
                or it was incomplete or a timeout. Send an error message and close
                the connection. */
                the connection. */