summaryrefslogtreecommitdiffstats
path: root/media
diff options
context:
space:
mode:
authorAndreas Huber <andih@google.com>2010-12-16 10:45:24 -0800
committerAndreas Huber <andih@google.com>2010-12-16 10:45:24 -0800
commitac13b81c590386b3a42e381b31d7614ca53b79c5 (patch)
tree4af5936b15961a4d658ff9c106b8a4fb5f614838 /media
parente071b055cee301d71335519601474c62b10af411 (diff)
downloadframeworks_av-ac13b81c590386b3a42e381b31d7614ca53b79c5.zip
frameworks_av-ac13b81c590386b3a42e381b31d7614ca53b79c5.tar.gz
frameworks_av-ac13b81c590386b3a42e381b31d7614ca53b79c5.tar.bz2
The HTTP/1.1 Host request header must include port if it's not the default (80).
Change-Id: Idcc1429fbeecef99dad435208c9a1bd481132e2b
Diffstat (limited to 'media')
-rw-r--r--media/libstagefright/NuHTTPDataSource.cpp3
-rw-r--r--media/libstagefright/httplive/M3UParser.cpp9
2 files changed, 12 insertions, 0 deletions
diff --git a/media/libstagefright/NuHTTPDataSource.cpp b/media/libstagefright/NuHTTPDataSource.cpp
index 4ce7265..653c85e 100644
--- a/media/libstagefright/NuHTTPDataSource.cpp
+++ b/media/libstagefright/NuHTTPDataSource.cpp
@@ -158,6 +158,9 @@ status_t NuHTTPDataSource::connect(
request.append(" HTTP/1.1\r\n");
request.append("Host: ");
request.append(mHost);
+ if (mPort != 80) {
+ request.append(StringPrintf(":%u", mPort).c_str());
+ }
request.append("\r\n");
if (offset != 0) {
diff --git a/media/libstagefright/httplive/M3UParser.cpp b/media/libstagefright/httplive/M3UParser.cpp
index d4a29c0..38a7cc5 100644
--- a/media/libstagefright/httplive/M3UParser.cpp
+++ b/media/libstagefright/httplive/M3UParser.cpp
@@ -14,6 +14,10 @@
* limitations under the License.
*/
+//#define LOG_NDEBUG 0
+#define LOG_TAG "M3UParser"
+#include <utils/Log.h>
+
#include "include/M3UParser.h"
#include <media/stagefright/foundation/AMessage.h>
@@ -88,6 +92,9 @@ static bool MakeURL(const char *baseURL, const char *url, AString *out) {
if (!strncasecmp("http://", url, 7)) {
// "url" is already an absolute URL, ignore base URL.
out->setTo(url);
+
+ LOGV("base:'%s', url:'%s' => '%s'", baseURL, url, out->c_str());
+
return true;
}
@@ -108,6 +115,8 @@ static bool MakeURL(const char *baseURL, const char *url, AString *out) {
out->append(url);
}
+ LOGV("base:'%s', url:'%s' => '%s'", baseURL, url, out->c_str());
+
return true;
}