Use openssl to Issue Raw HTTP Requests

by
Annika Backstrom
in misc, on 1 November 2011. It is tagged #Web, #debugging, #http, #https, #ssl, and #telnet.

telnet is a handy tool for examining a raw HTTP connection, but it fails hard on HTTP over SSL:

ambackstrom@fsck:~:0$ telnet www.plymouth.edu 443
Trying 158.136.1.105...
Connected to algol.plymouth.edu.
Escape character is '^]'.
GET / HTTP/1.1
Connection closed by foreign host.

Turns out openssl (which is a toolbox in its own right) can step in:

openssl s_client -connect www.plymouth.edu:443