Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / resources / slow-image.php
blobde0e1af92c02ae757956d52f926efdb706fc94b7
1 <?php
2 $name = $_GET['name'];
3 $mimeType = $_GET['mimeType'];
4 $sleepTime = $_GET['sleep'];
6 usleep($sleepTime*1000);
8 if (isset($_GET['redirect_name'])) {
9 header('HTTP/1.1 302');
10 header('Location: ' . $_GET['redirect_name']);
11 exit;
14 header('Content-Type: ' . $mimeType);
15 header('Content-Length: ' . filesize($name));
16 if (isset($_GET['expires']))
17 header('Cache-control: max-age=0');
18 else
19 header('Cache-control: max-age=86400');
21 readfile($name);