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

Side by Side Diff: LayoutTests/http/tests/eventsource/resources/reconnect.php

Issue 836823002: Encode the Last-Event-ID header in EventSource as UTF-8. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 5 years, 3 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
OLDNEW
1 <?php 1 <?php
2 header("Content-Type: text/event-stream"); 2 header("Content-Type: text/event-stream");
3 $lastEventId = $_SERVER['HTTP_LAST_EVENT_ID']; 3 $lastEventId = $_SERVER['HTTP_LAST_EVENT_ID'];
4 4
5 if ($lastEventId) 5 if ($lastEventId)
6 echo "data: $lastEventId\n\n"; 6 echo "data: $lastEventId\n\n";
7 else { 7 else {
8 echo "id: 77\n"; 8 # Include a non-ASCII character to test the client encodes it correctly.
9 echo "id: 77\n";
9 echo "retry: 300\n"; 10 echo "retry: 300\n";
10 echo "data: hello\n\n"; 11 echo "data: hello\n\n";
11 echo "data: discarded"; 12 echo "data: discarded";
12 } 13 }
13 ?> 14 ?>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698