From fef474d5039990b79b530205269a02d5ee32466c Mon Sep 17 00:00:00 2001 From: winlin Date: Sun, 5 Sep 2021 15:05:06 +0800 Subject: [PATCH 1/2] Squash: Merge 4.0 --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0bac68ae4..8ae6a96e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: ################################################################ # Tests - name: Build test image - run: docker build --tag srs:test -f trunk/Dockerfile.test trunk + run: docker build --tag srs:test -f trunk/Dockerfile.test . # For utest - name: Run SRS utest run: docker run --rm srs:test bash -c 'make && ./objs/srs_utest' @@ -46,7 +46,7 @@ jobs: - name: Build SRS docker image run: | echo "Release ossrs/srs:$SRS_TAG" - docker build --tag ossrs/srs:$SRS_TAG trunk + docker build --tag ossrs/srs:$SRS_TAG -f trunk/Dockerfile . ################################################################ # Docker From 8aee0169cea886b4e8e621ff62c2b44fb8a7b1a6 Mon Sep 17 00:00:00 2001 From: Justin Kromlinger Date: Tue, 7 Sep 2021 02:15:27 +0200 Subject: [PATCH 2/2] Set empty HTTP paths to '/' to avoid malformed requests (#2329) This resolves #1610. --- trunk/src/protocol/srs_service_http_client.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trunk/src/protocol/srs_service_http_client.cpp b/trunk/src/protocol/srs_service_http_client.cpp index 4bf681ce8..12fbe0031 100644 --- a/trunk/src/protocol/srs_service_http_client.cpp +++ b/trunk/src/protocol/srs_service_http_client.cpp @@ -322,6 +322,10 @@ srs_error_t SrsHttpClient::post(string path, string req, ISrsHttpMessage** ppmsg return srs_error_wrap(err, "http: connect server"); } + if (path.size() == 0) { + path = "/"; + } + // send POST request to uri // POST %s HTTP/1.1\r\nHost: %s\r\nContent-Length: %d\r\n\r\n%s std::stringstream ss;