X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=t%2Fhttpd-https.t;h=bf7d3f94de6c57965aa6883e9cdd68955cc36d08;hb=21fd0da3bcfba4d3564d262f88d3fd7479b6d5ee;hp=b37492ebb2908524d41a6ba810d5697b5835135a;hpb=860169adcd29341142b7c4a369c09b4ac492bd1e;p=public-inbox.git diff --git a/t/httpd-https.t b/t/httpd-https.t index b37492eb..bf7d3f94 100644 --- a/t/httpd-https.t +++ b/t/httpd-https.t @@ -53,11 +53,12 @@ for my $args ( # normal HTTPS my $c = tcp_connect($https); IO::Socket::SSL->start_SSL($c, %o); - ok($c->print("GET /empty HTTP/1.1\r\n\r\nHost: example.com\r\n\r\n"), - 'wrote HTTP request'); + $c->print("GET /url_scheme HTTP/1.1\r\n\r\nHost: example.com\r\n\r\n") + or xbail "failed to write HTTP request: $!"; my $buf = ''; - sysread($c, $buf, 2007, length($buf)) until $buf =~ /\r\n\r\n/; + sysread($c, $buf, 2007, length($buf)) until $buf =~ /\r\n\r\nhttps?/; like($buf, qr!\AHTTP/1\.1 200!, 'read HTTP response'); + like($buf, qr!\r\nhttps\z!, "psgi.url_scheme is 'https'"); # HTTPS with bad hostname $c = tcp_connect($https);