summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--net/http/http_response_headers.cc2
-rw-r--r--net/http/http_response_headers.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc
index f0c5e46..1d65bab 100644
--- a/net/http/http_response_headers.cc
+++ b/net/http/http_response_headers.cc
@@ -640,7 +640,7 @@ bool HttpResponseHeaders::IsRedirect(string* location) const {
// If we lack a Location header, then we can't treat this as a redirect.
// We assume that the first non-empty location value is the target URL that
// we want to follow. TODO(darin): Is this consistent with other browsers?
- size_t i = -1;
+ size_t i = string::npos;
do {
i = FindHeader(++i, "location");
if (i == string::npos)
diff --git a/net/http/http_response_headers.h b/net/http/http_response_headers.h
index fcd069a..1a93486 100644
--- a/net/http/http_response_headers.h
+++ b/net/http/http_response_headers.h
@@ -240,8 +240,8 @@ class HttpResponseHeaders :
// index |from|. Returns string::npos if not found.
size_t FindHeader(size_t from, const std::string& name) const;
- // Add a header->value pair to our list. If we already have header in our list,
- // append the value to it.
+ // Add a header->value pair to our list. If we already have header in our
+ // list, append the value to it.
void AddHeader(std::string::const_iterator name_begin,
std::string::const_iterator name_end,
std::string::const_iterator value_begin,