# Found and Reported by Stefan Esser
{
SG(server_context) = NULL;
SG(request_info).request_method = NULL;
- SG(request_info).auth_user = SG(request_info).auth_password = NULL;
+ SG(request_info).auth_digest = SG(request_info).auth_user = SG(request_info).auth_password = NULL;
SG(request_info).content_type_dup = NULL;
}
if (ret == -1) {
SG(request_info).auth_user = SG(request_info).auth_password = NULL;
+ } else {
+ SG(request_info).auth_digest = NULL;
}
- if (auth && auth[0] != '\0' && strncmp(auth, "Digest ", 7) == 0) {
+ if (ret == -1 && auth && auth[0] != '\0' && strncmp(auth, "Digest ", 7) == 0) {
SG(request_info).auth_digest = estrdup(auth);
ret = 0;
}
+ if (ret == -1) {
+ SG(request_info).auth_digest = NULL;
+ }
+
return ret;
}
/* }}} */