Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix a few typos
  • Loading branch information
kraih committed Feb 1, 2016
1 parent 0f42f77 commit dcc0da2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 14 deletions.
9 changes: 4 additions & 5 deletions examples/connect-proxy.pl
Expand Up @@ -17,12 +17,11 @@
return Mojo::IOLoop->stream($server)->write($chunk) if length $server;

# Read connect request from client
my $client = $buffer{$id}{client} .= $chunk;
if ($client =~ /\x0d?\x0a\x0d?\x0a$/) {
my $buffer = $buffer{$id}{client} .= $chunk;
if ($buffer =~ /\x0d?\x0a\x0d?\x0a$/) {
$buffer{$id}{client} = '';
if ($client =~ /CONNECT (\S+):(\d+)?/) {
my $address = $1;
my $port = $2 || 80;
if ($buffer =~ /CONNECT (\S+):(\d+)?/) {
my ($address, $port) = ($1, $2 || 80);

# Connection to server
$buffer{$id}{connection} = Mojo::IOLoop->client(
Expand Down
6 changes: 3 additions & 3 deletions t/mojo/daemon_ipv6_tls.t
Expand Up @@ -43,10 +43,10 @@ my $id = Mojo::IOLoop->server(
return Mojo::IOLoop->stream($server)->write($chunk) if length $server;

# Read connect request from client
my $client = $buffer{$id}{client} .= $chunk;
if ($client =~ /\x0d?\x0a\x0d?\x0a$/) {
my $buffer = $buffer{$id}{client} .= $chunk;
if ($buffer =~ /\x0d?\x0a\x0d?\x0a$/) {
$buffer{$id}{client} = '';
if ($client =~ /CONNECT \S+:\d+/) {
if ($buffer =~ /CONNECT \S+:\d+/) {

# Connection to server
$buffer{$id}{connection} = Mojo::IOLoop->client(
Expand Down
6 changes: 3 additions & 3 deletions t/mojo/websocket_proxy.t
Expand Up @@ -55,10 +55,10 @@ my $id = Mojo::IOLoop->server(
return Mojo::IOLoop->stream($server)->write($chunk) if length $server;

# Read connect request from client
my $client = $buffer{$id}{client} .= $chunk;
if ($client =~ /\x0d?\x0a\x0d?\x0a$/) {
my $buffer = $buffer{$id}{client} .= $chunk;
if ($buffer =~ /\x0d?\x0a\x0d?\x0a$/) {
$buffer{$id}{client} = '';
if ($client =~ /CONNECT (\S+):(\d+)?/) {
if ($buffer =~ /CONNECT (\S+):(\d+)?/) {
$connected = "$1:$2";
my $fail = $2 == $port + 1;

Expand Down
6 changes: 3 additions & 3 deletions t/mojo/websocket_proxy_tls.t
Expand Up @@ -74,10 +74,10 @@ my $id = Mojo::IOLoop->server(
return Mojo::IOLoop->stream($server)->write($chunk) if length $server;

# Read connect request from client
my $client = $buffer{$id}{client} .= $chunk;
if ($client =~ /\x0d?\x0a\x0d?\x0a$/) {
my $buffer = $buffer{$id}{client} .= $chunk;
if ($buffer =~ /\x0d?\x0a\x0d?\x0a$/) {
$buffer{$id}{client} = '';
if ($client =~ /CONNECT (\S+):(\d+)?/) {
if ($buffer =~ /CONNECT (\S+):(\d+)?/) {
$connected = "$1:$2";
my $fail = $2 == $port + 1;

Expand Down

0 comments on commit dcc0da2

Please sign in to comment.