如何在icecast url 认证中添加监听器时向post 参数添加一些参数
How to add some parameter to post parameter when listener add in icecast url authentication
Icecast 在监听器添加时将动作、挂载、服务器等信息发送到listener_joined.php。我要icecast发送其他信息
Note: The mount here (unlike the start/end options) states the requested url including any query parameters, so for instance the requested URL can be /stream.ogg&session=xyz, but note that each option data is escaped before being passed via POST.
我读了这个。所以我试着得到
"/example.ogg&session=xyz"
但我明白了
"404 - The file you requested could not be found"
我的icecast配置是这样的。
<mount>
<mount-name>/example.ogg</mount-name>
<authentication type="url">
<option name="listener_add" value="http://localhost/listener_joined.php"/>
<option name="listener_remove" value="http://localhost/listener_left.php"/>
<option name="username" value="user"/>
<option name="password" value="pass"/>
<option name="auth_header" value="icecast-auth-user: 1"/>
</authentication>
</mount>
在icecast url认证中添加listener时,如何在post参数中添加一些参数?
HTTP 1.0 RFC 中指定的正确 URL 查询参数分隔符是问号“?”。
所以你的 URL 部分应该是:/example.ogg?session=xyz
而不是 /example.ogg&session=xyz
。后者将被解释为完整路径,因为它不存在,所以 404 是合适的。
Icecast 在监听器添加时将动作、挂载、服务器等信息发送到listener_joined.php。我要icecast发送其他信息
Note: The mount here (unlike the start/end options) states the requested url including any query parameters, so for instance the requested URL can be /stream.ogg&session=xyz, but note that each option data is escaped before being passed via POST.
我读了这个。所以我试着得到
"/example.ogg&session=xyz"
但我明白了
"404 - The file you requested could not be found"
我的icecast配置是这样的。
<mount>
<mount-name>/example.ogg</mount-name>
<authentication type="url">
<option name="listener_add" value="http://localhost/listener_joined.php"/>
<option name="listener_remove" value="http://localhost/listener_left.php"/>
<option name="username" value="user"/>
<option name="password" value="pass"/>
<option name="auth_header" value="icecast-auth-user: 1"/>
</authentication>
</mount>
在icecast url认证中添加listener时,如何在post参数中添加一些参数?
HTTP 1.0 RFC 中指定的正确 URL 查询参数分隔符是问号“?”。
所以你的 URL 部分应该是:/example.ogg?session=xyz
而不是 /example.ogg&session=xyz
。后者将被解释为完整路径,因为它不存在,所以 404 是合适的。