The FileReference.upload implementation in Adobe Flash Player
9,0,28,0 (and perhaps others) on Mac OS X (Safari and Firefox)
seems to dislike receiving responses from the server where the
Content-Length header is set to 0.
Specifically, after an upload (using URLRequestMethod.POST)
is initiated, the FileReference object dispatches the Event.OPEN
event but fails to dispatch any of the following:
The upload DOES succeed and the Flash player is receiving the
response, but none of above-mentioned events are dispatched. The
bottom line that it is sometimes impossible to tell if/when the
upload completes. Is say impossible because the
ProgressEvent.PROGESS event IS dispatched if the upload takes
"enough" time. But if the upload completes quickly (small file
size, low latency, etc), no PROGRESS events are ever dispatched.
If the response Content-Length header is set to something
greater than 0 and there is a response body - OR - if the
Content-Length header is omitted altogether THEN events are
My tests show that this does not happen in Windows. I have
NOT tried this in other versions of Flash player on Mac, but I care
enough about this specific version that "simply upgrade to
9,0,115,0" is not a good enough solution. Additionally, returning
some short body is undesirable as well.