mirror of
https://github.com/curl/curl.git
synced 2026-08-26 09:53:32 +03:00
If a HTTP request is Basic and num is already >=1000, the HTTP test server
adds 1 to num to get the data section to return. This allows testing authentication negotiations using the Basic authentication method.
This commit is contained in:
parent
3b0c5ae467
commit
640974fb28
2 changed files with 14 additions and 0 deletions
|
|
@ -442,6 +442,13 @@ static int ProcessRequest(struct httprequest *req)
|
|||
req->ntlm = TRUE; /* NTLM found */
|
||||
logmsg("Received NTLM type-1, sending back data %ld", req->partno);
|
||||
}
|
||||
else if((req->partno >= 1000) && strstr(req->reqbuf, "Authorization: Basic")) {
|
||||
/* If the client is passing this Basic-header and the part number is already
|
||||
>=1000, we add 1 to the part number. This allows simple Basic authentication
|
||||
negotiation to work in the test suite. */
|
||||
req->partno += 1;
|
||||
logmsg("Received Basic request, sending back data %ld", req->partno);
|
||||
}
|
||||
if(strstr(req->reqbuf, "Connection: close"))
|
||||
req->open = FALSE; /* close connection after this request */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue