我有一个调用php脚本的页面。在MAMP上一切正常但是当我将它上传到服务器时,我收到以下错误:
Call Request failed! Status code: 4000
Reason - Caught an HttpRequestValidationException due to some bad characters in the request. Make sure your post request is encoded as xml, preferable as UTF-8 ('Content-Type: text/xml; charset=utf-8'). Exception: A potentially dangerous Request.Form value was detected from the client (<?xml version="..."utf-8"?> <uclassify xmlns="ht...").
有没有人见过这样的东西?
你可以自己检查here只需要像php或ios这样的单词
答案 0 :(得分:1)
尝试将charset=utf-8
更改为charset=UTF-8
答案 1 :(得分:1)
看起来您的服务器正在根据content-type
标头进行验证。它似乎需要text/xml
,而您正在发送application/x-www-form-urlencoded
(这是$.ajax
的默认值)。
尝试在text/xml
来电中明确将内容类型设置为$.ajax
。 (reference)