我正在制作一个向第三方API发出HTTP请求的Wordpress插件。在Wordpress之外,它工作得很好,但是当在我的Wordpress服务器上使用它时,它似乎添加了许多头文件,所以我现在有了重复的头文件,请求失败。
有人能帮我阻止Wordpress添加重复的Content-Type和Content-Length标题吗?
Content-Type: application/x-www-form-urlencoded
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36
Content-Length: 20
Content-Length: 20
Content-Type: application/x-www-form-urlencoded
发布于 2016-04-19 17:44:33
我修复了这个问题,方法是在进行调用的脚本中执行硬过滤,确保所有标头只在CURL标头数组中出现一次。
https://stackoverflow.com/questions/36713299
复制相似问题