Index: mojo/services/network/http_connection_impl.cc |
diff --git a/mojo/services/network/http_connection_impl.cc b/mojo/services/network/http_connection_impl.cc |
index 2df12aa7b50d7b63d392f4bf2514a911ff8c954c..ad3347d9d43ca72ec98a0e0860a33f8f1fb81b95 100644 |
--- a/mojo/services/network/http_connection_impl.cc |
+++ b/mojo/services/network/http_connection_impl.cc |
@@ -375,11 +375,12 @@ void HttpConnectionImpl::OnFinishedReadingResponseBody( |
// |
// TODO(yzshen): Consider adding to net::HttpServerResponseInfo a simple |
// setter for body which doesn't fiddle with headers. |
- if (base::strcasecmp(header.name.data(), |
- net::HttpRequestHeaders::kContentLength) == 0) { |
+ base::StringPiece name_piece(header.name.data(), header.name.size()); |
+ if (base::EqualsCaseInsensitiveASCII( |
+ name_piece, net::HttpRequestHeaders::kContentLength)) { |
continue; |
- } else if (base::strcasecmp(header.name.data(), |
- net::HttpRequestHeaders::kContentType) == 0) { |
+ } else if (base::EqualsCaseInsensitiveASCII( |
+ name_piece, net::HttpRequestHeaders::kContentType)) { |
content_type = header.value; |
continue; |
} |