We are developing an ajax app that sends and receives JSON data via xhr, and have run into a problem with FF3+ (and potentially something similar in Webkit browsers).
myxhr.setRequestHeader( "Content-type", "text/json" );
when looking at the request headers in Firebug, we see:
Content-type: text/json; charset=UTF-8
Normally this is not a problem, but it seems that the proprietary MS chat server we are using (CWA), is doing a straight string comparison. We think it looks somethign like this (pseudo-code):
if( request.responseType == "text/json" )
We have also toyed with a server-side solution. While we can't change the CWA code, we can manage the instance of IIS sitting between our request and the CWA server that ultimately processes it, so we considered having IIS inspect and strip out the "; charset=UTF-8" part of the content-type header for all requests to a particular page. How difficult would this be, and how much of a performance hit would we take? (It's a very high volume system).
Thanks in advance,