3rd-Eden / FlashPolicyFileServer

A simple Flash Policy File Server for node
localhost:843
MIT License
39 stars 11 forks source link

bufix: send xml before http.Server closes the socket #8

Open chatziko opened 9 years ago

chatziko commented 9 years ago

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.