summaryrefslogtreecommitdiff
path: root/httpd.c
diff options
context:
space:
mode:
Diffstat (limited to 'httpd.c')
-rw-r--r--httpd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/httpd.c b/httpd.c
index 197a6c0..d401d7d 100644
--- a/httpd.c
+++ b/httpd.c
@@ -382,7 +382,7 @@ void httpd_connection(FILE *f)
srv_archive("RECV", NULL, req, payload, p_size, status, headers, body, b_size);
/* JSON validation check */
- if (strcmp(ctype, "application/json") == 0) {
+ if (!xs_is_null(body) && strcmp(ctype, "application/json") == 0) {
xs *j = xs_json_loads(body);
if (j == NULL) {