Skip to content

Commit

Permalink
Support parsing vhost splited by single seperator. 2.0.268
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Dec 23, 2019
1 parent 01a4503 commit c5f3157
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ Remark:

## History

* v2.0, 2019-12-23, Fix [srs-librtmp #22](https://github.com/ossrs/srs-librtmp/issues/22), parse vhost splited by single seperator. 2.0.268
* v2.0, 2019-12-23, Fix [srs-librtmp #25](https://github.com/ossrs/srs-librtmp/issues/25), build srs-librtmp on windows. 2.0.267
* v2.0, 2019-12-13, Support openssl versions greater than 1.1.0. 2.0.266
* <strong>v2.0, 2019-11-29, [2.0 release7(2.0.265)][r2.0r7] released. 86994 lines.</strong>
Expand Down
2 changes: 1 addition & 1 deletion trunk/src/core/srs_core.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 267
#define VERSION_REVISION 268

// generated by configure, only macros.
#include <srs_auto_headers.hpp>
Expand Down
1 change: 1 addition & 0 deletions trunk/src/protocol/srs_rtmp_utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ void srs_vhost_resolve(string& vhost, string& app, string& param)
app = srs_string_replace(app, ",", "?");
app = srs_string_replace(app, "...", "?");
app = srs_string_replace(app, "&&", "?");
app = srs_string_replace(app, "&", "?");
app = srs_string_replace(app, "=", "?");
if (srs_string_ends_with(app, "/_definst_")){
app = srs_erase_last_substr(app, "/_definst_");
Expand Down
5 changes: 5 additions & 0 deletions trunk/src/utest/srs_utest_protocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,11 @@ VOID TEST(ProtocolUtilityTest, VhostResolve)
srs_vhost_resolve(vhost, app, param);
EXPECT_STREQ("changed1", vhost.c_str());
EXPECT_STREQ("app", app.c_str());

app = "app?vhost=changed1&query=true";
srs_vhost_resolve(vhost, app, param);
EXPECT_STREQ("changed1", vhost.c_str());
EXPECT_STREQ("app", app.c_str());

app = "app?other=true&&vhost=changed2&&query=true";
srs_vhost_resolve(vhost, app, param);
Expand Down

0 comments on commit c5f3157

Please sign in to comment.