Add missing HTML tag in www_body in s_server.c

In the generated HTML document, the `<pre>` tag is not closed. This patch also has a trivial code-style improvement, unrelated to the bug fix.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/4088)
This commit is contained in:
Xiaoyin Liu 2017-08-05 02:31:04 -04:00 committed by Rich Salz
parent 0c714ba214
commit 1a9f5cf0d5

View File

@ -3113,9 +3113,10 @@ static int www_body(int s, int stype, int prot, unsigned char *context)
PEM_write_bio_X509(io, peer);
X509_free(peer);
peer = NULL;
} else
} else {
BIO_puts(io, "no client certificate available\n");
BIO_puts(io, "</BODY></HTML>\r\n\r\n");
}
BIO_puts(io, "</pre></BODY></HTML>\r\n\r\n");
break;
} else if ((www == 2 || www == 3)
&& (strncmp("GET /", buf, 5) == 0)) {