From 9af807a5ce199adfb7372abd2a490d4af1179725 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Sun, 22 Jul 2007 10:17:52 +0000 Subject: HTTP Digest auth fix on a re-used connection --- lib/http_digest.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/http_digest.c b/lib/http_digest.c index 604655f04..7338ce72a 100644 --- a/lib/http_digest.c +++ b/lib/http_digest.c @@ -266,6 +266,11 @@ CURLcode Curl_output_digest(struct connectdata *conn, authp = &data->state.authhost; } + if (*allocuserpwd) { + Curl_safefree(*allocuserpwd); + *allocuserpwd = NULL; + } + /* not set means empty */ if(!userp) userp=(char *)""; @@ -388,8 +393,6 @@ CURLcode Curl_output_digest(struct connectdata *conn, nonce="1053604145", uri="/64", response="c55f7f30d83d774a3d2dcacf725abaca" */ - Curl_safefree(*allocuserpwd); - if (d->qop) { *allocuserpwd = aprintf( "%sAuthorization: Digest " -- cgit v1.2.3