Skip to content

Instantly share code, notes, and snippets.

Created June 13, 2016 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/5ee3f5a30c762bc3060ee1f47d827d90 to your computer and use it in GitHub Desktop.
Save anonymous/5ee3f5a30c762bc3060ee1f47d827d90 to your computer and use it in GitHub Desktop.
diff --git a/t/mojo/websocket_proxy_tls.t b/t/mojo/websocket_proxy_tls.t
index 519bb57..015d612 100644
--- a/t/mojo/websocket_proxy_tls.t
+++ b/t/mojo/websocket_proxy_tls.t
@@ -248,9 +248,13 @@ is $result, 'test1test2', 'right result';
ok $read > 25, 'read enough';
ok $sent > 25, 'sent enough';
-# Blocking proxy request
+# Blocking proxy requests
$ua->proxy->https("http://sri:secr3t\@127.0.0.1:$proxy");
-my $tx = $ua->get("https://127.0.0.1:$port/proxy");
+my $tx = $ua->max_connections(0)->get("https://127.0.0.1:$port/proxy");
+is $tx->res->code, 200, 'right status';
+is $tx->res->body, "https://127.0.0.1:$port/proxy", 'right content';
+$tx = $ua->max_connections(5)->get("https://127.0.0.1:$port/proxy");
+ok !$tx->kept_alive, 'connection was not kept alive';
is $tx->res->code, 200, 'right status';
is $tx->res->body, "https://127.0.0.1:$port/proxy", 'right content';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment