summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKunal Mehta <legoktm@debian.org>2021-10-28 12:09:31 -0700
committerLegoktm <legoktm@debian.org>2021-10-28 19:12:23 +0000
commit2c7d643a5fa67c005e3dd1f015526bf21942ae9d (patch)
tree5db31e67091061e798d55d841dd70cf0857b2419
parentffb7199902bd11482fa8927628688bc1ebf0a020 (diff)
Hack: Temporarily log headers in MultiHttpClientwmf/1.38.0-wmf.5
Change-Id: I6e695f357f92ce8d40b54ea39002fb7858f5596e
-rw-r--r--includes/libs/http/MultiHttpClient.php15
1 files changed, 9 insertions, 6 deletions
diff --git a/includes/libs/http/MultiHttpClient.php b/includes/libs/http/MultiHttpClient.php
index 3910ad2050e7..c6e7b6b95ae2 100644
--- a/includes/libs/http/MultiHttpClient.php
+++ b/includes/libs/http/MultiHttpClient.php
@@ -596,12 +596,6 @@ class MultiHttpClient implements LoggerAwareInterface {
} elseif ( !isset( $req['url'] ) ) {
throw new Exception( "Request has no 'url' field set." );
}
- $this->logger->debug( "HTTP start: {method} {url}",
- [
- 'method' => $req['method'],
- 'url' => $req['url'],
- ]
- );
$req['query'] = $req['query'] ?? [];
$headers = []; // normalized headers
if ( isset( $req['headers'] ) ) {
@@ -614,6 +608,15 @@ class MultiHttpClient implements LoggerAwareInterface {
$req['body'] = '';
$req['headers']['content-length'] = 0;
}
+ $tmpHeaders = $req['headers'];
+ unset( $tmpHeaders['x-auth-token'] );
+ $this->logger->debug( "HTTP start: {method} {url}",
+ [
+ 'method' => $req['method'],
+ 'url' => $req['url'],
+ 'headers' => $tmpHeaders,
+ ]
+ );
$req['flags'] = $req['flags'] ?? [];
}
}