Changeset 272642 in webkit
- Timestamp:
- Feb 10, 2021, 1:42:11 AM (6 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 2 edited
-
ChangeLog (modified) (1 diff)
-
http/tests/privateClickMeasurement/resources/conversionReport.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r272640 r272642 1 2021-02-10 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 Some privateClickMeasurement might output the information in different order depending on platform 4 https://bugs.webkit.org/show_bug.cgi?id=221406 5 6 Reviewed by Michael Catanzaro. 7 8 The script conversionReport.php iterates the HTTP headers to show the information, but header's order can be 9 different for different platforms. We could just check every value we want to show to make sure we always 10 provide them in the same order. 11 12 * http/tests/privateClickMeasurement/resources/conversionReport.php: 13 1 14 2021-02-10 Rob Buis <rbuis@igalia.com> 2 15 -
trunk/LayoutTests/http/tests/privateClickMeasurement/resources/conversionReport.php
r270136 r272642 5 5 $httpHeaders = $_SERVER; 6 6 $cookiesFound = false; 7 foreach ($httpHeaders as $name => $value) { 8 if ($name === "HTTP_HOST") { 9 fwrite($conversionFile, "$name: $value\n"); 10 } else if ($name === "REQUEST_URI") { 11 $positionOfNonce = strpos($value, "?nonce="); 12 if ($positionOfNonce === false) 13 $outputURL = $value; 14 else 15 $outputURL = substr($value, 0, $positionOfNonce); 16 fwrite($conversionFile, "$name: $outputURL\n"); 17 } else if ($name === "HTTP_COOKIE") { 18 fwrite($conversionFile, "Cookies in attribution request: $value\n"); 19 $cookiesFound = true; 20 } else if ($name === "CONTENT_TYPE") { 21 fwrite($conversionFile, "Content type: $value\n"); 22 } 7 8 if ($value = $httpHeaders["HTTP_HOST"]) { 9 fwrite($conversionFile, "HTTP_HOST: $value\n"); 23 10 } 11 12 if ($value = $httpHeaders["HTTP_COOKIE"]) { 13 fwrite($conversionFile, "Cookies in attribution request: $value\n"); 14 $cookiesFound = true; 15 } 16 17 if ($value = $httpHeaders["CONTENT_TYPE"]) { 18 fwrite($conversionFile, "Content type: $value\n"); 19 } 20 21 if ($value = $httpHeaders["REQUEST_URI"]) { 22 $value = $httpHeaders["REQUEST_URI"]; 23 $positionOfNonce = strpos($value, "?nonce="); 24 if ($positionOfNonce === false) 25 $outputURL = $value; 26 else 27 $outputURL = substr($value, 0, $positionOfNonce); 28 fwrite($conversionFile, "REQUEST_URI: $outputURL\n"); 29 } 30 24 31 if (!$cookiesFound) { 25 32 fwrite($conversionFile, "No cookies in attribution request.\n");
Note:
See TracChangeset
for help on using the changeset viewer.