From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 371C81FF179 for ; Wed, 7 Jan 2026 13:07:27 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7967AC1F9; Wed, 7 Jan 2026 13:08:42 +0100 (CET) From: Christian Ebner To: pbs-devel@lists.proxmox.com Date: Wed, 7 Jan 2026 13:07:57 +0100 Message-ID: <20260107120757.346517-1-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1767787650442 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.048 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [proxmox.com] Subject: [pbs-devel] [PATCH proxmox] s3-client: make truncation flag optional in list object v2 response X-BeenThere: pbs-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox Backup Server development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox Backup Server development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pbs-devel-bounces@lists.proxmox.com Sender: "pbs-devel" Some providers do not return the `IsTruncated` flag [0] in the response body for list object v2 API calls, signaling that there are further object keys to be returned by subsequent API calls providing the next continuation token. Since this flag is optional, allow it to be missing for XML response body parsing and default for it to be false in the client response. Other unused members for the struct used for XML parsing have already been dropped in commit eb559d87 ("fix #7008: s3-client: drop unused optional object list v2 response fields"). Fixes: https://forum.proxmox.com/threads/178707/ Signed-off-by: Christian Ebner --- proxmox-s3-client/src/response_reader.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/proxmox-s3-client/src/response_reader.rs b/proxmox-s3-client/src/response_reader.rs index 47fcd129..e03b3bb0 100644 --- a/proxmox-s3-client/src/response_reader.rs +++ b/proxmox-s3-client/src/response_reader.rs @@ -37,7 +37,7 @@ pub struct ListObjectsV2Response { /// https://docs.aws.amazon.com/AmazonS3/latest/API/API_ListObjectsV2.html#API_ListObjectsV2_ResponseSyntax struct ListObjectsV2ResponseBody { /// Flag indication if response was truncated because of key limits. - pub is_truncated: bool, + pub is_truncated: Option, /// Token used for this request to get further keys in truncated responses. pub continuation_token: Option, /// Allows to fetch the next set of keys for truncated responses. @@ -50,7 +50,7 @@ impl ListObjectsV2ResponseBody { fn with_optional_date(self, date: Option) -> ListObjectsV2Response { ListObjectsV2Response { date, - is_truncated: self.is_truncated, + is_truncated: self.is_truncated.unwrap_or_default(), continuation_token: self.continuation_token, next_continuation_token: self.next_continuation_token, contents: self.contents.unwrap_or_default(), @@ -530,7 +530,7 @@ fn parse_list_objects_v2_response_test() { "#; let result: ListObjectsV2ResponseBody = serde_xml_rs::from_str(response_body).unwrap(); - assert!(!result.is_truncated); + assert_eq!(result.is_truncated, Some(false)); assert_eq!( result.contents.unwrap(), vec![ -- 2.47.3 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel