From e144b0dc67838c99fcfc2c4db75ac0ac54535b2d Mon Sep 17 00:00:00 2001 From: default Date: Tue, 14 Feb 2023 08:29:21 +0100 Subject: [PATCH] Add OK or ERROR to HTTP response. --- xs_httpd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs_httpd.h b/xs_httpd.h index 829411c..e01b660 100644 --- a/xs_httpd.h +++ b/xs_httpd.h @@ -265,7 +265,7 @@ void xs_httpd_response(FILE *f, int status, xs_dict *headers, xs_str *body, int xs_str *k; xs_val *v; - proto = xs_fmt("HTTP/1.1 %d ", status); + proto = xs_fmt("HTTP/1.1 %d %s", status, status / 100 == 2 ? "OK" : "ERROR"); fprintf(f, "%s\r\n", proto); p = headers;