Code Review
/
src
/
app-framework-binder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
fix bug in websocket client
[src/app-framework-binder.git]
/
src
/
afb-hsrv.c
diff --git
a/src/afb-hsrv.c
b/src/afb-hsrv.c
index
06c90df
..
46e61a0
100644
(file)
--- a/
src/afb-hsrv.c
+++ b/
src/afb-hsrv.c
@@
-33,7
+33,7
@@
#include "afb-context.h"
#include "afb-hreq.h"
#include "afb-hsrv.h"
#include "afb-context.h"
#include "afb-hreq.h"
#include "afb-hsrv.h"
-#include
"afb-req-itf.h"
+#include
<afb/afb-req-itf.h>
#include "verbose.h"
#include "afb-common.h"
#include "verbose.h"
#include "afb-common.h"
@@
-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;
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;
}
afb_hreq_reply_error(hreq, MHD_HTTP_UNSUPPORTED_MEDIA_TYPE);
return MHD_YES;
}