diff options
author | Andreas Huber <andih@google.com> | 2010-12-21 14:51:44 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2010-12-21 14:51:44 -0800 |
commit | 1528d8f47cc6f0e0d5c9f905f82d15a35ce1bafb (patch) | |
tree | 68d6ed41b3b4878f63fc561e7e937a242a0b9ea6 | |
parent | 25a9ed53312f92adda6c0397be7fd38ecc780bd8 (diff) | |
parent | c0bfdb257c95486d2b6d60745deb8f04c07cbb95 (diff) | |
download | frameworks_base-1528d8f47cc6f0e0d5c9f905f82d15a35ce1bafb.zip frameworks_base-1528d8f47cc6f0e0d5c9f905f82d15a35ce1bafb.tar.gz frameworks_base-1528d8f47cc6f0e0d5c9f905f82d15a35ce1bafb.tar.bz2 |
Merge "Better handling of forming absolute https URLs, runtime error on https:// access."
-rw-r--r-- | media/libstagefright/httplive/LiveSession.cpp | 4 | ||||
-rw-r--r-- | media/libstagefright/httplive/M3UParser.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/media/libstagefright/httplive/LiveSession.cpp b/media/libstagefright/httplive/LiveSession.cpp index cc7189c..5c4c5df 100644 --- a/media/libstagefright/httplive/LiveSession.cpp +++ b/media/libstagefright/httplive/LiveSession.cpp @@ -179,9 +179,9 @@ status_t LiveSession::fetchFile(const char *url, sp<ABuffer> *out) { if (!strncasecmp(url, "file://", 7)) { source = new FileSource(url + 7); + } else if (strncasecmp(url, "http://", 7)) { + return ERROR_UNSUPPORTED; } else { - CHECK(!strncasecmp(url, "http://", 7)); - status_t err = mHTTPDataSource->connect(url); if (err != OK) { diff --git a/media/libstagefright/httplive/M3UParser.cpp b/media/libstagefright/httplive/M3UParser.cpp index 38a7cc5..95f6741 100644 --- a/media/libstagefright/httplive/M3UParser.cpp +++ b/media/libstagefright/httplive/M3UParser.cpp @@ -84,12 +84,13 @@ static bool MakeURL(const char *baseURL, const char *url, AString *out) { out->clear(); if (strncasecmp("http://", baseURL, 7) + && strncasecmp("https://", baseURL, 8) && strncasecmp("file://", baseURL, 7)) { // Base URL must be absolute return false; } - if (!strncasecmp("http://", url, 7)) { + if (!strncasecmp("http://", url, 7) || !strncasecmp("https://", url, 8)) { // "url" is already an absolute URL, ignore base URL. out->setTo(url); |