Actionscript 对nginx服务器的URL请求崩溃
同样的代码在lighttpd和apache上运行良好,最近我切换到nginx,当我在本地运行它时,应用程序开始崩溃。但是,它在浏览器中使用相同的代码时运行良好。 下面是向服务器发出请求的源代码Actionscript 对nginx服务器的URL请求崩溃,actionscript,nginx,Actionscript,Nginx,同样的代码在lighttpd和apache上运行良好,最近我切换到nginx,当我在本地运行它时,应用程序开始崩溃。但是,它在浏览器中使用相同的代码时运行良好。 下面是向服务器发出请求的源代码 public function ApiCall(methodName:String,params:Object=null) { super(); url.method = URLRequestMethod.POST; var variables:URL
public function ApiCall(methodName:String,params:Object=null)
{
super();
url.method = URLRequestMethod.POST;
var variables:URLVariables = new URLVariables();
variables.call = methodName;
variables.params = JSON.encode(params);
url.data = variables;
this.dataFormat = URLLoaderDataFormat.TEXT;
this.addEventListener(Event.COMPLETE, onLoadComplete);
this.addEventListener(IOErrorEvent.IO_ERROR, onLoadError);
}
public function post():void
{
try
{
this.load(url);
}
catch (e:Error)
{
trace("Error Message : " + e.message);
}
// debug
trace(url.data.call + " Params : " + url.data.params);
}
flash播放器只是崩溃了,没有任何有意义的错误消息
我在php端进行了检查,由于某种原因,$\u POST数组为空
有什么想法吗?问题是用于发出http请求的URL,我在as3代码中使用了,域和重写规则都是,这不知怎么地破坏了请求
从AS3中的url中删除www修复了该问题。问题是用于发出http请求的url,我在AS3代码中使用了该url,域和重写规则是,这以某种方式破坏了请求
在AS3中从url中删除www修复了这个问题。+1我确信这会发生在很多人身上-好的问题/答案。+1我确信这会发生在很多人身上-好的问题/答案。