Closed git001 closed 3 years ago
I think that reasone in behaviour of ngx_rtmp_netcall_http_format_session
.
On connect
event there not all params are present.
And request string produced wrong formated.
I'll try to rewrite that code.
Last code from branch issue-317-fix-double-ampersand-in-event-request
. I got that data via ffplay
call through php:
REQUEST=connect; POST={"call":"connect","app":"rtmp","flashver":"LNX 9,0,124,2","swfurl":"","tcurl":"rtmp:\\/\\/localhost:1935\\/rtmp","pageurl":"","epoch":"324785757","addr":"127.0.0.1","clientid":"10"}; RAW POST: call=connect&app=rtmp&flashver=LNX%209,0,124,2&swfurl=&tcurl=rtmp://localhost:1935/rtmp&pageurl=&epoch=324785757&addr=127.0.0.1&clientid=10
REQUEST=play; GET=[]; POST={"call":"play","name":"live","start":"4294965296","duration":"0","reset":"0","addr":"127.0.0.1","clientid":"10","app":"rtmp","flashver":"LNX 9,0,124,2","tcurl":"rtmp:\\/\\/localhost:1935\\/rtmp"}
REQUEST=disconnect; POST={"call":"disconnect","bytes_in":"368","bytes_out":"412","addr":"127.0.0.1","clientid":"10","app":"rtmp","flashver":"LNX 9,0,124,2","tcurl":"rtmp:\\/\\/localhost:1935\\/rtmp"}; RAW POST: call=disconnect&bytes_in=368&bytes_out=412&addr=127.0.0.1&clientid=10&app=rtmp&flashver=LNX%209,0,124,2&tcurl=rtmp://localhost:1935/rtmp
REQUEST=play-done; GET=[]; POST={"call":"play_done","name":"live","bytes_in":"368","bytes_out":"412","addr":"127.0.0.1","clientid":"10","app":"rtmp","flashver":"LNX 9,0,124,2","tcurl":"rtmp:\\/\\/localhost:1935\\/rtmp"}
If you want to try it - look at #331 PR.
Merged into dev
.
I have seen in the on_connect notification that the addr field have an addition & which looks wrong.
It's only when call=connect and only after epoch which I have seen from tshark output.
I assume that this line could be the reason but I'm not sure because I don't know the code at all.
https://github.com/sergey-dryabzhinsky/nginx-rtmp-module/blob/dev/ngx_rtmp_notify_module.c#L547