HTTP Digest auth fix on a re-used connection

This commit is contained in:
Daniel Stenberg 2007-07-22 10:17:52 +00:00
parent 4bbcc47f3f
commit 9af807a5ce
3 changed files with 83 additions and 3 deletions

View file

@ -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 "