Skip to content

Commit f5fb378

Browse files
committed
IsSameKey use HttpHeaderName
1 parent 65f07ab commit f5fb378

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

google/cloud/internal/http_header.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ bool operator<(HttpHeader const& lhs, HttpHeader const& rhs) {
4747
return lhs.name_ < rhs.name_;
4848
}
4949

50-
bool HttpHeader::IsSameKey(std::string_view key) const {
51-
return name_.name() == absl::AsciiStrToLower(key);
50+
bool HttpHeader::IsSameKey(HttpHeaderName const& name) const {
51+
return name_ == name.name();
5252
}
5353

5454
bool HttpHeader::IsSameKey(HttpHeader const& other) const {

google/cloud/internal/http_header.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class HttpHeader {
119119

120120
// Performs a case-insensitive comparison of the key.
121121
bool IsSameKey(HttpHeader const& other) const;
122-
bool IsSameKey(std::string_view key) const;
122+
bool IsSameKey(HttpHeaderName const& name) const;
123123

124124
std::string name() const { return name_; }
125125
std::vector<std::string> const& values() const { return values_; }

0 commit comments

Comments
 (0)