Explorar el Código

Recursive delete: Send error code 500 instead of 409, since we do not have any information for the client how to fix the problem

bel hace 10 años
padre
commit
ef121c468b
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      src/civetweb.c

+ 2 - 2
src/civetweb.c

@@ -7280,8 +7280,8 @@ delete_file(struct mg_connection *conn, const char *path)
 			/* Delete is successful: Return 204 without content. */
 			send_http_error(conn, 204, "%s", "");
 		} else {
-			/* Delete is not successful: Return 409 "Conflict". */
-			send_http_error(conn, 409, "Could not delete %s", path);
+			/* Delete is not successful: Return 500 (Server error). */
+			send_http_error(conn, 500, "Error: Could not delete %s", path);
 		}
 		return;
 	}