diff --git a/trunk/src/protocol/srs_http_stack.cpp b/trunk/src/protocol/srs_http_stack.cpp index 2f4e6dcb8..b798c7de7 100644 --- a/trunk/src/protocol/srs_http_stack.cpp +++ b/trunk/src/protocol/srs_http_stack.cpp @@ -116,7 +116,7 @@ bool srs_go_http_body_allowd(int status) // returns "application/octet-stream". string srs_go_http_detect(char* data, int size) { - // TODO: Implement the content detecting. + // TODO: Implement the request content-type detecting. return "application/octet-stream"; // fallback } diff --git a/trunk/src/utest/srs_utest_http.cpp b/trunk/src/utest/srs_utest_http.cpp index 9da963ef4..6b33b04d6 100644 --- a/trunk/src/utest/srs_utest_http.cpp +++ b/trunk/src/utest/srs_utest_http.cpp @@ -35,3 +35,8 @@ VOID TEST(ProtocolHTTPTest, StatusCode2Text) EXPECT_FALSE(srs_go_http_body_allowd(SRS_CONSTS_HTTP_NotModified)); EXPECT_TRUE(srs_go_http_body_allowd(SRS_CONSTS_HTTP_OK)); } + +VOID TEST(ProtocolHTTPTest, ResponseDetect) +{ + EXPECT_STREQ("application/octet-stream", srs_go_http_detect(NULL, 0).c_str()); +}