Skip to content

Commit

Permalink
comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gggeek committed Nov 28, 2022
1 parent ebb46ba commit 78e6d2c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Helper/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ public function parseResponseHeaders(&$data, $headersProcessed = false, $debug =
// When using Curl to query servers using Digest Auth, we get back a double set of http headers.
// Same when following redirects
// We strip out the 1st...
/// @todo we should let the caller know that there was a redirect involved
if ($headersProcessed && preg_match('/^HTTP\/[0-9](?:\.[0-9])? (?:401|30[1278]) /', $data)) {
if (preg_match('/(\r?\n){2}HTTP\/[0-9](?:\.[0-9])? 200 /', $data)) {
$data = preg_replace('/^HTTP\/[0-9](?:\.[0-9])? (?:401|30[1278]) .+?(?:\r?\n){2}(HTTP\/[0-9.]+ 200 )/s', '$1', $data, 1);
Expand Down

0 comments on commit 78e6d2c

Please sign in to comment.