diff options
Diffstat (limited to 'src/examples/digest_auth_example.c')
-rw-r--r-- | src/examples/digest_auth_example.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/examples/digest_auth_example.c b/src/examples/digest_auth_example.c index bf6f896f..01f09dec 100644 --- a/src/examples/digest_auth_example.c +++ b/src/examples/digest_auth_example.c | |||
@@ -49,9 +49,9 @@ ahc_echo (void *cls, | |||
49 | username = MHD_digest_auth_get_username(connection); | 49 | username = MHD_digest_auth_get_username(connection); |
50 | if (username == NULL) | 50 | if (username == NULL) |
51 | { | 51 | { |
52 | response = MHD_create_response_from_data(strlen (DENIED), | 52 | response = MHD_create_response_from_buffer(strlen (DENIED), |
53 | DENIED, | 53 | DENIED, |
54 | MHD_NO, MHD_NO); | 54 | MHD_RESPMEM_PERSISTENT); |
55 | ret = MHD_queue_auth_fail_response(connection, realm, | 55 | ret = MHD_queue_auth_fail_response(connection, realm, |
56 | OPAQUE, | 56 | OPAQUE, |
57 | response, | 57 | response, |
@@ -67,9 +67,9 @@ ahc_echo (void *cls, | |||
67 | if ( (ret == MHD_INVALID_NONCE) || | 67 | if ( (ret == MHD_INVALID_NONCE) || |
68 | (ret == MHD_NO) ) | 68 | (ret == MHD_NO) ) |
69 | { | 69 | { |
70 | response = MHD_create_response_from_data(strlen (DENIED), | 70 | response = MHD_create_response_from_buffer(strlen (DENIED), |
71 | DENIED, | 71 | DENIED, |
72 | MHD_NO, MHD_NO); | 72 | MHD_RESPMEM_PERSISTENT); |
73 | if (NULL == response) | 73 | if (NULL == response) |
74 | return MHD_NO; | 74 | return MHD_NO; |
75 | ret = MHD_queue_auth_fail_response(connection, realm, | 75 | ret = MHD_queue_auth_fail_response(connection, realm, |
@@ -79,8 +79,8 @@ ahc_echo (void *cls, | |||
79 | MHD_destroy_response(response); | 79 | MHD_destroy_response(response); |
80 | return ret; | 80 | return ret; |
81 | } | 81 | } |
82 | response = MHD_create_response_from_data(strlen(PAGE), PAGE, | 82 | response = MHD_create_response_from_buffer(strlen(PAGE), PAGE, |
83 | MHD_NO, MHD_NO); | 83 | MHD_RESPMEM_PERSISTENT); |
84 | ret = MHD_queue_response(connection, MHD_HTTP_OK, response); | 84 | ret = MHD_queue_response(connection, MHD_HTTP_OK, response); |
85 | MHD_destroy_response(response); | 85 | MHD_destroy_response(response); |
86 | return ret; | 86 | return ret; |