diff options
Diffstat (limited to 'net/http')
-rw-r--r-- | net/http/http_response_headers.cc | 8 | ||||
-rw-r--r-- | net/http/http_response_headers_unittest.cc | 10 | ||||
-rw-r--r-- | net/http/http_util.cc | 2 |
3 files changed, 10 insertions, 10 deletions
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc index 47047c9..9b7ffc2 100644 --- a/net/http/http_response_headers.cc +++ b/net/http/http_response_headers.cc @@ -329,7 +329,7 @@ void HttpResponseHeaders::Parse(const std::string& raw_input) { // ParseStatusLine adds a normalized status line to raw_headers_ std::string::const_iterator line_begin = raw_input.begin(); std::string::const_iterator line_end = - find(line_begin, raw_input.end(), '\0'); + std::find(line_begin, raw_input.end(), '\0'); // has_headers = true, if there is any data following the status line. // Used by ParseStatusLine() to decide if a HTTP/0.9 is really a HTTP/1.0. bool has_headers = (line_end != raw_input.end() && @@ -457,7 +457,7 @@ std::string HttpResponseHeaders::GetStatusText() const { std::string::const_iterator begin = status_text.begin(); std::string::const_iterator end = status_text.end(); for (int i = 0; i < 2; ++i) - begin = find(begin, end, ' ') + 1; + begin = std::find(begin, end, ' ') + 1; return std::string(begin, end); } @@ -557,7 +557,7 @@ HttpVersion HttpResponseHeaders::ParseVersion( return HttpVersion(); } - std::string::const_iterator dot = find(p, line_end, '.'); + std::string::const_iterator dot = std::find(p, line_end, '.'); if (dot == line_end) { DVLOG(1) << "malformed version"; return HttpVersion(); @@ -604,7 +604,7 @@ void HttpResponseHeaders::ParseStatusLine( } // TODO(eroman): this doesn't make sense if ParseVersion failed. - std::string::const_iterator p = find(line_begin, line_end, ' '); + std::string::const_iterator p = std::find(line_begin, line_end, ' '); if (p == line_end) { DVLOG(1) << "missing response status; assuming 200 OK"; diff --git a/net/http/http_response_headers_unittest.cc b/net/http/http_response_headers_unittest.cc index b089cac..483667c 100644 --- a/net/http/http_response_headers_unittest.cc +++ b/net/http/http_response_headers_unittest.cc @@ -35,7 +35,7 @@ class HttpResponseHeadersTest : public testing::Test { // Transform "normal"-looking headers (\n-separated) to the appropriate // input format for ParseRawHeaders (\0-separated). void HeadersToRaw(std::string* headers) { - replace(headers->begin(), headers->end(), '\n', '\0'); + std::replace(headers->begin(), headers->end(), '\n', '\0'); if (!headers->empty()) *headers += '\0'; } @@ -51,10 +51,10 @@ void TestCommon(const TestData& test) { parsed->GetNormalizedHeaders(&headers); // Transform to readable output format (so it's easier to see diffs). - replace(headers.begin(), headers.end(), ' ', '_'); - replace(headers.begin(), headers.end(), '\n', '\\'); - replace(expected_headers.begin(), expected_headers.end(), ' ', '_'); - replace(expected_headers.begin(), expected_headers.end(), '\n', '\\'); + std::replace(headers.begin(), headers.end(), ' ', '_'); + std::replace(headers.begin(), headers.end(), '\n', '\\'); + std::replace(expected_headers.begin(), expected_headers.end(), ' ', '_'); + std::replace(expected_headers.begin(), expected_headers.end(), '\n', '\\'); EXPECT_EQ(expected_headers, headers); diff --git a/net/http/http_util.cc b/net/http/http_util.cc index b634cbf..e8cea2e 100644 --- a/net/http/http_util.cc +++ b/net/http/http_util.cc @@ -651,7 +651,7 @@ bool HttpUtil::HeadersIterator::GetNext() { name_begin_ = lines_.token_begin(); values_end_ = lines_.token_end(); - string::const_iterator colon = find(name_begin_, values_end_, ':'); + string::const_iterator colon = std::find(name_begin_, values_end_, ':'); if (colon == values_end_) continue; // skip malformed header |