Merge branch 'master' of https://github.com/iotbzh/afb-daemon
authorFulup Ar Foll <fulup@iot.bzh>
Fri, 13 May 2016 17:10:54 +0000 (19:10 +0200)
committerFulup Ar Foll <fulup@iot.bzh>
Fri, 13 May 2016 17:10:54 +0000 (19:10 +0200)
1  2 
src/afb-hsrv.c

diff --combined src/afb-hsrv.c
@@@ -1,5 -1,5 +1,5 @@@
  /*
-  * Copyright 2016 IoT.bzh
+  * Copyright (C) 2016 "IoT.bzh"
   * Author: José Bollo <jose.bollo@iot.bzh>
   *
   * Licensed under the Apache License, Version 2.0 (the "License");
@@@ -156,9 -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;
                        }