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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/network/resources/set-cookie.php

Issue 2623423002: Add console warning and tests for strict secure cookies.
Patch Set: Update comment Created 3 years, 11 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/network/warning-for-strict-secure-cookies.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 header("Expires: Thu, 01 Dec 2003 16:00:00 GMT"); 2 header("Expires: Thu, 01 Dec 2003 16:00:00 GMT");
3 header("Cache-Control: no-store, no-cache, must-revalidate"); 3 header("Cache-Control: no-store, no-cache, must-revalidate");
4 header("Pragma: no-cache"); 4 header("Pragma: no-cache");
5 header("Content-Type: text/plain"); 5 header("Content-Type: text/plain");
6 header("Access-Control-Allow-Origin: http://127.0.0.1:8000"); 6 header("Access-Control-Allow-Origin: http://127.0.0.1:8000");
7 $secure = isset($_GET["secure"]);
7 $length = isset($_GET["length"]) ? (int) $_GET["length"] : 0; 8 $length = isset($_GET["length"]) ? (int) $_GET["length"] : 0;
8 if (!$length) { 9 if (!$length) {
9 setcookie("TestCookie", "TestCookieValue"); 10 setcookie("TestCookie", "TestCookieValue", 0, "", "", $secure);
10 } else { 11 } else {
11 $data = ""; 12 $data = "";
12 for ($i = 0; $i < $length; $i++) { 13 for ($i = 0; $i < $length; $i++) {
13 $data .= "a"; 14 $data .= "a";
14 } 15 }
16 if ($secure)
17 $data .= "; Secure";
15 header("Set-Cookie: $data"); 18 header("Set-Cookie: $data");
16 } 19 }
17 echo("Cookie set."); 20 echo("Cookie set.");
18 ?> 21 ?>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/http/tests/inspector/network/warning-for-strict-secure-cookies.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698