Mojo::UserAgent::Server->app, app, 'applications are equal');
my $dummy = Mojolicious::Lite->new;
isnt(Mojo::UserAgent::Cached->new->server->app($dummy)->app, app, 'applications are not equal');
is(Mo
erAgent::Server->app, app, 'applications are still equal');
Mojo::UserAgent::Server->app($dummy);
isnt(Mojo::UserAgent::Server->app, app, 'applications are not equal');
is(Mojo::UserAgent::Server->app
'right status';
is $tx->res->headers->content_encoding, 'gzip', 'right "Content-Encoding" value';
isnt $tx->res->body, 'Hello GZip!', 'different content';
# Keep-alive timeout in between requests
my
uthorization, undef, 'no "Proxy-Authorization" value';
is $tx->res->body, $last, 'right content';
isnt(Mojo::IOLoop->stream($tx->connection)->handle->sockport, $last, 'different ports');
# Keep alive
, 200, 'right status';
is $tx->res->body, $last, 'right content';
is $before, $last, 'same port';
isnt(Mojo::IOLoop->stream($tx->connection)->handle->sockport, $last, 'different ports');
# WebSocket
p->stop });
$tx->send('test');
}
);
Mojo::IOLoop->start;
is $result, $last, 'right result';
isnt(Mojo::IOLoop->stream($id)->handle->sockport, $last, 'different ports');
# HTTPS request with SOC
y = $tx->res->body;
is $tx->res->code, '404', 'Get 404 correctly - Not in cache anymore';
isnt $body, $new_body, 'Result is fresh';
# ...this result should now be cached
$tx = $ua->ge
tx = $ua->get("/maybe_not_found");
is $tx->res->code, '404', 'Get 404 correctly - fresh';
isnt $new_body, $tx->res->body, 'Result is fresh';
};
# TODO: Replace google.com tests with local ser
ket::INET->new(PeerAddr => 'mojolicious.org', PeerPort => 80);
my $address = $sock->sockhost;
isnt $address, '127.0.0.1', 'different address';
$ua->max_connections(0)->socket_options->{LocalAddr