From: Marko Obrovac Date: Fri, 1 Feb 2019 23:48:08 +0000 (-0800) Subject: MWHttpRequest: Include the request ID in outgoing HTTP requests X-Git-Tag: 1.34.0-rc.0~2897 X-Git-Url: http://git.cyclocoop.org/data/%24oldEdit?a=commitdiff_plain;h=9fd7fe0d3cae4b3f0a264a030e9ab7021ef49464;p=lhc%2Fweb%2Fwiklou.git 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 --- diff --git a/includes/http/MWHttpRequest.php b/includes/http/MWHttpRequest.php index 065667d165..b4ac9a750e 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" ];