+ } else if (strncmp(url, "/feedinfo", 9) == 0) {
+ ret = check_auth(connection, method, upload_data, upload_data_size, ptr);
+ if (ret == MHD_YES)
+ return MHD_YES;
+
+ struct auth_state *as = (struct auth_state *) *ptr;
+
+ if (url[9] != '/')
+ return respond_404(connection);
+
+ ret = parse_url_info(url + 10, &info);
+ if ((ret & URL_INFO_NAME) == 0)
+ return respond_404(connection);
+
+ yajl_gen g = yajl_gen_alloc(&yajl_c, NULL);
+ yajl_gen_map_open(g);
+ yajl_gen_string(g, "subscribed", 10);
+ yajl_gen_bool(g, is_subscribed(as->username, info.name));
+ yajl_gen_map_close(g);
+
+ const unsigned char *ybuf;
+ yajl_gen_get_buf(g, &ybuf, &len);
+
+ response = MHD_create_response_from_data(len, (void *)ybuf, MHD_NO, MHD_YES);
+ ret = MHD_queue_response(connection, MHD_HTTP_OK, response);
+ MHD_destroy_response(response);
+
+ yajl_gen_free(g);
+ free(as);
+
+ return ret;