snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit e144b0dc67838c99fcfc2c4db75ac0ac54535b2d
parent f832e6a508c7d98b7d23e2494db946be69231261
Author: default <nobody@localhost>
Date:   Tue, 14 Feb 2023 08:29:21 +0100

Add OK or ERROR to HTTP response.

Diffstat:
Mxs_httpd.h | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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;