大型JSON数据包导致远程CFC在ajax调用期间无响应

Pao*_*rdo 2 coldfusion jquery cfc railo

我正在做一个ajax帖子,通过AJAX向远程CFC提交用户评论.代码在所有时间都可以正常工作,除非注释字符长度达到约7300个字符.然后,好像CFC没有做任何事情.

在Firebug中,我可以看到,对于提交的所有评论<7300个字符,响应恢复正常,但是,对于> 7300个字符的数据包,此响应为空.

所以,我自然地在被调用的远程cfc方法中添加了一些简单的日志记录.我删除了所有代码,只是做了一些简单的日志记录,甚至没有记录,因为没有记录.从评论中删除一些字符并重新提交,然后再次运行.

所以有些事情让我相信,对于发送的大于7300个字符的大包,CFC会以某种方式拒绝请求.这可能吗?可能是什么导致了这个?我查看了管理员,但没有看到任何与此相关的设置.

任何帮助,将不胜感激.谢谢.

以下是CFC的代码.我发现提交任何jquery/ajax javascript代码是不必要的,因为它肯定有效,这个问题与请求的大小有关,但如果你觉得它可能会有所帮助,请告诉我,我也会发布它.

CFC被称为:

<cffunction name="callFunction" access="remote" returntype="any" output="false">
        <cfargument name="cfc" type="string" required="yes" hint="The path or alias for the cfc to call" />
        <cfargument name="functionName" type="string" required="yes" hint="The function name within the requested cfc to call" />
        <cfargument name="returnFormat" type="string" default="json" hint="The format of the repsonse: xml, json, wsdl, etc." />
        <cfargument name="jsonData" type="string" required="false" />
        <cfargument name="isLoginRequired" type="boolean" default="true" />
        <cfset application.Security.LogItem("CFC: #arguments.cfc#", false, false) />
        <cfset application.Security.LogItem(arguments.jsonData, false, false) />

        <cfset var sResponse = this.Utilities.GetNewResponse() />
        <cfreturn sResponse /></cffunction>
Run Code Online (Sandbox Code Playgroud)

ora*_*ips 7

您是通过HTTP GET还是POST(即URL或FORM)进行呼叫?因为在大多数浏览器中GET的大小有限.