Changing cosmos header checks to lower case
Signed-off-by: Ryan Lettieri <ryanLettieri@microsoft.com>
This commit is contained in:
parent
34c24ba994
commit
97a91c0b8f
|
|
@ -22,6 +22,7 @@ import (
|
|||
"fmt"
|
||||
"net/http"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
|
||||
|
|
@ -87,9 +88,9 @@ type crossPartitionQueryPolicy struct{}
|
|||
func (p *crossPartitionQueryPolicy) Do(req *policy.Request) (*http.Response, error) {
|
||||
raw := req.Raw()
|
||||
hdr := raw.Header
|
||||
if hdr.Get("x-ms-documentdb-query") == "True" {
|
||||
if strings.ToLower(hdr.Get("x-ms-documentdb-query")) == "true" {
|
||||
// modify req here since we know it is a query
|
||||
hdr.Add("x-ms-documentdb-query-enablecrosspartition", "True")
|
||||
hdr.Add("x-ms-documentdb-query-enablecrosspartition", "true")
|
||||
hdr.Del("x-ms-documentdb-partitionkey")
|
||||
raw.Header = hdr
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue