浏览代码

Add assert to check if getreq still works as expected

bel 10 年之前
父节点
当前提交
0b286e4db3
共有 1 个文件被更改,包括 1 次插入0 次删除
  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;
     do {
         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,
                or it was incomplete or a timeout. Send an error message and close
                the connection. */