aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-hsrv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/afb-hsrv.c')
-rw-r--r--src/afb-hsrv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/afb-hsrv.c b/src/afb-hsrv.c
index d2356484..5b0153c2 100644
--- a/src/afb-hsrv.c
+++ b/src/afb-hsrv.c
@@ -156,7 +156,9 @@ static int access_handler(
if (hreq->postform == NULL)
afb_hreq_reply_error(hreq, MHD_HTTP_INTERNAL_SERVER_ERROR);
return MHD_YES;
- } else if (strcasestr(type, JSON_CONTENT) == NULL) {
+ } else if (strcasestr(type, JSON_CONTENT) != NULL) {
+ return MHD_YES;
+ } else {
afb_hreq_reply_error(hreq, MHD_HTTP_UNSUPPORTED_MEDIA_TYPE);
return MHD_YES;
}