@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Disable automatic decoding of "Content-Encoding" responses during "Accept-Encoding" setup test

Summary:
Ref T13507. Now that we handle processing of "Content-Encoding: gzip" headers by default, this setup check can get a decompressed body back. Since it specifically wants a raw body back, disable this behavior.

Also, "@" a couple things which can get in the way if they fail now that error handling is more aggressive about throwing on warnings.

Test Plan: Ran setup check after other changes in T13507, got clean result.

Maniphest Tasks: T13507

Differential Revision: https://secure.phabricator.com/D21122

+3 -2
+3 -2
src/applications/config/check/PhabricatorWebServerSetupCheck.php
··· 45 45 $self_future = id(new HTTPSFuture($base_uri)) 46 46 ->addHeader('X-Phabricator-SelfCheck', 1) 47 47 ->addHeader('Accept-Encoding', 'gzip') 48 + ->setDisableContentDecoding(true) 48 49 ->setHTTPBasicAuthCredentials( 49 50 $expect_user, 50 51 new PhutilOpaqueEnvelope($expect_pass)) ··· 134 135 ->setMessage($message); 135 136 } else { 136 137 if (function_exists('gzdecode')) { 137 - $body = gzdecode($body); 138 + $body = @gzdecode($body); 138 139 } else { 139 140 $body = null; 140 141 } ··· 303 304 } 304 305 305 306 $raw_body = idx($structure, 'raw.base64'); 306 - $raw_body = base64_decode($raw_body); 307 + $raw_body = @base64_decode($raw_body); 307 308 308 309 // The server received the exact compressed bytes we expected it to, so 309 310 // everything is working great.