summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2013-03-13 18:31:20 -0700
committerKristian Monsen <kristianm@google.com>2013-03-14 10:17:19 -0700
commit872788f42523a0c05bc2fb43623d42344a247f2a (patch)
treeb6b0b399a917019d63f85eabab9646469169635e
parent7367b09a051730c94e0fcf731a2764ffd620fa20 (diff)
downloadchromium-872788f42523a0c05bc2fb43623d42344a247f2a.tar.gz
Fix for bug 8192440, enabled parsing of ICY headers
Let the http stack also parse ICY status headers. Change-Id: I2ab636bbb54bfc91a40168efcfc7025cb03bbb2e
-rw-r--r--net/http/http_util.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/net/http/http_util.cc b/net/http/http_util.cc
index f654a996..0c61d4c5 100644
--- a/net/http/http_util.cc
+++ b/net/http/http_util.cc
@@ -439,12 +439,19 @@ std::string HttpUtil::Quote(const std::string& str) {
int HttpUtil::LocateStartOfStatusLine(const char* buf, int buf_len) {
const int slop = 4;
const int http_len = 4;
+#ifdef ANDROID
+ const int icy_len = 3;
+#endif
if (buf_len >= http_len) {
int i_max = std::min(buf_len - http_len, slop);
for (int i = 0; i <= i_max; ++i) {
if (LowerCaseEqualsASCII(buf + i, buf + i + http_len, "http"))
return i;
+#ifdef ANDROID
+ if (LowerCaseEqualsASCII(buf + i, buf + i + icy_len, "icy"))
+ return i;
+#endif
}
}
return -1; // Not found