Skip to content

Commit

Permalink
address more header names that are not canonicalized before use (#1048)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmc-msft authored Aug 30, 2022
1 parent a2fc340 commit ffd7624
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion sdk/data_cosmos/src/headers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ pub(crate) const HEADER_CONSISTENCY_LEVEL: HeaderName =
pub(crate) const HEADER_SESSION_TOKEN: HeaderName = HeaderName::from_static("x-ms-session-token");
pub(crate) const HEADER_ALLOW_MULTIPLE_WRITES: HeaderName =
HeaderName::from_static("x-ms-cosmos-allow-tentative-writes");
pub(crate) const HEADER_A_IM: HeaderName = HeaderName::from_static("A-IM");
pub(crate) const HEADER_A_IM: HeaderName = HeaderName::from_static("a-im");
pub(crate) const HEADER_DOCUMENTDB_PARTITIONRANGEID: HeaderName =
HeaderName::from_static("x-ms-documentdb-partitionkeyrangeid");
pub(crate) const HEADER_DOCUMENTDB_PARTITIONKEY: HeaderName =
Expand Down
2 changes: 1 addition & 1 deletion sdk/data_tables/src/operations/list_tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ impl TryFrom<CollectedResponse> for ListTablesResponse {

let continuation_next_table_name = response
.headers()
.get_optional_string(&HeaderName::from_static("x-ms-continuation-NextTableName"));
.get_optional_string(&HeaderName::from_static("x-ms-continuation-nexttablename"));

Ok(ListTablesResponse {
common_storage_response_headers: response.headers().try_into()?,
Expand Down
4 changes: 2 additions & 2 deletions sdk/data_tables/src/operations/query_entity.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ impl<E: DeserializeOwned + Send + Sync> TryFrom<CollectedResponse> for QueryEnti
let headers = response.headers();

let next_partition_key = headers.get_optional_string(&HeaderName::from_static(
"x-ms-continuation-NextPartitionKey",
"x-ms-continuation-nextpartitionkey",
));

let next_row_key =
headers.get_optional_string(&HeaderName::from_static("x-ms-continuation-NextRowKey"));
headers.get_optional_string(&HeaderName::from_static("x-ms-continuation-nextrowkey"));

Ok(QueryEntityResponse {
common_storage_response_headers: response.headers().try_into()?,
Expand Down

0 comments on commit ffd7624

Please sign in to comment.