I am writing a socket server which has a Flash client. However, I can't get past the flash policy request.
My code:
if (buf[0] == 60) {
printf("Policy request spotted");
const auto& policy = Server::policy();
send(client, &policy, policy.size() + 1, 0);
close(client);
break;
}
std::string Server::policy(){
char c = 0;
return "<?xml version=\"1.0\"?>\r\n<!DOCTYPE cross-domain-policy SYSTEM \"/xml/dtds/cross-domain-policy.dtd\">\r\n<cross-domain-policy>\r\n<allow-access-from domain=\"*\" to-ports=\"1-31111\" />\r\n</cross-domain-policy>" + c;
}
Doensn't seems to work. What do I need to do to fix it?
Thanks.
via user6632515
No comments:
Post a Comment