From d4af32c1d4120a5804e3d8c4b9d9c37476aa272e Mon Sep 17 00:00:00 2001 From: Katie Date: Mon, 1 Apr 2024 20:39:23 +0300 Subject: [PATCH] Fix setup check for gzip request mangling being sent as GET Summary: Certain web servers (or cache layers such as Varnish) strip the body of GET requests, resulting in the setup check failing when it would otherwise function normally if a request is sent as POST. Test Plan: Phorge will no-longer mark the test as failing due to the body of a GET request being dropped. As per RFC7231, certain implementations of HTTP/1.1 may reject the request or drop the payload due to a previous revision of the spec where the body was supposed to be ignored (RFC2616, section 4.3) Reviewers: O1 Blessed Committers, 20after4, speck, avivey Reviewed By: O1 Blessed Committers, 20after4, speck, avivey Subscribers: speck, 20after4, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno Differential Revision: https://we.phorge.it/D25566 --- src/applications/config/check/PhabricatorWebServerSetupCheck.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/applications/config/check/PhabricatorWebServerSetupCheck.php b/src/applications/config/check/PhabricatorWebServerSetupCheck.php index d46f808f58..1bbe3a3f2c 100644 --- a/src/applications/config/check/PhabricatorWebServerSetupCheck.php +++ b/src/applications/config/check/PhabricatorWebServerSetupCheck.php @@ -58,6 +58,7 @@ final class PhabricatorWebServerSetupCheck extends PhabricatorSetupCheck { $gzip_future = id(new HTTPSFuture($base_uri)) ->addHeader('X-Setup-SelfCheck', 1) ->addHeader('Content-Encoding', 'gzip') + ->setMethod('POST') ->setTimeout(5) ->setData($gzip_compressed);