@@ -63,6 +63,11 @@ public static async Task<Stream> SerializeProxyRequestAsync(
6363 requestStream , AuthorizationTokenType . PrimaryMasterKey ,
6464 dictionaryCollection ) ;
6565
66+ ContainerProperties collection = await clientCollectionCache . ResolveCollectionAsync (
67+ request ,
68+ CancellationToken . None ,
69+ NoOpTrace . Singleton ) ;
70+
6671 if ( operationType . IsPointOperation ( ) )
6772 {
6873 string partitionKey = request . Headers . Get ( HttpConstants . HttpHeaders . PartitionKey ) ;
@@ -72,10 +77,6 @@ public static async Task<Stream> SerializeProxyRequestAsync(
7277 throw new InternalServerErrorException ( ) ;
7378 }
7479
75- ContainerProperties collection = await clientCollectionCache . ResolveCollectionAsync (
76- request ,
77- CancellationToken . None ,
78- NoOpTrace . Singleton ) ;
7980 string epk = GetEffectivePartitionKeyHash ( partitionKey , collection . PartitionKey ) ;
8081
8182 request . Properties = new Dictionary < string , object >
@@ -96,6 +97,8 @@ public static async Task<Stream> SerializeProxyRequestAsync(
9697 request . Headers . Add ( HttpConstants . HttpHeaders . StartEpk , request . Headers [ ThinClientConstants . ProxyStartEpk ] ) ;
9798 request . Headers . Add ( HttpConstants . HttpHeaders . EndEpk , request . Headers [ ThinClientConstants . ProxyEndEpk ] ) ;
9899 }
100+ request . ResourceId = collection . ResourceId ;
101+ request . Headers . Add ( WFConstants . BackendHeaders . CollectionRid , collection . ResourceId ) ;
99102
100103 await request . EnsureBufferedBodyAsync ( ) ;
101104
0 commit comments