Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f76aca98 authored by Andreas Huber's avatar Andreas Huber Committed by Android (Google) Code Review
Browse files

Merge "The HTTP/1.1 Host request header must include port if it's not the default (80)."

parents 82ca3706 3abb7dde
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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) {
+9 −0
Original line number Diff line number Diff line
@@ -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;
}