Hey everyone , this is probably gonna be a tough one but I figured I would ask the flex world in case anyone else has run into this. We have a java backend being served up to us through a tomkat container. Couldn't tell you exactly what the version is but I could find out if its helpful. I know its running on http 1.1. We have our flex app being served up throuhg apache , and we proxy into the backend. No problems there.
Heres the issue, using flash builder , we've noticed in the network monitor , that certain restful calls to the backend fail , but upon inspection , the response body is intact and correct , and the server response is a 200. However , the flash player , throws an IO stream error , basically like the connection was prematurely terminated. We were able to determine , that certain calls , if the content length of the response body is above a certain length the message gets chunked by tomkat. This is standard http 1.1 behavior , however the flash player cant handle this for some reason. If the message is not chunked flex app gets the xml envelope no problem , but if its chunked it fails. Further more , this only happens in certain browsers :
Firefox 3.+ : doesnt not occur. app functions fine regardless if the response is chunked.
Opera : same as above
IE : intermittent , however , usually same as above
Safari and Chrome : FAIL. they both fail. Again if you look at the response , or were to hit the backend with just a straight call in the browser , it is a 200 , its fails getting in to the flex app because of a stream error.
Ive scoured the web looking for anwsers and came across only one similiar post on stack overflow. The only solution i can see , is somehow increase the response buffer on the backend or roll it back to http 1.0. Is there anything we can do on the ui side , in the flex app , or in apache , to help alieviate this ? Thanks !!
This has been fixed by gzipping the response on the backend.