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

For #1110, Refine params in http callback. 2.0.253

This commit is contained in:
winlin 2018-08-11 10:12:40 +08:00
parent 33f6e9a21f
commit 6cea551c64
3 changed files with 5 additions and 12 deletions

View file

@ -333,6 +333,7 @@ Remark:
## History
* v2.0, 2018-08-11, For [#1110][bug #1110], Refine params in http callback. 2.0.253
* v2.0, 2018-08-05, Refine HTTP-FLV latency, support realtime mode. 2.0.252
* v2.0, 2018-08-04, For [#1110][bug #1110], Support params in http callback. 2.0.251
* v2.0, 2018-08-02, For [#1031][bug #1031], SRS edge support douyu.com. 2.0.250

View file

@ -131,15 +131,6 @@ int SrsHttpHooks::on_publish(string url, SrsRequest* req)
int client_id = _srs_context->get_id();
string stream = req->stream;
// Pass params in stream, @see https://github.com/ossrs/srs/issues/1031#issuecomment-409745733
if (!req->param.empty()) {
if (req->param.find("?") != 0) {
stream += "?";
}
stream += req->param;
}
std::stringstream ss;
ss << SRS_JOBJECT_START
<< SRS_JFIELD_STR("action", "on_publish") << SRS_JFIELD_CONT
@ -148,7 +139,8 @@ int SrsHttpHooks::on_publish(string url, SrsRequest* req)
<< SRS_JFIELD_STR("vhost", req->vhost) << SRS_JFIELD_CONT
<< SRS_JFIELD_STR("app", req->app) << SRS_JFIELD_CONT
<< SRS_JFIELD_STR("tcUrl", req->tcUrl) << SRS_JFIELD_CONT // Add tcUrl for auth publish rtmp stream client
<< SRS_JFIELD_STR("stream", stream)
<< SRS_JFIELD_STR("stream", req->stream) << SRS_JFIELD_CONT
<< SRS_JFIELD_STR("param", req->param)
<< SRS_JOBJECT_END;
std::string data = ss.str();
@ -181,7 +173,7 @@ void SrsHttpHooks::on_unpublish(string url, SrsRequest* req)
<< SRS_JFIELD_STR("ip", req->ip) << SRS_JFIELD_CONT
<< SRS_JFIELD_STR("vhost", req->vhost) << SRS_JFIELD_CONT
<< SRS_JFIELD_STR("app", req->app) << SRS_JFIELD_CONT
<< SRS_JFIELD_STR("stream", req->stream)<< SRS_JFIELD_CONT
<< SRS_JFIELD_STR("stream", req->stream) << SRS_JFIELD_CONT
<< SRS_JFIELD_STR("param", req->param)
<< SRS_JOBJECT_END;

View file

@ -31,7 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
// current release version
#define VERSION_MAJOR 2
#define VERSION_MINOR 0
#define VERSION_REVISION 252
#define VERSION_REVISION 253
// generated by configure, only macros.
#include <srs_auto_headers.hpp>