I have a web site that is build using Flash 8 and actionscript 2.0. This connects to a coldfusion 7 server to print content for the user like reports etc. This has been working for many years now but since an update to Flash Player, since the 15+ release, this printing has stopped working and now I get the following error
500
java.lang.IllegalArgumentException at coldfusion.filter.FormScope.parseQueryString(FormScope.java:283) at coldfusion.filter.FormScope.parsePostData(FormScope.java:255) at coldfusion.filter.FormScope.fillForm(FormScope.java:206) at coldfusion.filter.FusionContext.SymTab_initForRequest(FusionContext.java:384) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:33) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:115) at coldfusion.CfmServlet.service(CfmServlet.java:107) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:78) at jrun.servlet.ServletInvoker.invoke(ServletInvoker.java:91) at jrun.servlet.JRunInvokerChain.invokeNext(JRunInvokerChain.java:42) at jrun.servlet.JRunRequestDispatcher.invoke(JRunRequestDispatcher.java:259) at jrun.servlet.ServletEngineService.dispatch(ServletEngineService.java:543) at jrun.servlet.jrpp.JRunProxyService.invokeRunnable(JRunProxyService.java:203) at jrunx.scheduler.ThreadPool$ThreadThrottle.invokeRunnable(ThreadPool.java:428) at jrunx.scheduler.WorkerThread.run(WorkerThread.java:66)
I have tried the solution from Handling 500 JRun servlet in ColdFusion. This stopped the error showing on screen but instead i just get nothing displaying
The following code is the way in which I call the coldfusion page
var xmlString:String = "<rootNode>";
// More xml
xmlString += "</rootNode>";
var xmlObj = new XML(xmlString);
xmlObj.contentType = "text/xml";
xmlObj.send( "https://domainname.com/printme.cfm", "_blank");
From testing I noticed that if I make xmlString an empty string then the above error stops but as soon as it is any text the error above reappears
Does any one have any ideas, thanks
EDIT As requested here are the headers from ServiceCapture
The first is from FireFox using flash player 15.0.0.233 and gives the 500 error. the second is from IE using flash player 10.2.153.1 and prints correctly. Both are accessing the same web site
One thing I noticed from ServiceCapture is that when it works the xml text is listed in a "Text" tab on the request side. When it does not work the xml is shown in a "Parameters" tab
POST /printme.cfm HTTP/1.1
Host: domainname.com
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:33.0) Gecko/20100101 Firefox/33.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-GB,en;q=0.5
Accept-Encoding: gzip, deflate
Cookie: CFID=8989; CFTOKEN=556456456456; JSESSIONID=4544545f93bea93a591513
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded
Content-Length: 2100
POST /printme.cfm HTTP/1.1
Accept: */*
Content-Type: text/xml
Accept-Language: en-gb
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; OfficeLiveConnector.1.3; OfficeLivePatch.0.0; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Host: domainname.com
Content-Length: 2100
Cookie: CFID=23232; CFTOKEN=656565656; JSESSIONID=583078632234aa20506970
EDIT 2; I noticed that in the first POST block the content-Type is set to "application/x-www-form-urlencoded" which is the default. For some reason the newer versions of flash player seam to be ignoring the line
xmlObj.contentType = "text/xml";
Additionally if I remove this line then I get the 500 error for both versions of player
Turns out that the contentType "text/xml" was deprecated and the newer version of flash player must be more strict about setting it to valid value and updating my value to the default. As soon as I changed it to "text/plain" all started working