aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-07-15 12:58:56 +0000
committerChristian Grothoff <christian@grothoff.org>2015-07-15 12:58:56 +0000
commit3800d3820b0158c1a8cab81ac37064d0695c71b9 (patch)
treec61d7dd72c23bfb7f5043026d081278e7b5cec82 /doc
parentb118d605ac47c802bd4737476c7d76318c30980e (diff)
downloadlibmicrohttpd-3800d3820b0158c1a8cab81ac37064d0695c71b9.tar.gz
libmicrohttpd-3800d3820b0158c1a8cab81ac37064d0695c71b9.zip
-modernize example
Diffstat (limited to 'doc')
-rw-r--r--doc/examples/responseheaders.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/doc/examples/responseheaders.c b/doc/examples/responseheaders.c
index 25cca43e..273a1e55 100644
--- a/doc/examples/responseheaders.c
+++ b/doc/examples/responseheaders.c
@@ -43,8 +43,8 @@ answer_to_connection (void *cls, struct MHD_Connection *connection,
43 "<html><body>An internal server error has occured!\ 43 "<html><body>An internal server error has occured!\
44 </body></html>"; 44 </body></html>";
45 response = 45 response =
46 MHD_create_response_from_buffer (strlen (errorstr), 46 MHD_create_response_from_buffer (strlen (errorstr),
47 (void *) errorstr, 47 (void *) errorstr,
48 MHD_RESPMEM_PERSISTENT); 48 MHD_RESPMEM_PERSISTENT);
49 if (NULL != response) 49 if (NULL != response)
50 { 50 {
@@ -59,7 +59,7 @@ answer_to_connection (void *cls, struct MHD_Connection *connection,
59 return MHD_NO; 59 return MHD_NO;
60 } 60 }
61 response = 61 response =
62 MHD_create_response_from_fd_at_offset (sbuf.st_size, fd, 0); 62 MHD_create_response_from_fd_at_offset64 (sbuf.st_size, fd, 0);
63 MHD_add_response_header (response, "Content-Type", MIMETYPE); 63 MHD_add_response_header (response, "Content-Type", MIMETYPE);
64 ret = MHD_queue_response (connection, MHD_HTTP_OK, response); 64 ret = MHD_queue_response (connection, MHD_HTTP_OK, response);
65 MHD_destroy_response (response); 65 MHD_destroy_response (response);