mirror of
https://git.gnunet.org/libmicrohttpd.git
synced 2026-09-25 04:09:31 +03:00
Updated doxy; explicitly tolerated NULL in MHD_queue*_auth*()
This commit is contained in:
@@ -3226,8 +3226,8 @@ MHD_lookup_connection_value_n (struct MHD_Connection *connection,
|
||||
*
|
||||
* @param connection the connection identifying the client
|
||||
* @param status_code HTTP status code (i.e. #MHD_HTTP_OK)
|
||||
* @param response response to transmit
|
||||
* @return #MHD_NO on error (i.e. reply already sent),
|
||||
* @param response response to transmit, the NULL is tolerated
|
||||
* @return #MHD_NO on error (reply already sent, response is NULL),
|
||||
* #MHD_YES on success or if message has been queued
|
||||
* @ingroup response
|
||||
* @sa #MHD_AccessHandlerCallback
|
||||
@@ -4226,7 +4226,7 @@ MHD_digest_auth_check_digest (struct MHD_Connection *connection,
|
||||
* @param opaque string to user for opaque value
|
||||
* @param response reply to send; should contain the "access denied"
|
||||
* body; note that this function will set the "WWW Authenticate"
|
||||
* header and that the caller should not do this
|
||||
* header and that the caller should not do this; the NULL is tolerated
|
||||
* @param signal_stale #MHD_YES if the nonce is invalid to add
|
||||
* 'stale=true' to the authentication header
|
||||
* @param algo digest algorithm to use
|
||||
@@ -4253,7 +4253,7 @@ MHD_queue_auth_fail_response2 (struct MHD_Connection *connection,
|
||||
* @param opaque string to user for opaque value
|
||||
* @param response reply to send; should contain the "access denied"
|
||||
* body; note that this function will set the "WWW Authenticate"
|
||||
* header and that the caller should not do this
|
||||
* header and that the caller should not do this; the NULL is tolerated
|
||||
* @param signal_stale #MHD_YES if the nonce is invalid to add
|
||||
* 'stale=true' to the authentication header
|
||||
* @return #MHD_YES on success, #MHD_NO otherwise
|
||||
@@ -4290,7 +4290,7 @@ MHD_basic_auth_get_username_password (struct MHD_Connection *connection,
|
||||
*
|
||||
* @param connection The MHD connection structure
|
||||
* @param realm the realm presented to the client
|
||||
* @param response response object to modify and queue
|
||||
* @param response response object to modify and queue; the NULL is tolerated
|
||||
* @return #MHD_YES on success, #MHD_NO otherwise
|
||||
* @ingroup authentication
|
||||
*/
|
||||
|
||||
@@ -109,14 +109,14 @@ MHD_basic_auth_get_username_password (struct MHD_Connection *connection,
|
||||
|
||||
|
||||
/**
|
||||
* Queues a response to request basic authentication from the client.
|
||||
* Queues a response to request basic authentication from the client
|
||||
* The given response object is expected to include the payload for
|
||||
* the response; the "WWW-Authenticate" header will be added and the
|
||||
* response queued with the 'UNAUTHORIZED' status code.
|
||||
*
|
||||
* @param connection The MHD connection structure
|
||||
* @param realm the realm presented to the client
|
||||
* @param response response object to modify and queue
|
||||
* @param response response object to modify and queue; the NULL is tolerated
|
||||
* @return #MHD_YES on success, #MHD_NO otherwise
|
||||
* @ingroup authentication
|
||||
*/
|
||||
@@ -130,6 +130,9 @@ MHD_queue_basic_auth_fail_response (struct MHD_Connection *connection,
|
||||
size_t hlen = strlen (realm) + strlen ("Basic realm=\"\"") + 1;
|
||||
char *header;
|
||||
|
||||
if (NULL == response)
|
||||
return MHD_NO;
|
||||
|
||||
header = (char *) malloc (hlen);
|
||||
if (NULL == header)
|
||||
{
|
||||
|
||||
@@ -5084,8 +5084,8 @@ MHD_set_connection_option (struct MHD_Connection *connection,
|
||||
*
|
||||
* @param connection the connection identifying the client
|
||||
* @param status_code HTTP status code (i.e. #MHD_HTTP_OK)
|
||||
* @param response response to transmit
|
||||
* @return #MHD_NO on error (i.e. reply already sent),
|
||||
* @param response response to transmit, the NULL is tolerated
|
||||
* @return #MHD_NO on error (reply already sent, response is NULL),
|
||||
* #MHD_YES on success or if message has been queued
|
||||
* @ingroup response
|
||||
* @sa #MHD_AccessHandlerCallback
|
||||
|
||||
@@ -1326,11 +1326,12 @@ MHD_digest_auth_check_digest (struct MHD_Connection *connection,
|
||||
* @param opaque string to user for opaque value
|
||||
* @param response reply to send; should contain the "access denied"
|
||||
* body; note that this function will set the "WWW Authenticate"
|
||||
* header and that the caller should not do this
|
||||
* header and that the caller should not do this; the NULL is tolerated
|
||||
* @param signal_stale #MHD_YES if the nonce is invalid to add
|
||||
* 'stale=true' to the authentication header
|
||||
* @param algo digest algorithm to use
|
||||
* @return #MHD_YES on success, #MHD_NO otherwise
|
||||
* @note Available since #MHD_VERSION 0x00096200
|
||||
* @ingroup authentication
|
||||
*/
|
||||
enum MHD_Result
|
||||
@@ -1345,6 +1346,10 @@ MHD_queue_auth_fail_response2 (struct MHD_Connection *connection,
|
||||
int hlen;
|
||||
SETUP_DA (algo, da);
|
||||
|
||||
if (NULL == response)
|
||||
return MHD_NO;
|
||||
|
||||
if (1)
|
||||
{
|
||||
char nonce[NONCE_STD_LEN (VLA_ARRAY_LEN_DIGEST (da.digest_size)) + 1];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user