- remove HAVE_REST, remove json reference from rest
authorMartin Schanzenbach <mschanzenbach@posteo.de>
Thu, 5 May 2016 09:13:47 +0000 (09:13 +0000)
committerMartin Schanzenbach <mschanzenbach@posteo.de>
Thu, 5 May 2016 09:13:47 +0000 (09:13 +0000)
configure.ac
src/Makefile.am
src/gns/Makefile.am
src/identity/Makefile.am
src/namestore/Makefile.am
src/rest/Makefile.am
src/rest/rest.c

index e89f7befbb14035d0bdc863ff5d9665bf717d094..5b2f3fef278d4fe6fd947c15ff4675ead9bbfc1a 100644 (file)
@@ -970,8 +970,6 @@ AC_ARG_WITH(microhttpd,
 AM_CONDITIONAL(HAVE_MHD, test x$lmhd = x1)
 AC_DEFINE_UNQUOTED([HAVE_MHD], $lmhd, [We have libmicrohttpd])
 
-AM_CONDITIONAL(HAVE_REST, [test x$lmhd = x1 -a x$jansson = x1])
-
 AM_CONDITIONAL(HAVE_JSON, [test x$jansson = x1])
 
 # restore LIBS
index 946711797428c3ed525983478ca1225a9a92656a..5582c178b3a89d28c900a4e2b429ba0441cba626 100644 (file)
@@ -19,9 +19,11 @@ if HAVE_EXPERIMENTAL
 
 endif
 
-if HAVE_REST
+if HAVE_JSON
+if HAVE_MHD
   PROVIDER_DIR = identity-provider
 endif
+endif
 
 if HAVE_JSON
   JSON_DIR = json
@@ -50,7 +52,7 @@ if HAVE_POSTGRESQL
  POSTGRES_DIR = pq postgres
 endif
 
-if HAVE_REST
+if HAVE_MHD
  REST_DIR = rest
 if HAVE_JSON
  JSONAPI_DIR = jsonapi
index 5ac5987355904819d4e94020d8a9d7d2bb6c5497..04fe452242c25070e9c86b905e70ec7f257ba9b0 100644 (file)
@@ -92,9 +92,11 @@ plugin_LTLIBRARIES = \
   libgnunet_plugin_gnsrecord_gns.la
 
 
-if HAVE_REST
+if HAVE_MHD
+if HAVE_JSON
 plugin_LTLIBRARIES += libgnunet_plugin_rest_gns.la
 endif
+endif
 
 libgnunet_plugin_gnsrecord_gns_la_SOURCES = \
   plugin_gnsrecord_gns.c
index f902f74fdc894a47379907d649cc8451e9590739..9b28ac093ae77dfdcc2983d53047326ffd4ce087 100644 (file)
@@ -39,11 +39,13 @@ bin_PROGRAMS = \
 libexec_PROGRAMS = \
  gnunet-service-identity 
 
-if HAVE_REST
+if HAVE_MHD
+if HAVE_JSON
 plugin_LTLIBRARIES = \
   libgnunet_plugin_rest_identity.la \
   libgnunet_plugin_gnsrecord_identity.la
 endif
+endif
 
 
 gnunet_service_identity_SOURCES = \
index cf47e8507d4a8eca808abdf2874e32517b0c9400..5fddebfa806eba15724eb75eb2e1abc0d32ad40f 100644 (file)
@@ -71,9 +71,11 @@ check_PROGRAMS = \
  $(TESTING_TESTS)
 endif
 
-if HAVE_REST
+if HAVE_MHD
+if HAVE_JSON
 REST_PLUGIN=libgnunet_plugin_rest_namestore.la
 endif
+endif
 
 if ENABLE_TEST_RUN
 AM_TESTS_ENVIRONMENT=export GNUNET_PREFIX=$${GNUNET_PREFIX:-@libdir@};export PATH=$${GNUNET_PREFIX:-@prefix@}/bin:$$PATH;
index 9ab7c03e0f719c07e688dee63eda1189024987e0..c0feb9122d014818c4f2a28e199feb2f18c04d2b 100644 (file)
@@ -38,7 +38,7 @@ libgnunetrest_la_SOURCES = \
   rest.c
 libgnunetrest_la_LIBADD = \
   $(top_builddir)/src/util/libgnunetutil.la $(XLIB) \
-  $(GN_LIBINTL) -lmicrohttpd -ljansson
+  $(GN_LIBINTL) -lmicrohttpd 
 libgnunetrest_la_LDFLAGS = \
   $(GN_LIB_LDFLAGS) \
   -version-info 0:0:0
index bf32c9849c785e3c0f96c90a4d88e256e7c1ddeb..b0d7e5ace25af1e7b644dcc5731740613565478b 100644 (file)
@@ -48,13 +48,13 @@ GNUNET_REST_namespace_match (const char *url, const char *namespace)
 }
 
 /**
- * Create JSON API MHD response
+ * Create MHD response
  *
- * @param data JSON result
+ * @param data result
  * @retun MHD response
  */
 struct MHD_Response*
-GNUNET_REST_create_json_response (const char *data)
+GNUNET_REST_create_response (const char *data)
 {
   struct MHD_Response *resp;
   size_t len;
@@ -69,7 +69,6 @@ GNUNET_REST_create_json_response (const char *data)
   resp = MHD_create_response_from_buffer (len,
                                           (void*)data,
                                           MHD_RESPMEM_MUST_COPY);
-  MHD_add_response_header (resp,MHD_HTTP_HEADER_CONTENT_TYPE,"application/json");
   return resp;
 
 }