| OLD | NEW |
| 1 <?php | 1 <?php |
| 2 header('X-ServiceWorker-ServerHeader: SetInTheServer'); | 2 header('X-ServiceWorker-ServerHeader: SetInTheServer'); |
| 3 | 3 |
| 4 $prefix = ''; | 4 $prefix = ''; |
| 5 // If PreflightTest is set: | 5 // If PreflightTest is set: |
| 6 // - Use PACAOrign, PACAHeaders, PACAMethods, PACACredentials, PACEHeaders, | 6 // - Use PACAOrign, PACAHeaders, PACAMethods, PACACredentials, PACEHeaders, |
| 7 // PAuth, PAuthFail and PSetCookie* parameters in preflight. | 7 // PAuth, PAuthFail and PSetCookie* parameters in preflight. |
| 8 // - Use $_GET['PreflightTest'] as HTTP status code. | 8 // - Use $_GET['PreflightTest'] as HTTP status code. |
| 9 // - Check Access-Control-Request-Method/Headers headers with | 9 // - Check Access-Control-Request-Method/Headers headers with |
| 10 // PACRMethod/Headers parameter, if set, in preflight. | 10 // PACRMethod/Headers parameter, if set, in preflight. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 fclose($fp); | 97 fclose($fp); |
| 98 } | 98 } |
| 99 $files[] = array('key' => $key, | 99 $files[] = array('key' => $key, |
| 100 'name' => $file['name'], | 100 'name' => $file['name'], |
| 101 'type' => $file['type'], | 101 'type' => $file['type'], |
| 102 'error' => $file['error'], | 102 'error' => $file['error'], |
| 103 'size' => $file['size'], | 103 'size' => $file['size'], |
| 104 'content' => $content); | 104 'content' => $content); |
| 105 } | 105 } |
| 106 | 106 |
| 107 if (isset($_GET['WINDOW'])) { | |
| 108 header('Content-Type: text/html'); | |
| 109 echo "<!DOCTYPE html><script>window.opener.postMessage('Loaded', '*');</script
>"; | |
| 110 exit; | |
| 111 } | |
| 112 | |
| 113 header('Content-Type: application/json'); | 107 header('Content-Type: application/json'); |
| 114 $arr = array('jsonpResult' => 'success', | 108 $arr = array('jsonpResult' => 'success', |
| 115 'method' => $_SERVER['REQUEST_METHOD'], | 109 'method' => $_SERVER['REQUEST_METHOD'], |
| 116 'headers' => getallheaders(), | 110 'headers' => getallheaders(), |
| 117 'body' => file_get_contents('php://input'), | 111 'body' => file_get_contents('php://input'), |
| 118 'files' => $files, | 112 'files' => $files, |
| 119 'get' => $_GET, | 113 'get' => $_GET, |
| 120 'post' => $_POST, | 114 'post' => $_POST, |
| 121 'username' => $username, | 115 'username' => $username, |
| 122 'password' => $password, | 116 'password' => $password, |
| 123 'cookie' => $cookie); | 117 'cookie' => $cookie); |
| 124 $json = json_encode($arr); | 118 $json = json_encode($arr); |
| 125 echo "report( $json );"; | 119 echo "report( $json );"; |
| 126 ?> | 120 ?> |
| OLD | NEW |