is it possible to configure the httpd.conf which listens the port 843 and serves crossdomain policy tags or file when there is开发者_StackOverflow社区 a socket connection? (not for http request, needed it for socket connection from flash)
thank you
Check out this apache module, which will load the necessary socket policy files alongside any other standard crossdomain.xml configurations you need to host on port 80 - http://www.beamartyr.net/articles/adobepolicyfileserver.html
No, it's not.
httpd.conf configures Apache which is a webserver, so expects to receive HTTP requests over the socket. Adobe in their infinite wisdom decided that the Flash security policy file should be served over a home-brew protocol where the first string from the client is "\0".
Since Apache won't recognise that, it can't serve the requested file.
I could have a long rant here about the bogus-ness of this - it would have been (IMO) just as easy for Flash to have sent a "GET /policyfile" request which would have allowed Apache to serve the file, but there we go.
Your only option is to run a different server specifically to serve the policy file - Adobe provide some sample code in Python and other languages that does the job.
精彩评论