Browse Source

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 năm trước cách đây
mục cha
commit
ef121c468b
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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;
 	}