Skip to content
Snippets Groups Projects
Commit 4594c37e authored by ree's avatar ree
Browse files

Send response in a single send(), because it's the cool thing to do

(and also because the multi-send() version failed sometimes due to the response being
 sent in multiple packets, and the first packet was received with the RST flag set)
parent 6408f8b0
No related branches found
No related tags found
No related merge requests found
......@@ -55,11 +55,7 @@ if (InString.indexOf(ValidRequest) === -1) {
} else {
log(LOG_DEBUG, "Answering valid socket policy file request");
if (client.socket.is_connected) {
client.socket.send('<?xml version="1.0"?><!DOCTYPE cross-domain-policy SYSTEM "/xml/dtds/cross-domain-policy.dtd">');
client.socket.send('<cross-domain-policy>');
client.socket.send('<site-control permitted-cross-domain-policies="master-only"/>');
client.socket.send('<allow-access-from domain="*" to-ports="' + GetToPorts() + '" />');
client.socket.send('</cross-domain-policy>');
client.socket.send("<?xml version=\"1.0\"?><!DOCTYPE cross-domain-policy SYSTEM \"/xml/dtds/cross-domain-policy.dtd\"><cross-domain-policy><site-control permitted-cross-domain-policies=\"master-only\"/><allow-access-from domain=\"*\" to-ports=\"" + GetToPorts() + "\" /></cross-domain-policy>\0");
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment