Does anyone know why curl with -k (--insecure) option and -I for show headers still shows the html response and not the headers as expected?
Working as expected:
$ curl -I https://validsslcert.example.com
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
...
$ curl -k -I https://validsslcert.example.com
HTTP/1.1 302 Moved Temporarily
Server: Apache-Coyote/1.1
...
$ curl -k https://invalidcert.example.com
<br />
...
NOT working as expected:
$ curl -k -I https://invalidcert.example.com
<br />
<br />
<br />
<center><h2>Maintenance</h2></center>
It doesn't really matter here what I'm doing, but I'm testing what headers get set to identify different backend acl logic on haproxy.
I would expect curl to allow me to make an insecure connection (invalid certificate) and still return the headers?
-v
instead of-I
if you want to see the headers? Does that also fail?