summaryrefslogtreecommitdiff
path: root/xs_httpd.h
diff options
context:
space:
mode:
authorGravatar default2023-02-14 08:29:21 +0100
committerGravatar default2023-02-14 08:29:21 +0100
commite144b0dc67838c99fcfc2c4db75ac0ac54535b2d (patch)
treea8411ece20c0c5db05f8e1ed0aa54d077e190caa /xs_httpd.h
parentSome tweaks to connection reply logging. (diff)
downloadpenes-snac2-e144b0dc67838c99fcfc2c4db75ac0ac54535b2d.tar.gz
penes-snac2-e144b0dc67838c99fcfc2c4db75ac0ac54535b2d.tar.xz
penes-snac2-e144b0dc67838c99fcfc2c4db75ac0ac54535b2d.zip
Add OK or ERROR to HTTP response.
Diffstat (limited to '')
-rw-r--r--xs_httpd.h2
1 files changed, 1 insertions, 1 deletions
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
265 xs_str *k; 265 xs_str *k;
266 xs_val *v; 266 xs_val *v;
267 267
268 proto = xs_fmt("HTTP/1.1 %d ", status); 268 proto = xs_fmt("HTTP/1.1 %d %s", status, status / 100 == 2 ? "OK" : "ERROR");
269 fprintf(f, "%s\r\n", proto); 269 fprintf(f, "%s\r\n", proto);
270 270
271 p = headers; 271 p = headers;