diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-01-04 12:40:03 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-01-04 12:40:03 +0000 |
commit | 43542a78c6bfc10dc06196c0702b802eb6a45591 (patch) | |
tree | 3857b4ec8cd7ce3c8cbba77de74902cdd6b92c10 /doc/examples/basicauthentication.c | |
parent | 3af8f4ce646d29cd5942a1e3dda3b7ed03a82af6 (diff) | |
download | libmicrohttpd-43542a78c6bfc10dc06196c0702b802eb6a45591.tar.gz libmicrohttpd-43542a78c6bfc10dc06196c0702b802eb6a45591.zip |
introducing MHD_create_response_from_buffer, deprecating MHD_create_response_from_data
Diffstat (limited to 'doc/examples/basicauthentication.c')
-rw-r--r-- | doc/examples/basicauthentication.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/doc/examples/basicauthentication.c b/doc/examples/basicauthentication.c index 0b5ce62c..da617098 100644 --- a/doc/examples/basicauthentication.c +++ b/doc/examples/basicauthentication.c | |||
@@ -40,8 +40,8 @@ answer_to_connection (void *cls, struct MHD_Connection *connection, | |||
40 | { | 40 | { |
41 | const char *page = "<html><body>Go away.</body></html>"; | 41 | const char *page = "<html><body>Go away.</body></html>"; |
42 | response = | 42 | response = |
43 | MHD_create_response_from_data (strlen (page), (void *) page, MHD_NO, | 43 | MHD_create_response_from_buffer (strlen (page), (void *) page, |
44 | MHD_NO); | 44 | MHD_RESPMEM_PERSISTENT); |
45 | ret = MHD_queue_basic_auth_fail_response (connection, | 45 | ret = MHD_queue_basic_auth_fail_response (connection, |
46 | "my realm", | 46 | "my realm", |
47 | response); | 47 | response); |
@@ -50,8 +50,8 @@ answer_to_connection (void *cls, struct MHD_Connection *connection, | |||
50 | { | 50 | { |
51 | const char *page = "<html><body>A secret.</body></html>"; | 51 | const char *page = "<html><body>A secret.</body></html>"; |
52 | response = | 52 | response = |
53 | MHD_create_response_from_data (strlen (page), (void *) page, MHD_NO, | 53 | MHD_create_response_from_buffer (strlen (page), (void *) page, |
54 | MHD_NO); | 54 | MHD_RESPMEM_PERSISTENT); |
55 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); | 55 | ret = MHD_queue_response (connection, MHD_HTTP_OK, response); |
56 | } | 56 | } |
57 | MHD_destroy_response (response); | 57 | MHD_destroy_response (response); |