When we issue a HTTP request, first make sure if the authentication phase

is over or not, as if it isn't we shall not begin any PUT or POST operation.

This cures bug report #805853, and test case 88 verifies it!
This commit is contained in:
Daniel Stenberg
2003-09-15 21:11:22 +00:00
parent c611ac958e
commit 58b1437cae
3 changed files with 38 additions and 9 deletions

View File

@@ -277,7 +277,8 @@ static void mkhash(char *password,
/* this is for creating ntlm header output */
CURLcode Curl_output_ntlm(struct connectdata *conn,
bool proxy)
bool proxy,
bool *ready)
{
const char *domain=""; /* empty */
const char *host=""; /* empty */
@@ -299,6 +300,8 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
/* point to the correct struct with this */
struct ntlmdata *ntlm;
*ready = FALSE;
if(proxy) {
allocuserpwd = &conn->allocptr.proxyuserpwd;
userp = conn->proxyuser;
@@ -556,6 +559,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
return CURLE_OUT_OF_MEMORY; /* FIX TODO */
ntlm->state = NTLMSTATE_TYPE3; /* we sent a type-3 */
*ready = TRUE;
/* Switch to web authentication after proxy authentication is done */
if (proxy)
@@ -570,6 +574,7 @@ CURLcode Curl_output_ntlm(struct connectdata *conn,
free(*allocuserpwd);
*allocuserpwd=NULL;
}
*ready = TRUE;
break;
}