+ if (method == afb_method_none) {
+ reply_error(connection, MHD_HTTP_BAD_REQUEST);
+ return MHD_YES;
+ }
+
+ /* create the request */
+ hreq = calloc(1, sizeof *hreq);
+ if (hreq == NULL) {
+ reply_error(connection, MHD_HTTP_INTERNAL_SERVER_ERROR);
+ return MHD_YES;
+ }