summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--media/libstagefright/http/MediaHTTP.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/media/libstagefright/http/MediaHTTP.cpp b/media/libstagefright/http/MediaHTTP.cpp
index 2d9b3d4..801ff26 100644
--- a/media/libstagefright/http/MediaHTTP.cpp
+++ b/media/libstagefright/http/MediaHTTP.cpp
@@ -53,7 +53,10 @@ status_t MediaHTTP::connect(
if (headers != NULL) {
extHeaders = *headers;
}
- extHeaders.add(String8("User-Agent"), String8(MakeUserAgent().c_str()));
+
+ if (extHeaders.indexOfKey(String8("User-Agent")) < 0) {
+ extHeaders.add(String8("User-Agent"), String8(MakeUserAgent().c_str()));
+ }
bool success = mHTTPConnection->connect(uri, &extHeaders);