Make websocket compression disabled by default, since it causes problems in Chrome.

Change the command line option to --enable-permessage-deflate to override. #619
This commit is contained in:
Eric Frias 2016-03-14 18:27:28 -04:00
parent 403d3001f6
commit 36164263f4
2 changed files with 5 additions and 5 deletions

View file

@ -180,7 +180,7 @@ namespace detail {
if( !_options->count("rpc-endpoint") )
return;
bool enable_deflate_compression = _options->count("disable-permessage-deflate") == 0;
bool enable_deflate_compression = _options->count("enable-permessage-deflate") != 0;
_websocket_server = std::make_shared<fc::http::websocket_server>(enable_deflate_compression);
@ -209,7 +209,7 @@ namespace detail {
}
string password = _options->count("server-pem-password") ? _options->at("server-pem-password").as<string>() : "";
bool enable_deflate_compression = _options->count("disable-permessage-deflate") == 0;
bool enable_deflate_compression = _options->count("enable-permessage-deflate") != 0;
_websocket_tls_server = std::make_shared<fc::http::websocket_tls_server>( _options->at("server-pem").as<string>(), password, enable_deflate_compression );
_websocket_tls_server->on_connection([&]( const fc::http::websocket_connection_ptr& c ){
@ -903,8 +903,8 @@ void application::set_program_options(boost::program_options::options_descriptio
("checkpoint,c", bpo::value<vector<string>>()->composing(), "Pairs of [BLOCK_NUM,BLOCK_ID] that should be enforced as checkpoints.")
("rpc-endpoint", bpo::value<string>()->implicit_value("127.0.0.1:8090"), "Endpoint for websocket RPC to listen on")
("rpc-tls-endpoint", bpo::value<string>()->implicit_value("127.0.0.1:8089"), "Endpoint for TLS websocket RPC to listen on")
("disable-permessage-deflate", "Disable support for per-message deflate compression in the websocket servers "
"(--rpc-endpoint and --rpc-tls-endpoint), enabled by default")
("enable-permessage-deflate", "Enable support for per-message deflate compression in the websocket servers "
"(--rpc-endpoint and --rpc-tls-endpoint), disabled by default")
("server-pem,p", bpo::value<string>()->implicit_value("server.pem"), "The TLS certificate file for this server")
("server-pem-password,P", bpo::value<string>()->implicit_value(""), "Password for this certificate")
("genesis-json", bpo::value<boost::filesystem::path>(), "File to read Genesis State from")

@ -1 +1 @@
Subproject commit 21045dde5faa8fcf5f43b97c85f9df210317633b
Subproject commit 622ff58039f2388433272a44fe416f5b8025589a