Skip to content

Commit cc102ca

Browse files
committed
Tests: improved coverage for the URL of the OCSP responder.
1 parent 89175c4 commit cc102ca

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

ssl_ocsp.t

+7-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ http {
8787
listen 127.0.0.1:8445 ssl;
8888
server_name localhost;
8989
90-
ssl_ocsp_responder http://127.0.0.1:8082;
90+
ssl_ocsp_responder http://127.0.0.1:8083/test;
9191
}
9292
9393
server {
@@ -266,10 +266,12 @@ foreach my $name ('rsa') {
266266

267267
$t->run_daemon(\&http_daemon, $t, port(8081));
268268
$t->run_daemon(\&http_daemon, $t, port(8082));
269+
$t->run_daemon(\&http_daemon, $t, port(8083));
269270
$t->run()->plan(15);
270271

271272
$t->waitforsocket("127.0.0.1:" . port(8081));
272273
$t->waitforsocket("127.0.0.1:" . port(8082));
274+
$t->waitforsocket("127.0.0.1:" . port(8083));
273275

274276
###############################################################################
275277

@@ -474,6 +476,10 @@ sub http_daemon {
474476
$uri = $1 if $headers =~ /^\S+\s+\/([^ ]+)\s+HTTP/i;
475477
next unless $uri;
476478

479+
if ($port == port(8083)) {
480+
next unless $uri =~ s/^test\///;
481+
}
482+
477483
$uri =~ s/%([0-9A-Fa-f]{2})/chr(hex($1))/eg;
478484
my $req = decode_base64($uri);
479485

0 commit comments

Comments
 (0)