3.2.001 and RAILO-1004: Content-Type wrong when returnFormat="json"

16 views
Skip to first unread message

Robert Zehnder

unread,
Nov 1, 2010, 7:07:29 PM11/1/10
to Railo
I don't know if I should have just put this in the pre-release group,
but here goes. To preface, I have a client running on Railo and they
use ajax extensively. I updated to the newest version of Railo and it
"broke" all the ajax callback parsing. Actually, Railo is working
just fine, but my ajax callback methods were expecting "text/html"
data to be returned that I can use $.jsonParse() to convert to an
object. Instead Railo is now returning an actual object to me
"application/json".

Is there an easy way to break it again or should I look to use
cfcontent to force it back to text/html on my ajax proxies? :)

Michael Offner

unread,
Nov 2, 2010, 3:21:23 AM11/2/10
to ra...@googlegroups.com
Returning text/html makes no sense in this case, because that we have broken with ACF and we are returning application/json. Of course we are open for a discussion, but in meantime please simply use cfcontent in your cfc or the application.cfc

/micha

Von meinem iPhone gesendet

Robert Zehnder

unread,
Nov 2, 2010, 9:17:46 AM11/2/10
to Railo
Yeah, I discussed this with Todd last night. Actually, I love the
fact that it returns native json objects now, it makes life much
easier. To get around the problem, instead of edit *a lot* of
javascript, on my proxies I will set the returnFormat to plain and
just use serializeJSON() to serial my response.
Reply all
Reply to author
Forward
0 new messages