diff options
author | Christian Hesse <mail@eworm.de> | 2015-12-12 12:15:39 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2015-12-12 12:15:39 +0100 |
commit | c072c7e9947ea85df6ee6b34c813f2b1a56cb393 (patch) | |
tree | 68bcb8fb2ab765857c82172a181417df2c1ee8bb /pacredir.c | |
parent | d7e41016af9ba005390469cabd8e5cda1360b90e (diff) | |
download | paccache-c072c7e9947ea85df6ee6b34c813f2b1a56cb393.tar.gz paccache-c072c7e9947ea85df6ee6b34c813f2b1a56cb393.tar.zst |
use MHD_create_response_from_buffer()
MHD_create_response_from_data() is deprecated, so use
MHD_create_response_from_buffer() instead.
Diffstat (limited to 'pacredir.c')
-rw-r--r-- | pacredir.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -445,7 +445,7 @@ response: write_log(stdout, "Redirecting to %s\n", url); page = malloc(strlen(PAGE307) + strlen(url) + strlen(basename) + 1); sprintf(page, PAGE307, url, basename); - response = MHD_create_response_from_data(strlen(page), (void*) page, MHD_NO, MHD_NO); + response = MHD_create_response_from_buffer(strlen(page), (void*) page, MHD_RESPMEM_PERSISTENT); ret = MHD_add_response_header(response, "Location", url); ret = MHD_queue_response(connection, MHD_HTTP_TEMPORARY_REDIRECT, response); free(url); @@ -458,7 +458,7 @@ response: write_log(stdout, "File %s not found on %d servers, giving up.\n", basename, req_count + 1); page = malloc(strlen(PAGE404) + strlen(basename) + 1); sprintf(page, PAGE404, basename); - response = MHD_create_response_from_data(strlen(page), (void*) page, MHD_NO, MHD_NO); + response = MHD_create_response_from_buffer(strlen(page), (void*) page, MHD_RESPMEM_PERSISTENT); ret = MHD_queue_response(connection, MHD_HTTP_NOT_FOUND, response); } MHD_destroy_response(response); |