Skip to content

Commit 61c726a

Browse files
authored
Port cache-control bug fix into release 1.5 (#2738)
## Why make this change? We recently added a bug fix for #2735 and we want to port this fix to the 1.5 release. ## What is this change? Allows unsupported `cache-control` options to go through requests without error. ## How was this tested? See: #2737 ## Sample Request(s) See: #2737
1 parent f27ee70 commit 61c726a

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

src/Core/Resolvers/Sql Query Structures/SqlQueryStructure.cs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -587,15 +587,6 @@ private void AddCacheControlOptions(IHeaderDictionary? httpRequestHeaders)
587587
{
588588
CacheControlOption = cacheControlOption;
589589
}
590-
591-
if (!string.IsNullOrEmpty(CacheControlOption) &&
592-
!cacheControlHeaderOptions.Contains(CacheControlOption))
593-
{
594-
throw new DataApiBuilderException(
595-
message: "Request Header Cache-Control is invalid: " + CacheControlOption,
596-
statusCode: HttpStatusCode.BadRequest,
597-
subStatusCode: DataApiBuilderException.SubStatusCodes.BadRequest);
598-
}
599590
}
600591

601592
/// <summary>

0 commit comments

Comments
 (0)