summaryrefslogtreecommitdiff
path: root/src/transport/plugin_transport_http_server.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-06-12 07:52:45 +0000
committerChristian Grothoff <christian@grothoff.org>2015-06-12 07:52:45 +0000
commitfa7754fd510260ffb8850feb5d6559e55f75d4e9 (patch)
tree6da39156aedb0adcbfd3c289ea716b0939efa19c /src/transport/plugin_transport_http_server.c
parentd67d6d47727a91ed1767317f15f071abebfbdff7 (diff)
fix use of deprecated MHD symbols
Diffstat (limited to 'src/transport/plugin_transport_http_server.c')
-rw-r--r--src/transport/plugin_transport_http_server.c17
1 files changed, 9 insertions, 8 deletions
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,
else
{
/* existing session already has matching connection, refuse */
- response = MHD_create_response_from_data (strlen (HTTP_ERROR_RESPONSE),
- HTTP_ERROR_RESPONSE,
- MHD_NO,
- MHD_NO);
+ response = MHD_create_response_from_buffer (strlen (HTTP_ERROR_RESPONSE),
+ HTTP_ERROR_RESPONSE,
+ MHD_RESPMEM_PERSISTENT);
MHD_add_response_header (response,
MHD_HTTP_HEADER_CONTENT_TYPE,
"text/html");
@@ -1779,8 +1778,9 @@ server_access_cb (void *cls,
{
/* Session was already disconnected;
sent HTTP/1.1: 200 OK as response */
- response = MHD_create_response_from_data (strlen ("Thank you!"),
- "Thank you!", MHD_NO, MHD_NO);
+ response = MHD_create_response_from_buffer (strlen ("Thank you!"),
+ "Thank you!",
+ MHD_RESPMEM_PERSISTENT);
add_cors_headers(response);
MHD_queue_response (mhd_connection, MHD_HTTP_OK, response);
MHD_destroy_response (response);
@@ -1823,8 +1823,9 @@ server_access_cb (void *cls,
s->address->address_length));
sc->connected = GNUNET_NO;
/* Sent HTTP/1.1: 200 OK as PUT Response\ */
- response = MHD_create_response_from_data (strlen ("Thank you!"),
- "Thank you!", MHD_NO, MHD_NO);
+ response = MHD_create_response_from_buffer (strlen ("Thank you!"),
+ "Thank you!",
+ MHD_RESPMEM_PERSISTENT);
add_cors_headers(response);
MHD_queue_response (mhd_connection, MHD_HTTP_OK, response);
MHD_destroy_response (response);