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

Refine the comments for http content-type detecting

This commit is contained in:
winlin 2019-12-14 23:34:09 +08:00
parent 4758a284d7
commit 474266eae7
2 changed files with 6 additions and 1 deletions

View file

@ -116,7 +116,7 @@ bool srs_go_http_body_allowd(int status)
// returns "application/octet-stream". // returns "application/octet-stream".
string srs_go_http_detect(char* data, int size) 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 return "application/octet-stream"; // fallback
} }

View file

@ -35,3 +35,8 @@ VOID TEST(ProtocolHTTPTest, StatusCode2Text)
EXPECT_FALSE(srs_go_http_body_allowd(SRS_CONSTS_HTTP_NotModified)); EXPECT_FALSE(srs_go_http_body_allowd(SRS_CONSTS_HTTP_NotModified));
EXPECT_TRUE(srs_go_http_body_allowd(SRS_CONSTS_HTTP_OK)); 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());
}