Exemple #1
0
 /**
  * Log Bandwidth Usage
  * @param <type> $displayId
  * @param <type> $type
  * @param <type> $sizeInBytes
  */
 private function LogBandwidth($displayId, $type, $sizeInBytes)
 {
     $bandwidth = new Bandwidth();
     $bandwidth->Log($displayId, $type, $sizeInBytes);
 }
Exemple #2
0
         // Send via Apache X-Sendfile header?
         if ($sendFileMode == 'Apache') {
             Debug::LogEntry('audit', 'HTTP GetFile request redirecting to ' . Config::GetSetting('LIBRARY_LOCATION') . $file['storedAs'], 'services');
             header('X-Sendfile: ' . Config::GetSetting('LIBRARY_LOCATION') . $file['storedAs']);
         } else {
             if ($sendFileMode == 'Nginx') {
                 header('X-Accel-Redirect: /download/' . $file['storedAs']);
             } else {
                 header('HTTP/1.0 404 Not Found');
             }
         }
         // Debug
         Debug::Audit('File request via magic packet. ' . $file['storedAs'], $file['displayId']);
         // Log bandwidth
         $bandwidth = new Bandwidth();
         $bandwidth->Log($file['displayId'], 4, $file['size']);
     }
     exit;
 }
 try {
     $wsdl = 'lib/service/service_v' . $version . '.wsdl';
     if (!file_exists($wsdl)) {
         $serviceResponse->ErrorServerError('Your client is not the correct version to communicate with this CMS.');
     }
     $soap = new SoapServer($wsdl);
     //$soap = new SoapServer($wsdl, array('cache_wsdl' => WSDL_CACHE_NONE));
     $soap->setClass('XMDSSoap' . $version);
     $soap->handle();
 } catch (Exception $e) {
     Debug::LogEntry('error', $e->getMessage());
     $serviceResponse->ErrorServerError('Unable to create SOAP Server: ' . $e->getMessage());