s_client: Better response success check for CONNECT
authorRichard Levitte <levitte@openssl.org>
Wed, 5 Oct 2016 10:37:58 +0000 (12:37 +0200)
committerRichard Levitte <levitte@openssl.org>
Tue, 24 Jan 2017 23:41:27 +0000 (00:41 +0100)
commit07cd2f84d1480ca714bc14233b3c023ba9874e9d
tree50ed8d21eb55ed119942e6b39bc2068945783083
parent0e3200b59d2de69e2a577eb269c5e65d2a3dfa11
s_client: Better response success check for CONNECT

Instead of looking for "200" and "established" (and failing all other
2xx responses or "Established"), let's look for a line that's not a
header (i.e. doesn't contain a ':') and where the first space is
followed by a '2'.

Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1664)
(cherry picked from commit ec2a0e60652c0e61e90dde367756c5d92cd882d3)
apps/s_client.c