Pārlūkot izejas kodu

Directory request closes the connection

Sergey Lyubka 13 gadi atpakaļ
vecāks
revīzija
5faa2de3f5
1 mainītis faili ar 1 papildinājumiem un 0 dzēšanām
  1. 1 0
      mongoose.c

+ 1 - 0
mongoose.c

@@ -2449,6 +2449,7 @@ static void handle_directory_request(struct mg_connection *conn,
   sort_direction = conn->request_info.query_string != NULL &&
     conn->request_info.query_string[1] == 'd' ? 'a' : 'd';
 
+  conn->must_close = 1;
   mg_printf(conn, "%s",
             "HTTP/1.1 200 OK\r\n"
             "Connection: close\r\n"