Possible codeigniter bug in the HTTP body response
Do any of you know why codeigniter prepends three characters /r (or /0 I
didn't figure out) to the body of any HTTP response?
When it comes to using ajax it's causing me going mad... To solve
temporarily the situation I did the following
Echoing ajax this way :: -{"hello":"world"}
and then retrieve this data in the following way:
var data1 = data.split("-");
alert(data1[0]);// this prints \r\r\r
alert(data1[1]);// this prints {"hello":"world"}
var data1 = JSON.parse(data1[1]);
But I leave you judge the cleaness of this solution... please help...
No comments:
Post a Comment