Parcourir la source

Fixed bug in handler returns code reported by agold1234

sunsetbrew il y a 11 ans
Parent
commit
266562065a
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      src/CivetServer.cpp

+ 2 - 2
src/CivetServer.cpp

@@ -53,9 +53,9 @@ int CivetServer::requestHandler(struct mg_connection *conn, void *cbdata)
         } else if (strcmp(request_info->request_method, "POST") == 0) {
             return handler->handlePost(me, conn) ? 1 : 0;
         } else if (strcmp(request_info->request_method, "PUT") == 0) {
-            return !handler->handlePut(me, conn) ? 1 : 0;
+            return handler->handlePut(me, conn) ? 1 : 0;
         } else if (strcmp(request_info->request_method, "DELETE") == 0) {
-            return !handler->handleDelete(me, conn) ? 1 : 0;
+            return handler->handleDelete(me, conn) ? 1 : 0;
         }
     }