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:40:17 +0000 (00:40 +0100)
commitec2a0e60652c0e61e90dde367756c5d92cd882d3
tree8a7e8082de6a547b7d2b5b240c2ce8304b7d5b45
parent9d6fcd4295fef7ebc4232aab85718a99d36cc50a
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)
apps/s_client.c