aboutsummaryrefslogtreecommitdiffstats
path: root/includes/http/MWHttpRequest.php
diff options
context:
space:
mode:
authorMarko Obrovac <mobrovac@wikimedia.org>2019-02-01 15:48:08 -0800
committerMobrovac <mobrovac@wikimedia.org>2019-02-08 19:16:13 +0000
commit9fd7fe0d3cae4b3f0a264a030e9ab7021ef49464 (patch)
tree0352d2f47eb9b1d267057752199f504e43d2060b /includes/http/MWHttpRequest.php
parent20261b36c49258ac23b74dd7f6c3a4f8d1ac2312 (diff)
downloadmediawikicore-9fd7fe0d3cae4b3f0a264a030e9ab7021ef49464.tar.gz
mediawikicore-9fd7fe0d3cae4b3f0a264a030e9ab7021ef49464.zip
MWHttpRequest: Include the request ID in outgoing HTTP requests
In order to be able to trace requests across the production environment, we attach the X-Request-Id to outgoing requests. Bug: T201409 Change-Id: Iadd6cbd51a78a1876a1a318783b51635717d054f
Diffstat (limited to 'includes/http/MWHttpRequest.php')
-rw-r--r--includes/http/MWHttpRequest.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/includes/http/MWHttpRequest.php b/includes/http/MWHttpRequest.php
index 065667d16580..b4ac9a750ef1 100644
--- a/includes/http/MWHttpRequest.php
+++ b/includes/http/MWHttpRequest.php
@@ -129,6 +129,8 @@ abstract class MWHttpRequest implements LoggerAwareInterface {
$this->setOriginalRequest( $options['originalRequest'] );
}
+ $this->setHeader( 'X-Request-Id', WebRequest::getRequestId() );
+
$members = [ "postData", "proxy", "noProxy", "sslVerifyHost", "caInfo",
"method", "followRedirects", "maxRedirects", "sslVerifyCert", "callback" ];