Welcome Guest, Not a member yet? Register   Sign In
Possible codeigniter bug in the HTTP body response
#1

[eluser]Raff_Gh[/eluser]
Do any of you know why codeigniter prefixes 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 beacuase ajax string cannot be parsed properly... To solve temporarily the situation I did the following :

Echoing ajax this way :
Code:
-{"hello":"world"}

and then retrieve this data in the following way:

Code:
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... anyone has any clue why this error occurs with CI ?


Messages In This Thread
Possible codeigniter bug in the HTTP body response - by El Forum - 08-17-2013, 04:00 AM
Possible codeigniter bug in the HTTP body response - by El Forum - 08-18-2013, 02:17 AM
Possible codeigniter bug in the HTTP body response - by El Forum - 08-18-2013, 03:56 PM
Possible codeigniter bug in the HTTP body response - by El Forum - 08-19-2013, 01:53 AM
Possible codeigniter bug in the HTTP body response - by El Forum - 08-21-2013, 03:30 AM



Theme © iAndrew 2016 - Forum software by © MyBB