【问题标题】:How to return nothing for mod_xml_curl?如何为 mod_xml_curl 不返回任何内容?
【发布时间】:2011-12-09 13:22:57
【问题描述】:

这里的手册http://wiki.freeswitch.org/wiki/Mod_xml_curl 说,如果 curl 服务希望 Freeswitch 基于静态 XML 处理它的请求,它应该“不返回任何内容”。

“不返回任何内容”究竟是什么意思?

0) 不响应客户端请求(超时) 1) 返回 HTTP 404 错误? 2) 返回 HTTP 204 错误(无内容)? 3) 返回内容为零的 HTTP 200? 4) 返回带有任何空格但没有 XML 标记的 HTTP 200?

其他的还是以上的某种组合?

谢谢

【问题讨论】:

    标签: xml curl freeswitch


    【解决方案1】:

    我相信答案是“以上都不是”;你应该回来

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <document type="freeswitch/xml">
    </document>
    

    为了完整起见,如果您想结束处理(即不再搜索绑定),正确的响应是

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <document type="freeswitch/xml">
        <section name="result">
            <result status="not found" />
        </section>
    </document>
    

    【讨论】:

    • 你能在 mod_xml_curl 中使用 method='GET' 吗?我不断收到 POST 方法:(
    • 在xml_curl.conf.xml绑定配置中可以添加如下参数:&lt;param name="method" value="GET"/&gt;
    猜你喜欢
    • 2020-04-27
    • 2019-04-06
    • 2012-02-15
    • 2020-09-07
    • 2021-11-22
    • 2015-11-06
    • 2013-11-14
    • 2014-03-23
    • 2012-08-25
    相关资源
    最近更新 更多