mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 02:02:41 +01:00
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
This commit is contained in:
parent
ba835fe0ec
commit
d4af32c1d4
1 changed files with 1 additions and 0 deletions
|
@ -58,6 +58,7 @@ final class PhabricatorWebServerSetupCheck extends PhabricatorSetupCheck {
|
||||||
$gzip_future = id(new HTTPSFuture($base_uri))
|
$gzip_future = id(new HTTPSFuture($base_uri))
|
||||||
->addHeader('X-Setup-SelfCheck', 1)
|
->addHeader('X-Setup-SelfCheck', 1)
|
||||||
->addHeader('Content-Encoding', 'gzip')
|
->addHeader('Content-Encoding', 'gzip')
|
||||||
|
->setMethod('POST')
|
||||||
->setTimeout(5)
|
->setTimeout(5)
|
||||||
->setData($gzip_compressed);
|
->setData($gzip_compressed);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue