1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00
phorge-phorge/src
epriestley 067b04aaf1 If HTTP response headers are already sent, don't fiddle with "zlib.output_compression"
Summary:
We write some synthetic HTTP responses inside unit tests. Some responses have an indirect side effect of adjusting "zlib.output_compression", but this adjustment fails if headers have already been output. From a CLI context, headers appear to count as already-output after we write anything to stdout:

```
<?php

echo headers_sent() ? "Y" : "N";
echo "\n";
echo headers_sent() ? "Y" : "N";
echo "\n";
```

This script prints "N", then "Y".

Recently, the default severity of warnings was increased in libphutil; this has been a long-standing warning but now causes test failures.

This behavior is sort of silly but the whole thing is kind of moot anyway. Just skip it if "headers_sent()" is true.

Test Plan: Ran "arc unit --everything", got clean results.

Differential Revision: https://secure.phabricator.com/D21055
2020-04-03 12:24:58 -07:00
..
__tests__ Use PhutilClassMapQuery instead of PhutilSymbolLoader 2015-08-14 07:49:01 +10:00
aphront If HTTP response headers are already sent, don't fiddle with "zlib.output_compression" 2020-04-03 12:24:58 -07:00
applications According to Jira Project keys must start with an uppercase letter, followed by one or more uppercase alphanumeric characters 2020-03-09 22:04:23 +02:00
docs Remove "PhabricatorEventType::TYPE_DIFFUSION_LOOKUPUSER" event 2019-11-19 09:38:03 -08:00
extensions
infrastructure Make AuthProvider, ExternalAccount, and ExternalAccountIdentifier all Destructible 2020-02-22 17:46:29 -08:00
view Merge a small amount of remaining "libphutil/" code with Phabricator, break libphutil dependency 2020-02-12 15:17:36 -08:00
__phutil_library_init__.php
__phutil_library_map__.php Make AuthProvider, ExternalAccount, and ExternalAccountIdentifier all Destructible 2020-02-22 17:46:29 -08:00