[xmppd-dev] commit r1551 - branches/RELEASE-1_6_1/jabberd

mail at jabberd.org mail at jabberd.org
Tue Dec 9 12:52:44 CET 2008


Author: mawis
Date: Tue Dec  9 12:52:44 2008
New Revision: 1551

Log:
Remove the extra /> that was returned after jabberd14 has sent the flash policy file.

Modified:
   branches/RELEASE-1_6_1/jabberd/mio_xml.cc

Modified: branches/RELEASE-1_6_1/jabberd/mio_xml.cc
==============================================================================
--- branches/RELEASE-1_6_1/jabberd/mio_xml.cc	Mon Dec  8 21:02:01 2008	(r1550)
+++ branches/RELEASE-1_6_1/jabberd/mio_xml.cc	Tue Dec  9 12:52:44 2008	(r1551)
@@ -449,6 +449,9 @@
 
 	// check for Flash policy requests
 	if (first_line.substr(0, 20) == "<policy-file-request") {
+	    // reset type to type_NORMAL, else mio will add a "/>" to the data that is sent back
+	    m->type = type_NORMAL;
+
 	    // is there a configured flash policy?
 	    if (mio__data->flash_policy) {
 		struct stat stat_buf;
@@ -485,7 +488,6 @@
 	    std::string default_policy("<?xml version='1.0'?>\n<!DOCTYPE cross-domain-policy SYSTEM \"/xml/dtds/cross-domain-policy.dtd\">\n<cross-domain-policy/>\n");
 	    log_notice(NULL, "Received Flash policy-file-request, but none is configured. Returning (empty) default policy.");
 	    mio_write(m, NULL, default_policy.c_str(), default_policy.length()+1); // length()+1 because we want to send the NULL byte as well
-	    mio_write(m, NULL, "\0", 1);
 	    mio_close(m);
 	    return;
 


More information about the dev mailing list