Beispiel #1
0
     header("MS-ASProtocolCommands: Sync,SendMail,SmartForward,SmartReply,GetAttachment,GetHierarchy,CreateCollection,DeleteCollection,MoveCollection,FolderSync,FolderCreate,FolderDelete,FolderUpdate,MoveItems,GetItemEstimate,MeetingResponse,ResolveRecipients,ValidateCert,Provision,Settings,Search,Ping,ItemOperations");
     debugLog("Options request");
     break;
 case 'POST':
     // dw2412 changed to support AS14 Protocol
     //		header("MS-Server-ActiveSync: 14.0");
     header("MS-Server-ActiveSync: 14.1");
     debugLog("POST cmd: {$cmd}");
     // Update X-MS-RP In case version changed
     include_once 'statemachine.php';
     $protstate = new StateMachine($devid, $user);
     $protsupp = $protstate->getProtocolState();
     if ($protsupp !== false && $protsupp != "2.0,2.1,2.5,12.0,12.1,14.0,14.1") {
         header("X-MS-RP: 2.0,2.1,2.5,12.0,12.1,14.0,14.1");
         debugLog("Sending X-MS-RP to update Protocol Version on Device");
         $protstate->setProtocolState("2.0,2.1,2.5,12.0,12.1,14.0,14.1");
     }
     unset($protstate);
     // Do the actual request
     if (!HandleRequest($backend, $cmd, $devid, $protocolversion, $multipart)) {
         // Request failed. Try to output some kind of error information. We can only do this if
         // output had not started yet. If it has started already, we can't show the user the error, and
         // the device will give its own (useless) error message.
         if (!headers_sent()) {
             header("Content-type: text/html");
             print "<BODY>\n";
             print "<h3>Error</h3><p>\n";
             print "There was a problem processing the <i>{$cmd}</i> command from your PDA.\n";
             print "<p>Here is the debug output:<p><pre>\n";
             print getDebugInfo();
             print "</pre>\n";