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

Unified Diff: tests/standalone/io/https_server_test.dart

Issue 108323003: Ignore HandshakeExceptions in HttpServer, as they are request(socket)-bound and not fatal for the s… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix test. Created 7 years 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
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/standalone/io/https_server_test.dart
diff --git a/tests/standalone/io/https_server_test.dart b/tests/standalone/io/https_server_test.dart
index 082950e70eda04012c8ca533ac471788840e3972..fca7ab46868af14b6656cef999cd4d445e7a1b6c 100644
--- a/tests/standalone/io/https_server_test.dart
+++ b/tests/standalone/io/https_server_test.dart
@@ -63,7 +63,39 @@ void InitializeSSL() {
password: 'dartdart');
}
+void testEarlyClientClose() {
+ HttpServer.bindSecure(HOST_NAME,
+ 0,
+ certificateName: 'localhost_cert').then((server) {
+ server.listen(
+ (request) {
+ String name = Platform.script.toFilePath();
+ new File(name).openRead().pipe(request.response)
+ .catchError((e) { /* ignore */ });
+ });
+
+ var count = 0;
+ makeRequest() {
+ Socket.connect("127.0.0.1", server.port).then((socket) {
+ var data = "Invalid TLS handshake";
+ socket.write(data);
+ socket.close();
+ socket.done.then((_) {
+ socket.destroy();
+ if (++count < 10) {
+ makeRequest();
+ } else {
+ server.close();
+ }
+ });
+ });
+ }
+ makeRequest();
+ });
+}
+
void main() {
InitializeSSL();
testListenOn();
+ testEarlyClientClose();
}
« no previous file with comments | « sdk/lib/io/http_impl.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698