From 7d16d80926ff4ff6e7ea069be66f60b7054286ab Mon Sep 17 00:00:00 2001 From: Sergey Skovorodkin Date: Fri, 7 Mar 2025 08:38:55 +0000 Subject: [PATCH 1/2] Ignore case when comparing fifo suffix --- ydb/core/http_proxy/http_req.cpp | 2 +- ydb/core/ymq/base/queue_attributes.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ydb/core/http_proxy/http_req.cpp b/ydb/core/http_proxy/http_req.cpp index e9378e3ecdd2..2f3154077c5b 100644 --- a/ydb/core/http_proxy/http_req.cpp +++ b/ydb/core/http_proxy/http_req.cpp @@ -488,7 +488,7 @@ namespace NKikimr::NHttpProxy { } CloudId = cloudIdAndResourceId.first; HttpContext.ResourceId = ResourceId = cloudIdAndResourceId.second; - HttpContext.ResponseData.YmqIsFifo = queueUrl.EndsWith(".fifo"); + HttpContext.ResponseData.YmqIsFifo = AsciiHasSuffixIgnoreCase(queueUrl, ".fifo"); } } catch (const NKikimr::NSQS::TSQSException& e) { NYds::EErrorCodes issueCode = NYds::EErrorCodes::OK; diff --git a/ydb/core/ymq/base/queue_attributes.cpp b/ydb/core/ymq/base/queue_attributes.cpp index 8c6436aba93d..9aac4d94f650 100644 --- a/ydb/core/ymq/base/queue_attributes.cpp +++ b/ydb/core/ymq/base/queue_attributes.cpp @@ -66,7 +66,7 @@ TQueueAttributes TQueueAttributes::FromAttributesAndConfig(const THashMapEndsWith(".fifo")) { + if (*result.RedrivePolicy.TargetQueueName && isFifoQueue != AsciiHasSuffixIgnoreCase(result.RedrivePolicy.TargetQueueName, ".fifo")) { result.ErrorText = "Target dead letter queue should have the same type as source queue."; } else { continue; From 5b18ded6ada9c20bccc3e129186df8403816409d Mon Sep 17 00:00:00 2001 From: Sergey Skovorodkin Date: Fri, 7 Mar 2025 10:19:23 +0000 Subject: [PATCH 2/2] Add include --- ydb/core/ymq/base/queue_attributes.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ydb/core/ymq/base/queue_attributes.cpp b/ydb/core/ymq/base/queue_attributes.cpp index 9aac4d94f650..8639c7078d06 100644 --- a/ydb/core/ymq/base/queue_attributes.cpp +++ b/ydb/core/ymq/base/queue_attributes.cpp @@ -2,6 +2,7 @@ #include "queue_attributes.h" #include +#include #include #include @@ -66,7 +67,7 @@ TQueueAttributes TQueueAttributes::FromAttributesAndConfig(const THashMap