diff options
Diffstat (limited to 'main/main.c')
-rw-r--r-- | main/main.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/main/main.c b/main/main.c index ef336e03c0..6a792e8bff 100644 --- a/main/main.c +++ b/main/main.c @@ -1767,13 +1767,19 @@ PHPAPI int php_handle_auth_data(const char *auth TSRMLS_DC) 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; } /* }}} */ |