I try to manually build a Json string to send to the client.
{'result':'hhh'}
When I use
echo json_encode(array('result'=>'hhh'));
It arrives perfectly. But when I do
echo "{'result':'hhh'}";
It isn't
The only difference I find between the two requests is that the first one has:
Content-Length: 9 header
and the second one (which does not work)
Content-Length: 16 header
Both the strings should have been content length: 16!!! I guess it something to do with the combination of ZF and Mootools.