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

For #1657, fix the jsonp bug

This commit is contained in:
winlin 2020-11-05 17:57:22 +08:00
parent fc21b31714
commit d67b050935
8 changed files with 60 additions and 53 deletions

View file

@ -1691,7 +1691,13 @@ SrsHttpApi::~SrsHttpApi()
srs_error_t SrsHttpApi::on_start()
{
return srs_success;
srs_error_t err = srs_success;
if ((err = conn->set_jsonp(true)) != srs_success) {
return srs_error_wrap(err, "set jsonp");
}
return err;
}
srs_error_t SrsHttpApi::on_http_message(ISrsHttpMessage* req)
@ -1742,10 +1748,6 @@ srs_error_t SrsHttpApi::start()
return srs_error_wrap(err, "set cors=%d", v);
}
if ((err = conn->set_jsonp(true)) != srs_success) {
return srs_error_wrap(err, "set jsonp");
}
return conn->start();
}