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>
pull/4127/head
Marc Olzheim 6 months ago committed by GitHub
parent 3e1a4e4439
commit f76be5fe9b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -7,6 +7,7 @@ The changelog for SRS.
<a name="v6-changes"></a> <a name="v6-changes"></a>
## SRS 6.0 Changelog ## SRS 6.0 Changelog
* v6.0, 2024-07-24, Merge [#4115](https://github.com/ossrs/srs/pull/4115): HLS: Add missing newline to end of session manifest. v6.0.143 (#4115)
* v6.0, 2024-07-24, Merge [#4029](https://github.com/ossrs/srs/pull/4029): Player: Fix empty img tag occupy 20px size in safari. v6.0.142 (#4029) * v6.0, 2024-07-24, Merge [#4029](https://github.com/ossrs/srs/pull/4029): Player: Fix empty img tag occupy 20px size in safari. v6.0.142 (#4029)
* v6.0, 2024-07-24, Merge [#4063](https://github.com/ossrs/srs/pull/4063): let http-remux ts stream support guess_has_av feature;. v6.0.141 (#4063) * v6.0, 2024-07-24, Merge [#4063](https://github.com/ossrs/srs/pull/4063): let http-remux ts stream support guess_has_av feature;. v6.0.141 (#4063)
* v6.0, 2024-07-24, Merge [#4116](https://github.com/ossrs/srs/pull/4116): Dockerfile: Consistently use proper ENV syntax using "=". v6.0.140 (#4116) * v6.0, 2024-07-24, Merge [#4116](https://github.com/ossrs/srs/pull/4116): Dockerfile: Consistently use proper ENV syntax using "=". v6.0.140 (#4116)

@ -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()) { if (!hr->query().empty() && hr->query_get(SRS_CONTEXT_IN_HLS).empty()) {
ss << "&" << hr->query(); ss << "&" << hr->query();
} }
ss << SRS_CONSTS_LF;
std::string res = ss.str(); std::string res = ss.str();
int length = res.length(); int length = res.length();

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

@ -1541,7 +1541,7 @@ VOID TEST(ProtocolHTTPTest, VodStreamHandlers)
HELPER_ASSERT_SUCCESS(r.set_url("/index.m3u8?hls_ctx=123456", false)); HELPER_ASSERT_SUCCESS(r.set_url("/index.m3u8?hls_ctx=123456", false));
HELPER_ASSERT_SUCCESS(h.serve_http(&w, &r)); 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; MockResponseWriter w2;
HELPER_ASSERT_SUCCESS(h.serve_http(&w2, &r)); 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(r.set_url("/index.m3u8?hls_ctx=123456", false));
HELPER_ASSERT_SUCCESS(h.serve_http(&w, &r)); 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; MockResponseWriter w2;
HELPER_ASSERT_SUCCESS(h.serve_http(&w2, &r)); HELPER_ASSERT_SUCCESS(h.serve_http(&w2, &r));

Loading…
Cancel
Save