Always succeeds with https urls
DamienCassou opened this issue · comments
Given a non-existing random URL using HTTP:
$ curl -D - http://bla.blu.bli
HTTP/1.1 403 Forbidden
Date: Mon, 14 Jun 2021 20:16:38 GMT
Server: Apache
Content-Length: 202
Content-Type: text/html; charset=iso-8859-1
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
...
I correctly get an error message from wait-on
:
$ npx wait-on --timeout 2000 http://bla.blu.bli && echo 'foo'
npx: installed 13 in 2.019s
Error: Timed out waiting for: http://bla.blu.bli
This is perfectly fine! Nevertheless, when using HTTPS on the same random URL, I get:
$ curl -D - https://bla.blu.bli
curl: (60) SSL: no alternative certificate subject name matches target host name 'bla.blu.bli'
More details here: https://curl.se/docs/sslcerts.html
$ npx wait-on --timeout 2000 https://bla.blu.bli && echo 'foo'
npx: installed 13 in 2.211s
foo
Why does wait-on succeeds here? I tried with other random HTTPS URLS and wait-on always succeeds.