Page MenuHomePhabricator

Fix an issue where unexpected debugging output would run afoul of automatic compression
ClosedPublic

Authored by epriestley on Dec 14 2016, 1:43 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 13, 7:44 PM
Unknown Object (File)
Wed, Dec 11, 5:55 PM
Unknown Object (File)
Sun, Dec 8, 2:25 AM
Unknown Object (File)
Nov 6 2024, 4:33 PM
Unknown Object (File)
Oct 20 2024, 7:50 AM
Unknown Object (File)
Oct 15 2024, 2:05 AM
Unknown Object (File)
Sep 21 2024, 7:39 AM
Unknown Object (File)
Sep 2 2024, 9:17 PM
Subscribers
None

Details

Summary

If you put "echo" or "print" statements into the code at random places (as I frequently do during development), they would emit before we enabled compression.

This would confuse the compression mechanism and browser. I tried using headers_sent() to selectively disable compression but that didn't appear to fix this interaction (I think emitting this text does not cause headers to send, but does let contet escape into some buffer which the compressor can not access).

Instead, push the header down a little bit so it renders after we activate compression.

Also make it slightly fancier / more hideous. WOW.

Test Plan

Screen Shot 2016-12-14 at 5.42.57 AM.png (989×1 px, 115 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Fix an issue where unexpected debugging output would run afoul of automatic compression.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.
chad edited edge metadata.
This revision is now accepted and ready to land.Dec 14 2016, 3:06 PM
This revision was automatically updated to reflect the committed changes.