FlashPolicyFileServer
FlashPolicyFileServer copied to clipboard
bufix: send xml before http.Server closes the socket
In some versions of node.js (tested with v0.12.7) the http.Server class closes the socket immediately when it sees that the request is not HTTP, before we manage to send the xml! So we need to make sure that our connection listener is executed first. To do so we remove them all and we re-add them.
The 'inline response http' fails on node v0.12.7, it passes after the fix.