Skip to content

Commit 83cee1e

Browse files
Merge branch '4.4'
* 4.4: conflict with FrameworkBundle < 4.4 [DoctrineBridge] Reopen DoctrineDataCollector to extensibility [HttpClient] fix support for NTLM auth
2 parents 2998596 + 8d7f4dd commit 83cee1e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Response/CurlResponse.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,9 @@ private static function parseHeaderLine($ch, string $data, array &$info, array &
412412
}
413413
}
414414

415-
if ($statusCode < 300 || 400 <= $statusCode || null === $location || curl_getinfo($ch, CURLINFO_REDIRECT_COUNT) === $options['max_redirects']) {
415+
if (401 === $statusCode && isset($options['auth_ntlm']) && 0 === strncasecmp($headers['www-authenticate'][0] ?? '', 'NTLM ', 5)) {
416+
// Continue with NTLM auth
417+
} elseif ($statusCode < 300 || 400 <= $statusCode || null === $location || curl_getinfo($ch, CURLINFO_REDIRECT_COUNT) === $options['max_redirects']) {
416418
// Headers and redirects completed, time to get the response's content
417419
$multi->handlesActivity[$id][] = new FirstChunk();
418420

0 commit comments

Comments
 (0)