Преглед на файлове

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 преди 10 години
родител
ревизия
ef121c468b
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  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;
 	}