[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r12848 - libmicrohttpd/doc
From: |
gnunet |
Subject: |
[GNUnet-SVN] r12848 - libmicrohttpd/doc |
Date: |
Sun, 5 Sep 2010 14:00:50 +0200 |
Author: grothoff
Date: 2010-09-05 14:00:50 +0200 (Sun, 05 Sep 2010)
New Revision: 12848
Modified:
libmicrohttpd/doc/microhttpd.texi
Log:
fix
Modified: libmicrohttpd/doc/microhttpd.texi
===================================================================
--- libmicrohttpd/doc/microhttpd.texi 2010-09-05 11:58:38 UTC (rev 12847)
+++ libmicrohttpd/doc/microhttpd.texi 2010-09-05 12:00:50 UTC (rev 12848)
@@ -1345,13 +1345,13 @@
@node microhttpd-dauth
@chapter Utilizing Digest Authentication
address@hidden {char *} MHD_digest_auth_get_username(struct MHD_Connection
*connection)
address@hidden {char *} MHD_digest_auth_get_username (struct MHD_Connection
*connection)
Find and return a pointer to the username value from the request header.
Return @mynull{} if the value is not found or header does not exist.
If returned value is not @mynull{}, the value must be free()'ed.
@end deftypefun
address@hidden int MHD_digest_auth_check(struct MHD_Connection *connection,
const char *realm, const char *username, const char *password, unsigned int
nonce_timeout)
address@hidden int MHD_digest_auth_check (struct MHD_Connection *connection,
const char *realm, const char *username, const char *password, unsigned int
nonce_timeout)
Checks if the provided values in the WWW-Authenticate header are valid
and sound according to RFC2716. If valid return MHD_YES, otherwise return
MHD_NO.
@@ -1367,7 +1367,7 @@
Most of the time it is sound to specify 300 seconds as its values.
@end deftypefun
address@hidden int MHD_queue_auth_fail_response(struct MHD_Connection
*connection, const char *realm, const char *opaque, struct MHD_Response
*response, int signal_stale)
address@hidden int MHD_queue_auth_fail_response (struct MHD_Connection
*connection, const char *realm, const char *opaque, struct MHD_Response
*response, int signal_stale)
Queues a response to request authentication from the client,
return MHD_YES if successful, otherwise MHD_NO.
@@ -1398,16 +1398,16 @@
const char *method,
const char *version,
const char *upload_data, size_t *upload_data_size, void **ptr)
-{
address@hidden
struct MHD_Response *response;
char *username;
const char *password = "testpass";
- const char *realm = "address@hidden";
+ const char *realm = "test@@example.com";
int ret;
username = MHD_digest_auth_get_username(connection);
if (username == NULL)
- {
+ @{
response = MHD_create_response_from_data(strlen (DENIED),
DENIED,
MHD_NO, MHD_NO);
@@ -1417,7 +1417,7 @@
MHD_NO);
MHD_destroy_response(response);
return ret;
- }
+ @}
ret = MHD_digest_auth_check(connection, realm,
username,
password,
@@ -1425,7 +1425,7 @@
free(username);
if ( (ret == MHD_INVALID_NONCE) ||
(ret == MHD_NO) )
- {
+ @{
response = MHD_create_response_from_data(strlen (DENIED),
DENIED,
MHD_NO, MHD_NO);
@@ -1437,13 +1437,13 @@
(ret == MHD_INVALID_NONCE) ? MHD_YES :
MHD_NO);
MHD_destroy_response(response);
return ret;
- }
+ @}
response = MHD_create_response_from_data(strlen(PAGE), PAGE,
MHD_NO, MHD_NO);
ret = MHD_queue_response(connection, MHD_HTTP_OK, response);
MHD_destroy_response(response);
return ret;
-}
address@hidden
@end example
@c ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r12848 - libmicrohttpd/doc,
gnunet <=