diff --git a/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextBase.cs b/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextBase.cs index 824d992734..053c951f6c 100644 --- a/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextBase.cs +++ b/Microsoft.Azure.Cosmos/src/Query/v2Query/DocumentQueryExecutionContextBase.cs @@ -329,9 +329,7 @@ await this.Client.EnsureValidOverwriteAsync( requestHeaders.Set(HttpConstants.HttpHeaders.MergeStaticId, this.feedOptions.MergeStaticId); } - requestHeaders[HttpConstants.HttpHeaders.SupportedSerializationFormats] = this.feedOptions.SupportedSerializationFormats != null - ? this.feedOptions.SupportedSerializationFormats.Value.ToString() - : DefaultSupportedSerializationFormats; + requestHeaders[HttpConstants.HttpHeaders.SupportedSerializationFormats] = this.feedOptions.SupportedSerializationFormats?.ToString() ?? DefaultSupportedSerializationFormats; return requestHeaders; } diff --git a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs index 01154096eb..f723107ede 100644 --- a/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs +++ b/Microsoft.Azure.Cosmos/src/RequestOptions/QueryRequestOptions.cs @@ -245,9 +245,7 @@ internal override void PopulateRequestOptions(RequestMessage request) request.Headers.Add(HttpConstants.HttpHeaders.ResponseContinuationTokenLimitInKB, this.ResponseContinuationTokenLimitInKb.ToString()); } - request.Headers.CosmosMessageHeaders.SupportedSerializationFormats = this.SupportedSerializationFormats != null - ? this.SupportedSerializationFormats.ToString() - : DocumentQueryExecutionContextBase.DefaultSupportedSerializationFormats; + request.Headers.CosmosMessageHeaders.SupportedSerializationFormats = this.SupportedSerializationFormats?.ToString() ?? DocumentQueryExecutionContextBase.DefaultSupportedSerializationFormats; if (this.StartId != null) { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs index ae66d2ad8b..36f2a5b371 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/HeadersValidationTests.cs @@ -308,7 +308,7 @@ private void ValidateJsonSerializationFormatQuery(DocumentClient client, Documen } [TestMethod] - [Owner("hdetroja")] + [Owner("maya-painter")] public void ValidateSupportedSerializationFormatsGateway() { DocumentClient client = TestCommon.CreateClient(true);