summaryrefslogtreecommitdiffstats
path: root/apps/lib/http_server.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/lib/http_server.c')
-rw-r--r--apps/lib/http_server.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/apps/lib/http_server.c b/apps/lib/http_server.c
index 03afd715be..622c908e52 100644
--- a/apps/lib/http_server.c
+++ b/apps/lib/http_server.c
@@ -506,12 +506,12 @@ int http_server_send_asn1_resp(const char *prog, BIO *cbio, int keep_alive,
const ASN1_ITEM *it, const ASN1_VALUE *resp)
{
char buf[200], *p;
- int ret = snprintf(buf, sizeof(buf), HTTP_1_0" 200 OK\r\n%s"
- "Content-type: %s\r\n"
- "Content-Length: %d\r\n",
- keep_alive ? "Connection: keep-alive\r\n" : "",
- content_type,
- ASN1_item_i2d(resp, NULL, it));
+ int ret = BIO_snprintf(buf, sizeof(buf), HTTP_1_0" 200 OK\r\n%s"
+ "Content-type: %s\r\n"
+ "Content-Length: %d\r\n",
+ keep_alive ? "Connection: keep-alive\r\n" : "",
+ content_type,
+ ASN1_item_i2d(resp, NULL, it));
if (ret < 0 || (size_t)ret >= sizeof(buf))
return 0;
@@ -532,9 +532,9 @@ int http_server_send_status(const char *prog, BIO *cbio,
int status, const char *reason)
{
char buf[200];
- int ret = snprintf(buf, sizeof(buf), HTTP_1_0" %d %s\r\n\r\n",
- /* This implicitly cancels keep-alive */
- status, reason);
+ int ret = BIO_snprintf(buf, sizeof(buf), HTTP_1_0" %d %s\r\n\r\n",
+ /* This implicitly cancels keep-alive */
+ status, reason);
if (ret < 0 || (size_t)ret >= sizeof(buf))
return 0;