? services/.DS_Store
Index: services.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/services/services.module,v
retrieving revision 1.16
diff -r1.16 services.module
156,161c156
< 
<   $items['crossdomain.xml'] = array(
<     'access callback'   => 'services_access_menu',
<     'page callback'     => 'services_crossdomain_xml',
<     'type'              => MENU_CALLBACK,
<   );
---
>   
259,274d253
< /**
<  * Callback for crossdomain.xml
<  */
< function services_crossdomain_xml() {
<   $output = '<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">' . "\n";
<   $output .= '<cross-domain-policy>' . "\n";
< 
<   $domains = module_invoke_all('services_crossdomain_domain_policy');
<   drupal_alter('services_crossdomain_domain_policy', $domains);
< 
<   foreach ($domains as $domain => $info) {
<     $output .= '  <allow-access-from domain="' . check_plain($domain) . '" />' . "\n";
<     if ($info['subdomain_wildcard']) {
<       $output .= '  <allow-access-from domain="*.' . check_plain($domain) . '" />' . "\n";
<     }
<   }
276,310d254
<   $output .= '</cross-domain-policy>';
< 
<   services_xml_output($output);
< }
< 
< /**
<  * Implementation of hook_services_crossdomain_domain_policy().
<  */
< function services_services_crossdomain_domain_policy() {
<   // Allow our own domain and it's subdomains
<   return array(
<     $_SERVER['HTTP_HOST'] => array(
<       'subdomain_wildcard' => TRUE,
<     ),
<   );
< }
< 
< /**
<  * Helper function for services_crossdomain_xml().
<  * Outputs the necessary http headers and xml processing instruction then exits.
<  *
<  * @param string $xml
<  *  The xml document to print.
<  * @return void
<  *  This function never returns, it always exits.
<  */
< function services_xml_output($xml) {
<   $xml = '<?xml version="1.0" encoding="UTF-8"?>' . "\n" . $xml;
<   header('Connection: close');
<   header('Content-Length: ' . strlen($xml));
<   header('Content-Type: text/xml');
<   header('Date: ' . date('r'));
<   echo $xml;
<   exit;
< }
