The travel policy of the intranet.
");
+
+ await stream.WriteAsync(Encoding.UTF8.GetBytes(response), this.stop.Token);
+ }
+ }
+ catch (Exception exception) when (exception is OperationCanceledException or ObjectDisposedException or SocketException)
+ {
+ // The test is over.
+ }
+ }
+
+ private static string Page(string html) => $"HTTP/1.1 200 OK\r\nContent-Type: text/html; charset=utf-8\r\nContent-Length: {Encoding.UTF8.GetByteCount(html)}\r\nConnection: close\r\n\r\n{html}";
+
+ private static async Task