[HttpClient] fix support for NTLM auth
This commit is contained in:
parent
62bf1f5002
commit
370c4379a5
@ -412,7 +412,9 @@ final class CurlResponse implements ResponseInterface
|
||||
}
|
||||
}
|
||||
|
||||
if ($statusCode < 300 || 400 <= $statusCode || null === $location || curl_getinfo($ch, CURLINFO_REDIRECT_COUNT) === $options['max_redirects']) {
|
||||
if (401 === $statusCode && isset($options['auth_ntlm']) && 0 === strncasecmp($headers['www-authenticate'][0] ?? '', 'NTLM ', 5)) {
|
||||
// Continue with NTLM auth
|
||||
} elseif ($statusCode < 300 || 400 <= $statusCode || null === $location || curl_getinfo($ch, CURLINFO_REDIRECT_COUNT) === $options['max_redirects']) {
|
||||
// Headers and redirects completed, time to get the response's content
|
||||
$multi->handlesActivity[$id][] = new FirstChunk();
|
||||
|
||||
|
Reference in New Issue
Block a user