Permalink
Browse files

Use port 80 rather than string "http" on Solaris.

Chris Williams discovered tests would fail on Solaris with "service
name not available for the specified socket type".  It turns out they
don't list "http" in /etc/services.
  • Loading branch information...
rcaputo committed Jul 29, 2011
1 parent 638cd9e commit f0d9d4484e3a3400c7b9ca6b712882e0e20a04d6
Showing with 5 additions and 4 deletions.
  1. +5 −4 t/01-basic.t
View
@@ -53,13 +53,14 @@ if ($has_ipv6) {
my $host = 'ipv6-test.com';
my $tcp = getprotobyname("tcp");
+my $service = $^O eq 'solaris' ? 80 : 'http';
POE::Session->create(
inline_states => {
_start => sub {
$r4->resolve(
host => $host,
- service => 'http',
+ service => $service,,
hints => { protocol => $tcp },
misc => [ AF_INET ],
) or die $!;
@@ -69,21 +70,21 @@ POE::Session->create(
$r6->resolve(
host => $host,
- service => 'http',
+ service => $service,
hints => { protocol => $tcp },
misc => [ AF_INET6 ],
) or die $!;
$r46->resolve(
host => $host,
- service => 'http',
+ service => $service,
hints => { protocol => $tcp },
misc => [ AF_INET, AF_INET6 ],
) or die $!;
$r64->resolve(
host => $host,
- service => 'http',
+ service => $service,
hints => { protocol => $tcp },
misc => [ AF_INET6, AF_INET ],
) or die $!;

0 comments on commit f0d9d44

Please sign in to comment.