Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(10)

Side by Side Diff: LayoutTests/http/tests/w3c/webperf/resources/generate_resource.php

Issue 42363004: [Resource Timing] Memory cached resources should be reported on first use. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix unsigned Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_memory_cached.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <?php 1 <?php
2 if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) { 2 if (isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
3 header('HTTP/1.1 304 Not Modified'); 3 header('HTTP/1.1 304 Not Modified');
4 exit; 4 exit;
5 } 5 }
6 6
7 $type = $_GET["type"]; 7 $type = $_GET["type"];
8 8
9 $response_code = 200; 9 $response_code = 200;
10 $body = ""; 10 $body = "";
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 break; 42 break;
43 43
44 default: 44 default:
45 $response_code = 404; 45 $response_code = 404;
46 break; 46 break;
47 } 47 }
48 48
49 header("HTTP/1.1 $response_code"); 49 header("HTTP/1.1 $response_code");
50 header("Content-type: $content_type"); 50 header("Content-type: $content_type");
51 if (isset($_GET["cacheable"])) { 51 if (isset($_GET["cacheable"])) {
52 header("Etag: 7"); 52 if ($_GET["cacheable"] == 1) {
53 header("Cache-control: max-age=120");
54 } else {
55 header("Etag: 7");
56 }
53 } else { 57 } else {
54 header("Cache-control: no-cache"); 58 header("Cache-control: no-cache");
55 } 59 }
56 print($body); 60 print($body);
57 exit; 61 exit;
58 ?> 62 ?>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_memory_cached.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698