0

我有一个调用 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...").

有没有人见过这样的东西?

你可以在这里自己查一下,只要放一个像php或ios这样的词

4

2 回答 2

1

尝试更改charset=utf-8charset=UTF-8

于 2012-08-07T17:38:13.013 回答
1

看起来您的服务器正在根据content-type标头进行验证。它似乎想要text/xml,而您正在发送application/x-www-form-urlencoded(这是 的默认值$.ajax)。

尝试text/xml在您的$.ajax通话中明确设置内容类型。(参考

于 2012-08-07T17:41:51.230 回答