aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hostlist/gnunet-daemon-hostlist_server.c5
-rw-r--r--src/namestore/gnunet-namestore-fcfsd.c2
-rw-r--r--src/transport/plugin_transport_http_server.c17
3 files changed, 13 insertions, 11 deletions
diff --git a/src/hostlist/gnunet-daemon-hostlist_server.c b/src/hostlist/gnunet-daemon-hostlist_server.c
index c73f32b01..084d2b5cd 100644
--- a/src/hostlist/gnunet-daemon-hostlist_server.c
+++ b/src/hostlist/gnunet-daemon-hostlist_server.c
@@ -170,8 +170,9 @@ finish_response ()
170 "Creating hostlist response with %u bytes\n", 170 "Creating hostlist response with %u bytes\n",
171 (unsigned int) builder->size); 171 (unsigned int) builder->size);
172 response = 172 response =
173 MHD_create_response_from_data (builder->size, builder->data, MHD_YES, 173 MHD_create_response_from_buffer (builder->size,
174 MHD_NO); 174 builder->data,
175 MHD_RESPMEM_MUST_FREE);
175 add_cors_headers (response); 176 add_cors_headers (response);
176 if ((NULL == daemon_handle_v4) && (NULL == daemon_handle_v6)) 177 if ((NULL == daemon_handle_v4) && (NULL == daemon_handle_v6))
177 { 178 {
diff --git a/src/namestore/gnunet-namestore-fcfsd.c b/src/namestore/gnunet-namestore-fcfsd.c
index 6abe10d42..f23162af2 100644
--- a/src/namestore/gnunet-namestore-fcfsd.c
+++ b/src/namestore/gnunet-namestore-fcfsd.c
@@ -756,7 +756,7 @@ create_response (void *cls,
756 (void *) METHOD_ERROR, 756 (void *) METHOD_ERROR,
757 MHD_RESPMEM_PERSISTENT); 757 MHD_RESPMEM_PERSISTENT);
758 ret = MHD_queue_response (connection, 758 ret = MHD_queue_response (connection,
759 MHD_HTTP_METHOD_NOT_ACCEPTABLE, 759 MHD_HTTP_NOT_ACCEPTABLE,
760 response); 760 response);
761 MHD_destroy_response (response); 761 MHD_destroy_response (response);
762 return ret; 762 return ret;
diff --git a/src/transport/plugin_transport_http_server.c b/src/transport/plugin_transport_http_server.c
index 9f2908bda..3ba651cb7 100644
--- a/src/transport/plugin_transport_http_server.c
+++ b/src/transport/plugin_transport_http_server.c
@@ -1761,10 +1761,9 @@ server_access_cb (void *cls,
1761 else 1761 else
1762 { 1762 {
1763 /* existing session already has matching connection, refuse */ 1763 /* existing session already has matching connection, refuse */
1764 response = MHD_create_response_from_data (strlen (HTTP_ERROR_RESPONSE), 1764 response = MHD_create_response_from_buffer (strlen (HTTP_ERROR_RESPONSE),
1765 HTTP_ERROR_RESPONSE, 1765 HTTP_ERROR_RESPONSE,
1766 MHD_NO, 1766 MHD_RESPMEM_PERSISTENT);
1767 MHD_NO);
1768 MHD_add_response_header (response, 1767 MHD_add_response_header (response,
1769 MHD_HTTP_HEADER_CONTENT_TYPE, 1768 MHD_HTTP_HEADER_CONTENT_TYPE,
1770 "text/html"); 1769 "text/html");
@@ -1779,8 +1778,9 @@ server_access_cb (void *cls,
1779 { 1778 {
1780 /* Session was already disconnected; 1779 /* Session was already disconnected;
1781 sent HTTP/1.1: 200 OK as response */ 1780 sent HTTP/1.1: 200 OK as response */
1782 response = MHD_create_response_from_data (strlen ("Thank you!"), 1781 response = MHD_create_response_from_buffer (strlen ("Thank you!"),
1783 "Thank you!", MHD_NO, MHD_NO); 1782 "Thank you!",
1783 MHD_RESPMEM_PERSISTENT);
1784 add_cors_headers(response); 1784 add_cors_headers(response);
1785 MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); 1785 MHD_queue_response (mhd_connection, MHD_HTTP_OK, response);
1786 MHD_destroy_response (response); 1786 MHD_destroy_response (response);
@@ -1823,8 +1823,9 @@ server_access_cb (void *cls,
1823 s->address->address_length)); 1823 s->address->address_length));
1824 sc->connected = GNUNET_NO; 1824 sc->connected = GNUNET_NO;
1825 /* Sent HTTP/1.1: 200 OK as PUT Response\ */ 1825 /* Sent HTTP/1.1: 200 OK as PUT Response\ */
1826 response = MHD_create_response_from_data (strlen ("Thank you!"), 1826 response = MHD_create_response_from_buffer (strlen ("Thank you!"),
1827 "Thank you!", MHD_NO, MHD_NO); 1827 "Thank you!",
1828 MHD_RESPMEM_PERSISTENT);
1828 add_cors_headers(response); 1829 add_cors_headers(response);
1829 MHD_queue_response (mhd_connection, MHD_HTTP_OK, response); 1830 MHD_queue_response (mhd_connection, MHD_HTTP_OK, response);
1830 MHD_destroy_response (response); 1831 MHD_destroy_response (response);