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

Unified Diff: LayoutTests/http/tests/resources/dpr.php

Issue 46313002: Support the DPR header for client hints. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 2 months 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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/resources/dpr.php
diff --git a/LayoutTests/http/tests/resources/dpr.php b/LayoutTests/http/tests/resources/dpr.php
new file mode 100644
index 0000000000000000000000000000000000000000..d56d4acfb4b8d8a5ae9a8fae3ee4a91871606467
--- /dev/null
+++ b/LayoutTests/http/tests/resources/dpr.php
@@ -0,0 +1,18 @@
+<?php
+$name = $_GET['name'];
+$mimeType = $_GET['mimeType'];
+$dpr = $_GET['dpr'];
+
+$file = fopen($name, "rb");
+if (!$file)
+ die("Cannot open file.");
+
+header("Content-Type: " . $mimeType);
+header("Content-Length: " . filesize($name));
+header("DPR: ". $dpr);
pdr. 2013/10/26 01:26:31 Should the header name be "DPR" or "CH-DPR"? I th
pdr 2013/10/27 21:04:39 For posterity, I was just mixed up here. DPR is th
+
+echo(fread($file, filesize($name)));
+flush();
+ob_flush();
+fclose($file);
+?>

Powered by Google App Engine
This is Rietveld 408576698