Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
change order a little bit
  • Loading branch information
kraih committed Jun 16, 2016
1 parent 6d5cf25 commit d5a5b63
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions t/mojo/websocket_proxy.t
Expand Up @@ -36,14 +36,14 @@ $daemon->listen(['http://127.0.0.1'])->start;
my $port = Mojo::IOLoop->acceptor($daemon->acceptors->[0])->port;

# CONNECT proxy server for testing
my $dummy = Mojo::IOLoop::Server->generate_port;
my (%buffer, $connected, $read, $sent);
my $nf
= "HTTP/1.1 404 NOT FOUND\x0d\x0a"
. "Content-Length: 0\x0d\x0a"
. "Connection: close\x0d\x0a\x0d\x0a";
my $ok = "HTTP/1.0 201 BAR\x0d\x0aX-Something: unimportant\x0d\x0a\x0d\x0a";
my $id = Mojo::IOLoop->server(
my $ok = "HTTP/1.0 201 BAR\x0d\x0aX-Something: unimportant\x0d\x0a\x0d\x0a";
my $dummy = Mojo::IOLoop::Server->generate_port;
my $id = Mojo::IOLoop->server(
{address => '127.0.0.1'} => sub {
my ($loop, $stream, $id) = @_;

Expand Down
8 changes: 4 additions & 4 deletions t/mojo/websocket_proxy_tls.t
Expand Up @@ -54,14 +54,14 @@ $daemon->listen([$listen])->start;
my $port = Mojo::IOLoop->acceptor($daemon->acceptors->[0])->port;

# Connect proxy server for testing
my $dummy = Mojo::IOLoop::Server->generate_port;
my (%buffer, $connected, $read, $sent);
my $nf
= "HTTP/1.1 501 FOO\x0d\x0a"
. "Content-Length: 0\x0d\x0a"
. "Connection: close\x0d\x0a\x0d\x0a";
my $ok = "HTTP/1.1 200 OK\x0d\x0aConnection: keep-alive\x0d\x0a\x0d\x0a";
my $id = Mojo::IOLoop->server(
my $ok = "HTTP/1.1 200 OK\x0d\x0aConnection: keep-alive\x0d\x0a\x0d\x0a";
my $dummy = Mojo::IOLoop::Server->generate_port;
my $id = Mojo::IOLoop->server(
{address => '127.0.0.1'} => sub {
my ($loop, $stream, $id) = @_;

Expand Down Expand Up @@ -261,7 +261,7 @@ is $tx->res->body, "https://127.0.0.1:$port/proxy", 'right content';

# Proxy WebSocket with bad target
$ua->proxy->https("http://127.0.0.1:$proxy");
my ($success, $err, $leak);
my ($success, $leak, $err);
$ua->websocket(
"wss://127.0.0.1:$dummy/test" => sub {
my ($ua, $tx) = @_;
Expand Down

0 comments on commit d5a5b63

Please sign in to comment.