mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-29 04:09:31 +03:00
introducing MHD_create_response_from_buffer, deprecating MHD_create_response_from_data
This commit is contained in:
1 parent
3af8f4ce64
commit
43542a78c6
49 files changed
+297
-143
No files matched your search
@@ -61,8 +61,9 @@ ahc_echo (void *cls,
|
||||
return MHD_YES;
|
||||
}
|
||||
*unused = NULL;
|
||||
response = MHD_create_response_from_data (strlen (url),
|
||||
(void *) url, MHD_NO, MHD_YES);
|
||||
response = MHD_create_response_from_buffer (strlen (url),
|
||||
(void *) url,
|
||||
MHD_RESPMEM_MUST_COPY);
|
||||
ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
|
||||
MHD_destroy_response (response);
|
||||
if (ret == MHD_NO)
|
||||
|
||||
@@ -78,9 +78,9 @@ query_session_ahc (void *cls, struct MHD_Connection *connection,
|
||||
return -1;
|
||||
}
|
||||
|
||||
response = MHD_create_response_from_data (strlen (EMPTY_PAGE),
|
||||
(void *) EMPTY_PAGE,
|
||||
MHD_NO, MHD_NO);
|
||||
response = MHD_create_response_from_buffer (strlen (EMPTY_PAGE),
|
||||
(void *) EMPTY_PAGE,
|
||||
MHD_RESPMEM_PERSISTENT);
|
||||
ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
|
||||
MHD_destroy_response (response);
|
||||
return ret;
|
||||
|
||||
@@ -178,9 +178,9 @@ http_ahc (void *cls, struct MHD_Connection *connection,
|
||||
return MHD_YES;
|
||||
}
|
||||
*ptr = NULL; /* reset when done */
|
||||
response = MHD_create_response_from_data (strlen (test_data),
|
||||
(void *) test_data,
|
||||
MHD_NO, MHD_NO);
|
||||
response = MHD_create_response_from_buffer (strlen (test_data),
|
||||
(void *) test_data,
|
||||
MHD_RESPMEM_PERSISTENT);
|
||||
ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
|
||||
MHD_destroy_response (response);
|
||||
return ret;
|
||||
|
||||
Reference in new issue
Block a user