From 9fd7fe0d3cae4b3f0a264a030e9ab7021ef49464 Mon Sep 17 00:00:00 2001 From: Marko Obrovac Date: Fri, 1 Feb 2019 15:48:08 -0800 Subject: [PATCH] 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 --- includes/http/MWHttpRequest.php | 2 ++ 1 file changed, 2 insertions(+) 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" ]; -- 2.20.1