diff lib/Test/Nginx.pm @ 237:90af19544dd2

Tests: https sni tests.
author Valentin Bartenev <ne@vbart.ru>
date Mon, 01 Oct 2012 02:54:57 +0400
parents 4c43b3a0117c
children 8f280348d76f
line wrap: on
line diff
--- a/lib/Test/Nginx.pm
+++ b/lib/Test/Nginx.pm
@@ -68,6 +68,7 @@ sub has_module($) {
 	my ($self, $feature) = @_;
 
 	my %regex = (
+		sni	=> 'TLS SNI support enabled',
 		mail	=> '--with-mail(?!\S)',
 		flv	=> '--with-http_flv_module',
 		perl	=> '--with-http_perl_module',
@@ -387,7 +388,7 @@ sub http($;%) {
 		local $SIG{ALRM} = sub { die "timeout\n" };
 		local $SIG{PIPE} = sub { die "sigpipe\n" };
 		alarm(2);
-		my $s = IO::Socket::INET->new(
+		my $s = $extra{socket} || IO::Socket::INET->new(
 			Proto => 'tcp',
 			PeerAddr => '127.0.0.1:8080'
 		);