1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

HLS: Add missing newline to end of session manifest. v6.0.143 (#4115)

The session HLS manifest file lacks a terminating newline in the final
line.
This may cause strict players to reject it.

---------

Co-authored-by: winlin <winlinvip@gmail.com>
This commit is contained in:
Marc Olzheim 2024-07-24 16:37:30 +02:00 committed by GitHub
parent 3e1a4e4439
commit f76be5fe9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 5 additions and 3 deletions

View file

@ -185,6 +185,7 @@ srs_error_t SrsHlsStream::serve_new_session(ISrsHttpResponseWriter* w, ISrsHttpM
if (!hr->query().empty() && hr->query_get(SRS_CONTEXT_IN_HLS).empty()) {
ss << "&" << hr->query();
}
ss << SRS_CONSTS_LF;
std::string res = ss.str();
int length = res.length();

View file

@ -9,6 +9,6 @@
#define VERSION_MAJOR 6
#define VERSION_MINOR 0
#define VERSION_REVISION 142
#define VERSION_REVISION 143
#endif

View file

@ -1541,7 +1541,7 @@ VOID TEST(ProtocolHTTPTest, VodStreamHandlers)
HELPER_ASSERT_SUCCESS(r.set_url("/index.m3u8?hls_ctx=123456", false));
HELPER_ASSERT_SUCCESS(h.serve_http(&w, &r));
__MOCK_HTTP_EXPECT_STREQ4(200, "/index.m3u8?hls_ctx=123456", w);
__MOCK_HTTP_EXPECT_STREQ4(200, "/index.m3u8?hls_ctx=123456\n", w);
MockResponseWriter w2;
HELPER_ASSERT_SUCCESS(h.serve_http(&w2, &r));
@ -1563,7 +1563,7 @@ VOID TEST(ProtocolHTTPTest, VodStreamHandlers)
HELPER_ASSERT_SUCCESS(r.set_url("/index.m3u8?hls_ctx=123456", false));
HELPER_ASSERT_SUCCESS(h.serve_http(&w, &r));
__MOCK_HTTP_EXPECT_STREQ4(200, "/index.m3u8?hls_ctx=123456", w);
__MOCK_HTTP_EXPECT_STREQ4(200, "/index.m3u8?hls_ctx=123456\n", w);
MockResponseWriter w2;
HELPER_ASSERT_SUCCESS(h.serve_http(&w2, &r));