@@ -142,15 +142,14 @@ my $ctx = new IO::Socket::SSL::SSL_Context(
142
142
SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE(),
143
143
SSL_session_cache_size => 100);
144
144
145
- like(http_get(' /' , socket => get_ssl_socket(' localhost' , 8081, $ctx )),
146
- qr / ^\. :localhost$ / m , ' ssl server name' );
145
+ like(get(' /' , ' localhost' , 8081, $ctx ), qr / ^\. :localhost$ / m , ' ssl server name' );
147
146
148
147
TODO: {
149
148
local $TODO = ' not yet' if $t -> has_module(' OpenSSL (1.1.1|3)' )
150
149
&& !$t -> has_version(' 1.15.10' );
151
150
152
- like(http_get (' /' , socket => get_ssl_socket( ' localhost' , 8081, $ctx )) ,
153
- qr / ^r:localhost $ / m , ' ssl server name - reused' );
151
+ like(get (' /' , ' localhost' , 8081, $ctx ), qr / ^r:localhost $ / m ,
152
+ ' ssl server name - reused' );
154
153
155
154
}
156
155
@@ -202,4 +201,12 @@ Host: $host
202
201
EOF
203
202
}
204
203
204
+ sub get {
205
+ my ($uri , $host , $port , $ctx ) = @_ ;
206
+ my $s = get_ssl_socket($host , $port , $ctx ) or return ;
207
+ my $r = http_get($uri , socket => $s );
208
+ $s -> close ();
209
+ return $r ;
210
+ }
211
+
205
212
# ##############################################################################
0 commit comments