Brotli support
commit1f35f62b8fc0b9b43221906a267fa515b77ed693
authorMisha Shneerson <mshneer@fb.com>
Fri, 18 Mar 2016 19:44:40 +0000 (18 12:44 -0700)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Fri, 18 Mar 2016 20:00:53 +0000 (18 13:00 -0700)
treebd2dbb3bdab0e1f1e25ae84857883702aadf3bf2
parent04b85a2c7ce225c532a1974421b51c1b43fb8d19
Brotli support

Summary:Support for brotli compression.
Until now we have only supported gzip encoding, and now we are adding brotli as
well.
Since only gzip was supported until now, we often made binary decision - we
either do have compression or not. Now we need to consider which type of
compression is enabled / disabled so this code got a bit more involved.
On top of that, due to what seems to be a bug in FF, brotli by default is disabled for
chunked responses. However, there is an option to enable it at runtime by
calling:

  ini_set("brotli.chunked_compression", "on");

Reviewed By: markw65

Differential Revision: D3010183

fb-gh-sync-id: 9048064017fd8d2b6064f236f72e73dda8495413
shipit-source-id: 9048064017fd8d2b6064f236f72e73dda8495413
hphp/runtime/base/request-injection-data.cpp
hphp/runtime/base/request-injection-data.h
hphp/runtime/base/runtime-option.cpp
hphp/runtime/base/runtime-option.h
hphp/runtime/server/transport.cpp
hphp/runtime/server/transport.h
hphp/util/brotli.cpp [new file with mode: 0644]
hphp/util/brotli.h [new file with mode: 0644]
hphp/util/test/brotli-test.cpp [new file with mode: 0644]