diff options
Diffstat (limited to 'libsoup/soup-auth-digest.c')
-rw-r--r-- | libsoup/soup-auth-digest.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/libsoup/soup-auth-digest.c b/libsoup/soup-auth-digest.c index 5fe75610..1fbb639d 100644 --- a/libsoup/soup-auth-digest.c +++ b/libsoup/soup-auth-digest.c @@ -15,6 +15,10 @@ #include "soup.h" #include "soup-message-private.h" +#ifdef G_OS_WIN32 +#include <process.h> +#endif + typedef struct { char *user; char hex_urp[33]; @@ -36,6 +40,17 @@ typedef struct { static void recompute_hex_a1 (SoupAuthDigestPrivate *priv); +/** + * SOUP_TYPE_AUTH_DIGEST: + * + * A #GType corresponding to HTTP "Digest" authentication. + * #SoupSessions support this by default; if you want to disable + * support for it, call soup_session_remove_feature_by_type(), + * passing %SOUP_TYPE_AUTH_DIGEST. + * + * Since: 2.34 + */ + G_DEFINE_TYPE (SoupAuthDigest, soup_auth_digest, SOUP_TYPE_AUTH) static void @@ -278,6 +293,9 @@ soup_auth_digest_authenticate (SoupAuth *auth, const char *username, SoupAuthDigestPrivate *priv = SOUP_AUTH_DIGEST_GET_PRIVATE (auth); char *bgen; + g_clear_pointer (&priv->cnonce, g_free); + g_clear_pointer (&priv->user, g_free); + /* Create client nonce */ bgen = g_strdup_printf ("%p:%lu:%lu", auth, |