From 8ec16ffa169d3ef6c98828d7330a3e712a7671f4 Mon Sep 17 00:00:00 2001 From: Kevin Porras Date: Tue, 14 Feb 2023 14:06:26 -0600 Subject: [PATCH] Issue #3261858 by DamienMcKenna, heddn: The path of a URI with an authority must start with a slash "/" or be empty. Automagically fixing the URI. (#164) Co-authored-by: Lucas Hedding <24691-lucashedding@users.noreply.drupalcode.org> --- src/Services/PantheonGuzzle.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Services/PantheonGuzzle.php b/src/Services/PantheonGuzzle.php index 6743c314..3ce43567 100644 --- a/src/Services/PantheonGuzzle.php +++ b/src/Services/PantheonGuzzle.php @@ -166,7 +166,7 @@ public function requestUriAlterForPantheonEnvironment(RequestInterface $request) $path_parts = array_filter($path_parts, function ($item) { return !empty($item); }); - $uri = $uri->withPath(implode('/', $path_parts)); + $uri = $uri->withPath('/' . ltrim(implode('/', $path_parts), '/')); return $request->withUri($uri); }