+/**
+ * Generic accept response in JSON format.
+ * @param context The context to work in
+ * @param description A short description.
+ * @param cookie Optional. If given, the cookie field is set to that value.
+ */
+void FCGI_AcceptJSON(FCGIContext *context, const char *description, const char *cookie)
+{
+ printf("Content-type: application/json; charset=utf-8\r\n");
+ if (cookie) {
+ printf("Set-Cookie: %s\r\n", cookie);
+ }
+ printf("\r\n{\r\n");
+ printf("\t\"module\" : \"%s\"", context->current_module);
+ FCGI_JSONLong("status", STATUS_OK);
+ FCGI_JSONPair("description", description);
+ FCGI_EndJSON();
+}
+