| 1 |
|
| #include "websocket.h" |
| 2 |
|
| |
| 3 |
|
| namespace xs { namespace protocol { namespace websocket { |
| 4 |
|
| |
| 5 |
0 |
| void av_to_header_values (const Array& av, HeaderValues* vals) { |
| 6 |
0 |
▶ | if (!av.size()) return; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!av.size()) return; |
0 |
0 |
0 |
|
| 7 |
0 |
| vals->reserve(av.size()); |
| 8 |
0 |
▶ | for (const auto& sv : av) { |
Branch: 3 branches
| Branch | True | False | Total |
| for (const auto& sv : av) { |
0 |
0 |
0 |
| for (const auto& sv : av) { |
0 |
0 |
0 |
| for (const auto& sv : av) { |
0 |
0 |
0 |
|
| 9 |
0 |
▶ | const Array subav(sv); |
Branch: 1 branch
| Branch | True | False | Total |
| const Array subav(sv); |
0 |
0 |
0 |
|
| 10 |
0 |
▶ | if (!subav) continue; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!subav) continue; |
0 |
0 |
0 |
|
| 11 |
0 |
▶ | auto namesv = subav.fetch(0); |
Branch: 1 branch
| Branch | True | False | Total |
| auto namesv = subav.fetch(0); |
0 |
0 |
0 |
|
| 12 |
0 |
▶ | if (!namesv) continue; |
Branch: 1 branch
| Branch | True | False | Total |
| if (!namesv) continue; |
0 |
0 |
0 |
|
| 13 |
0 |
| HeaderValue elem; |
| 14 |
0 |
▶ | elem.name = xs::in<string>(namesv); |
Branch: 2 branches
| Branch | True | False | Total |
| elem.name = xs::in<string>(namesv); |
0 |
0 |
0 |
| elem.name = xs::in<string>(namesv); |
0 |
0 |
0 |
|
| 15 |
0 |
▶ | Hash args = subav.fetch(1); |
Branch: 2 branches
| Branch | True | False | Total |
| Hash args = subav.fetch(1); |
0 |
0 |
0 |
| Hash args = subav.fetch(1); |
0 |
0 |
0 |
|
| 16 |
0 |
▶ | if (args) for (const auto& row : args) elem.params.emplace(string(row.key()), xs::in<string>(row.value())); |
Branch: 8 branches
| Branch | True | False | Total |
| if (args) for (const auto& row : args) elem.params.emplace(string(row.key()), xs::in<string>(row.value())); |
0 |
0 |
0 |
| if (args) for (const auto& row : args) elem.params.emplace(string(row.key()), xs::in<string>(row.value())); |
0 |
0 |
0 |
| if (args) for (const auto& row : args) elem.params.emplace(string(row.key()), xs::in<string>(row.value())); |
0 |
0 |
0 |
| if (args) for (const auto& row : args) elem.params.emplace(string(row.key()), xs::in<string>(row.value())); |
0 |
0 |
0 |
| if (args) for (const auto& row : args) elem.params.emplace(string(row.key()), xs::in<string>(row.value())); |
0 |
0 |
0 |
| if (args) for (const auto& row : args) elem.params.emplace(string(row.key()), xs::in<string>(row.value())); |
0 |
0 |
0 |
| if (args) for (const auto& row : args) elem.params.emplace(string(row.key()), xs::in<string>(row.value())); |
0 |
0 |
0 |
| if (args) for (const auto& row : args) elem.params.emplace(string(row.key()), xs::in<string>(row.value())); |
0 |
0 |
0 |
|
| 17 |
0 |
▶ | vals->push_back(std::move(elem)); |
Branch: 1 branch
| Branch | True | False | Total |
| vals->push_back(std::move(elem)); |
0 |
0 |
0 |
|
| 18 |
0 |
▶ | } |
Branch: 2 branches
| Branch | True | False | Total |
| } |
0 |
0 |
0 |
| } |
0 |
0 |
0 |
|
| 19 |
|
| } |
| 20 |
|
| |
| 21 |
0 |
| Array header_values_to_av (const HeaderValues& vals) { |
| 22 |
0 |
▶ | if (!vals.size()) return Array(); |
Branch: 1 branch
| Branch | True | False | Total |
| if (!vals.size()) return Array(); |
0 |
0 |
0 |
|
| 23 |
0 |
▶ | auto ret = Array::create(vals.size()); |
Branch: 1 branch
| Branch | True | False | Total |
| auto ret = Array::create(vals.size()); |
0 |
0 |
0 |
|
| 24 |
0 |
▶ | for (const auto& elem : vals) { |
Branch: 1 branch
| Branch | True | False | Total |
| for (const auto& elem : vals) { |
0 |
0 |
0 |
|
| 25 |
0 |
▶ | auto elemav = Array::create(2); |
Branch: 1 branch
| Branch | True | False | Total |
| auto elemav = Array::create(2); |
0 |
0 |
0 |
|
| 26 |
0 |
▶ | elemav.push(xs::out(elem.name)); |
Branch: 2 branches
| Branch | True | False | Total |
| elemav.push(xs::out(elem.name)); |
0 |
0 |
0 |
| elemav.push(xs::out(elem.name)); |
0 |
0 |
0 |
|
| 27 |
0 |
▶ | if (elem.params.size()) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (elem.params.size()) { |
0 |
0 |
0 |
|
| 28 |
0 |
▶ | auto args = Hash::create(elem.params.size()); |
Branch: 1 branch
| Branch | True | False | Total |
| auto args = Hash::create(elem.params.size()); |
0 |
0 |
0 |
|
| 29 |
0 |
▶ | for (const auto& param : elem.params) { |
Branch: 1 branch
| Branch | True | False | Total |
| for (const auto& param : elem.params) { |
0 |
0 |
0 |
|
| 30 |
0 |
▶ | args.store(param.first, xs::out(param.second)); |
Branch: 2 branches
| Branch | True | False | Total |
| args.store(param.first, xs::out(param.second)); |
0 |
0 |
0 |
| args.store(param.first, xs::out(param.second)); |
0 |
0 |
0 |
|
| 31 |
|
| } |
| 32 |
0 |
▶ | elemav.push(Ref::create(args)); |
Branch: 2 branches
| Branch | True | False | Total |
| elemav.push(Ref::create(args)); |
0 |
0 |
0 |
| elemav.push(Ref::create(args)); |
0 |
0 |
0 |
|
| 33 |
0 |
| } |
| 34 |
0 |
▶ | ret.push(Ref::create(elemav)); |
Branch: 2 branches
| Branch | True | False | Total |
| ret.push(Ref::create(elemav)); |
0 |
0 |
0 |
| ret.push(Ref::create(elemav)); |
0 |
0 |
0 |
|
| 35 |
0 |
| } |
| 36 |
0 |
| return ret; |
| 37 |
0 |
| } |
| 38 |
|
| |
| 39 |
0 |
| ConnectRequestSP make_request (const Hash& params, const ConnectRequestSP& dest) { |
| 40 |
0 |
▶ | auto ret = dest ? dest : ConnectRequestSP(new ConnectRequest()); |
Branch: 5 branches
| Branch | True | False | Total |
| auto ret = dest ? dest : ConnectRequestSP(new ConnectRequest()); |
0 |
0 |
0 |
| auto ret = dest ? dest : ConnectRequestSP(new ConnectRequest()); |
0 |
0 |
0 |
| auto ret = dest ? dest : ConnectRequestSP(new ConnectRequest()); |
0 |
0 |
0 |
| auto ret = dest ? dest : ConnectRequestSP(new ConnectRequest()); |
0 |
0 |
0 |
| auto ret = dest ? dest : ConnectRequestSP(new ConnectRequest()); |
0 |
0 |
0 |
|
| 41 |
0 |
▶ | http::fill(ret, params); |
Branch: 1 branch
| Branch | True | False | Total |
| http::fill(ret, params); |
0 |
0 |
0 |
|
| 42 |
|
| |
| 43 |
0 |
| Scalar val; |
| 44 |
|
| |
| 45 |
0 |
▶ | if ((val = params.fetch("ws_key"))) ret->ws_key(xs::in<string>(val)); |
Branch: 4 branches
| Branch | True | False | Total |
| if ((val = params.fetch("ws_key"))) ret->ws_key(xs::in<string>(val)); |
0 |
0 |
0 |
| if ((val = params.fetch("ws_key"))) ret->ws_key(xs::in<string>(val)); |
0 |
0 |
0 |
| if ((val = params.fetch("ws_key"))) ret->ws_key(xs::in<string>(val)); |
0 |
0 |
0 |
| if ((val = params.fetch("ws_key"))) ret->ws_key(xs::in<string>(val)); |
0 |
0 |
0 |
|
| 46 |
0 |
▶ | if ((val = params.fetch("ws_version"))) ret->ws_version(SvIV(val)); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = params.fetch("ws_version"))) ret->ws_version(SvIV(val)); |
0 |
0 |
0 |
| if ((val = params.fetch("ws_version"))) ret->ws_version(SvIV(val)); |
0 |
0 |
0 |
| if ((val = params.fetch("ws_version"))) ret->ws_version(SvIV(val)); |
0 |
0 |
0 |
|
| 47 |
0 |
▶ | if ((val = params.fetch("ws_protocol"))) ret->ws_protocol(xs::in<string>(val)); |
Branch: 4 branches
| Branch | True | False | Total |
| if ((val = params.fetch("ws_protocol"))) ret->ws_protocol(xs::in<string>(val)); |
0 |
0 |
0 |
| if ((val = params.fetch("ws_protocol"))) ret->ws_protocol(xs::in<string>(val)); |
0 |
0 |
0 |
| if ((val = params.fetch("ws_protocol"))) ret->ws_protocol(xs::in<string>(val)); |
0 |
0 |
0 |
| if ((val = params.fetch("ws_protocol"))) ret->ws_protocol(xs::in<string>(val)); |
0 |
0 |
0 |
|
| 48 |
|
| |
| 49 |
0 |
▶ | if ((val = params.fetch("ws_extensions"))) { |
Branch: 2 branches
| Branch | True | False | Total |
| if ((val = params.fetch("ws_extensions"))) { |
0 |
0 |
0 |
| if ((val = params.fetch("ws_extensions"))) { |
0 |
0 |
0 |
|
| 50 |
0 |
▶ | auto exts_av = xs::in<Array>(val); |
Branch: 1 branch
| Branch | True | False | Total |
| auto exts_av = xs::in<Array>(val); |
0 |
0 |
0 |
|
| 51 |
0 |
| HeaderValues exts; |
| 52 |
0 |
▶ | if (exts_av) av_to_header_values(exts_av, &exts); |
Branch: 2 branches
| Branch | True | False | Total |
| if (exts_av) av_to_header_values(exts_av, &exts); |
0 |
0 |
0 |
| if (exts_av) av_to_header_values(exts_av, &exts); |
0 |
0 |
0 |
|
| 53 |
0 |
▶ | ret->ws_extensions(exts); |
Branch: 1 branch
| Branch | True | False | Total |
| ret->ws_extensions(exts); |
0 |
0 |
0 |
|
| 54 |
0 |
| } |
| 55 |
0 |
| return ret; |
| 56 |
0 |
| } |
| 57 |
|
| |
| 58 |
0 |
| ConnectResponseSP make_response (const Hash& params, const ConnectResponseSP& dest) { |
| 59 |
0 |
▶ | auto ret = dest ? dest : ConnectResponseSP(new ConnectResponse()); |
Branch: 5 branches
| Branch | True | False | Total |
| auto ret = dest ? dest : ConnectResponseSP(new ConnectResponse()); |
0 |
0 |
0 |
| auto ret = dest ? dest : ConnectResponseSP(new ConnectResponse()); |
0 |
0 |
0 |
| auto ret = dest ? dest : ConnectResponseSP(new ConnectResponse()); |
0 |
0 |
0 |
| auto ret = dest ? dest : ConnectResponseSP(new ConnectResponse()); |
0 |
0 |
0 |
| auto ret = dest ? dest : ConnectResponseSP(new ConnectResponse()); |
0 |
0 |
0 |
|
| 60 |
0 |
▶ | http::fill(ret, params); |
Branch: 1 branch
| Branch | True | False | Total |
| http::fill(ret, params); |
0 |
0 |
0 |
|
| 61 |
|
| |
| 62 |
0 |
| Scalar val; |
| 63 |
|
| |
| 64 |
0 |
▶ | if ((val = params.fetch("ws_extensions"))) { |
Branch: 2 branches
| Branch | True | False | Total |
| if ((val = params.fetch("ws_extensions"))) { |
0 |
0 |
0 |
| if ((val = params.fetch("ws_extensions"))) { |
0 |
0 |
0 |
|
| 65 |
0 |
| HeaderValues exts; |
| 66 |
0 |
▶ | av_to_header_values(xs::in<Array>(val), &exts); |
Branch: 2 branches
| Branch | True | False | Total |
| av_to_header_values(xs::in<Array>(val), &exts); |
0 |
0 |
0 |
| av_to_header_values(xs::in<Array>(val), &exts); |
0 |
0 |
0 |
|
| 67 |
0 |
▶ | ret->ws_extensions(exts); |
Branch: 1 branch
| Branch | True | False | Total |
| ret->ws_extensions(exts); |
0 |
0 |
0 |
|
| 68 |
0 |
| } |
| 69 |
|
| |
| 70 |
0 |
▶ | if ((val = params.fetch("ws_protocol"))) ret->ws_protocol(xs::in<string>(val)); |
Branch: 4 branches
| Branch | True | False | Total |
| if ((val = params.fetch("ws_protocol"))) ret->ws_protocol(xs::in<string>(val)); |
0 |
0 |
0 |
| if ((val = params.fetch("ws_protocol"))) ret->ws_protocol(xs::in<string>(val)); |
0 |
0 |
0 |
| if ((val = params.fetch("ws_protocol"))) ret->ws_protocol(xs::in<string>(val)); |
0 |
0 |
0 |
| if ((val = params.fetch("ws_protocol"))) ret->ws_protocol(xs::in<string>(val)); |
0 |
0 |
0 |
|
| 71 |
|
| |
| 72 |
0 |
| return ret; |
| 73 |
0 |
| } |
| 74 |
|
| |
| 75 |
0 |
| void parser_config_in (Parser::Config& cfg, const Hash& h) { |
| 76 |
0 |
| Scalar val; |
| 77 |
0 |
▶ | if ((val = h.fetch("max_frame_size"))) cfg.max_frame_size = val.number(); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("max_frame_size"))) cfg.max_frame_size = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("max_frame_size"))) cfg.max_frame_size = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("max_frame_size"))) cfg.max_frame_size = val.number(); |
0 |
0 |
0 |
|
| 78 |
0 |
▶ | if ((val = h.fetch("max_message_size"))) cfg.max_message_size = val.number(); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("max_message_size"))) cfg.max_message_size = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("max_message_size"))) cfg.max_message_size = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("max_message_size"))) cfg.max_message_size = val.number(); |
0 |
0 |
0 |
|
| 79 |
0 |
▶ | if ((val = h.fetch("max_handshake_size"))) cfg.max_handshake_size = val.number(); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("max_handshake_size"))) cfg.max_handshake_size = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("max_handshake_size"))) cfg.max_handshake_size = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("max_handshake_size"))) cfg.max_handshake_size = val.number(); |
0 |
0 |
0 |
|
| 80 |
0 |
▶ | if ((val = h.fetch("check_utf8"))) cfg.check_utf8 = val.is_true(); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("check_utf8"))) cfg.check_utf8 = val.is_true(); |
0 |
0 |
0 |
| if ((val = h.fetch("check_utf8"))) cfg.check_utf8 = val.is_true(); |
0 |
0 |
0 |
| if ((val = h.fetch("check_utf8"))) cfg.check_utf8 = val.is_true(); |
0 |
0 |
0 |
|
| 81 |
|
| |
| 82 |
0 |
▶ | if(h.exists("deflate")) cfg.deflate.reset(); |
Branch: 2 branches
| Branch | True | False | Total |
| if(h.exists("deflate")) cfg.deflate.reset(); |
0 |
0 |
0 |
| if(h.exists("deflate")) cfg.deflate.reset(); |
0 |
0 |
0 |
|
| 83 |
0 |
▶ | Hash deflate_settings = h.fetch("deflate"); |
Branch: 2 branches
| Branch | True | False | Total |
| Hash deflate_settings = h.fetch("deflate"); |
0 |
0 |
0 |
| Hash deflate_settings = h.fetch("deflate"); |
0 |
0 |
0 |
|
| 84 |
0 |
▶ | if (deflate_settings) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (deflate_settings) { |
0 |
0 |
0 |
|
| 85 |
0 |
▶ | auto dcfg = xs::in<panda::protocol::websocket::DeflateExt::Config>(deflate_settings); |
Branch: 1 branch
| Branch | True | False | Total |
| auto dcfg = xs::in<panda::protocol::websocket::DeflateExt::Config>(deflate_settings); |
0 |
0 |
0 |
|
| 86 |
0 |
| cfg.deflate = dcfg; |
| 87 |
|
| } |
| 88 |
0 |
| } |
| 89 |
|
| |
| 90 |
0 |
| Hash parser_config_out (const Parser::Config& cfg) { |
| 91 |
|
| auto ret = Hash { |
| 92 |
0 |
▶ | {"max_frame_size", xs::out(cfg.max_frame_size)}, |
Branch: 1 branch
| Branch | True | False | Total |
| {"max_frame_size", xs::out(cfg.max_frame_size)}, |
0 |
0 |
0 |
|
| 93 |
0 |
▶ | {"max_message_size", xs::out(cfg.max_message_size)}, |
Branch: 1 branch
| Branch | True | False | Total |
| {"max_message_size", xs::out(cfg.max_message_size)}, |
0 |
0 |
0 |
|
| 94 |
0 |
▶ | {"max_handshake_size", xs::out(cfg.max_handshake_size)}, |
Branch: 1 branch
| Branch | True | False | Total |
| {"max_handshake_size", xs::out(cfg.max_handshake_size)}, |
0 |
0 |
0 |
|
| 95 |
0 |
▶ | {"check_utf8", xs::out(cfg.check_utf8)}, |
Branch: 1 branch
| Branch | True | False | Total |
| {"check_utf8", xs::out(cfg.check_utf8)}, |
0 |
0 |
0 |
|
| 96 |
0 |
▶ | }; |
Branch: 2 branches
| Branch | True | False | Total |
| }; |
0 |
0 |
0 |
| }; |
0 |
0 |
0 |
|
| 97 |
0 |
▶ | if (cfg.deflate) { |
Branch: 1 branch
| Branch | True | False | Total |
| if (cfg.deflate) { |
0 |
0 |
0 |
|
| 98 |
0 |
▶ | ret.store("deflate", deflate_config_out(cfg.deflate.value())); |
Branch: 2 branches
| Branch | True | False | Total |
| ret.store("deflate", deflate_config_out(cfg.deflate.value())); |
0 |
0 |
0 |
| ret.store("deflate", deflate_config_out(cfg.deflate.value())); |
0 |
0 |
0 |
|
| 99 |
|
| } |
| 100 |
0 |
| return ret; |
| 101 |
0 |
▶ | } |
Branch: 7 branches
| Branch | True | False | Total |
| } |
0 |
0 |
0 |
| } |
0 |
0 |
0 |
| } |
0 |
0 |
0 |
| } |
0 |
0 |
0 |
| } |
0 |
0 |
0 |
| } |
0 |
0 |
0 |
| } |
0 |
0 |
0 |
|
| 102 |
|
| |
| 103 |
0 |
| void deflate_config_in (DeflateExt::Config& cfg, const Hash& h) { |
| 104 |
0 |
| Scalar val; |
| 105 |
0 |
▶ | if ((val = h.fetch("server_max_window_bits"))) cfg.server_max_window_bits = val.number(); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("server_max_window_bits"))) cfg.server_max_window_bits = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("server_max_window_bits"))) cfg.server_max_window_bits = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("server_max_window_bits"))) cfg.server_max_window_bits = val.number(); |
0 |
0 |
0 |
|
| 106 |
0 |
▶ | if ((val = h.fetch("client_max_window_bits"))) cfg.client_max_window_bits = val.number(); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("client_max_window_bits"))) cfg.client_max_window_bits = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("client_max_window_bits"))) cfg.client_max_window_bits = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("client_max_window_bits"))) cfg.client_max_window_bits = val.number(); |
0 |
0 |
0 |
|
| 107 |
0 |
▶ | if ((val = h.fetch("client_no_context_takeover"))) cfg.client_no_context_takeover = SvTRUE(val); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("client_no_context_takeover"))) cfg.client_no_context_takeover = SvTRUE(val); |
0 |
0 |
0 |
| if ((val = h.fetch("client_no_context_takeover"))) cfg.client_no_context_takeover = SvTRUE(val); |
0 |
0 |
0 |
| if ((val = h.fetch("client_no_context_takeover"))) cfg.client_no_context_takeover = SvTRUE(val); |
0 |
0 |
0 |
|
| 108 |
0 |
▶ | if ((val = h.fetch("server_no_context_takeover"))) cfg.server_no_context_takeover = SvTRUE(val); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("server_no_context_takeover"))) cfg.server_no_context_takeover = SvTRUE(val); |
0 |
0 |
0 |
| if ((val = h.fetch("server_no_context_takeover"))) cfg.server_no_context_takeover = SvTRUE(val); |
0 |
0 |
0 |
| if ((val = h.fetch("server_no_context_takeover"))) cfg.server_no_context_takeover = SvTRUE(val); |
0 |
0 |
0 |
|
| 109 |
0 |
▶ | if ((val = h.fetch("mem_level"))) cfg.mem_level = val.number(); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("mem_level"))) cfg.mem_level = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("mem_level"))) cfg.mem_level = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("mem_level"))) cfg.mem_level = val.number(); |
0 |
0 |
0 |
|
| 110 |
0 |
▶ | if ((val = h.fetch("compression_level"))) cfg.compression_level = val.number(); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("compression_level"))) cfg.compression_level = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("compression_level"))) cfg.compression_level = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("compression_level"))) cfg.compression_level = val.number(); |
0 |
0 |
0 |
|
| 111 |
0 |
▶ | if ((val = h.fetch("strategy"))) cfg.strategy = val.number(); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("strategy"))) cfg.strategy = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("strategy"))) cfg.strategy = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("strategy"))) cfg.strategy = val.number(); |
0 |
0 |
0 |
|
| 112 |
0 |
▶ | if ((val = h.fetch("compression_threshold"))) cfg.compression_threshold = val.number(); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("compression_threshold"))) cfg.compression_threshold = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("compression_threshold"))) cfg.compression_threshold = val.number(); |
0 |
0 |
0 |
| if ((val = h.fetch("compression_threshold"))) cfg.compression_threshold = val.number(); |
0 |
0 |
0 |
|
| 113 |
0 |
▶ | if ((val = h.fetch("default_compress_binary"))) cfg.default_compress_binary = SvTRUE(val); |
Branch: 3 branches
| Branch | True | False | Total |
| if ((val = h.fetch("default_compress_binary"))) cfg.default_compress_binary = SvTRUE(val); |
0 |
0 |
0 |
| if ((val = h.fetch("default_compress_binary"))) cfg.default_compress_binary = SvTRUE(val); |
0 |
0 |
0 |
| if ((val = h.fetch("default_compress_binary"))) cfg.default_compress_binary = SvTRUE(val); |
0 |
0 |
0 |
|
| 114 |
0 |
| } |
| 115 |
|
| |
| 116 |
0 |
| Sv deflate_config_out (const DeflateExt::Config& cfg) { |
| 117 |
0 |
▶ | Hash settings = Hash::create(); |
Branch: 1 branch
| Branch | True | False | Total |
| Hash settings = Hash::create(); |
0 |
0 |
0 |
|
| 118 |
0 |
▶ | settings.store("server_max_window_bits", Simple(cfg.server_max_window_bits)); |
Branch: 2 branches
| Branch | True | False | Total |
| settings.store("server_max_window_bits", Simple(cfg.server_max_window_bits)); |
0 |
0 |
0 |
| settings.store("server_max_window_bits", Simple(cfg.server_max_window_bits)); |
0 |
0 |
0 |
|
| 119 |
0 |
▶ | settings.store("client_max_window_bits", Simple(cfg.client_max_window_bits)); |
Branch: 2 branches
| Branch | True | False | Total |
| settings.store("client_max_window_bits", Simple(cfg.client_max_window_bits)); |
0 |
0 |
0 |
| settings.store("client_max_window_bits", Simple(cfg.client_max_window_bits)); |
0 |
0 |
0 |
|
| 120 |
0 |
▶ | settings.store("client_no_context_takeover", Simple(cfg.client_no_context_takeover)); |
Branch: 2 branches
| Branch | True | False | Total |
| settings.store("client_no_context_takeover", Simple(cfg.client_no_context_takeover)); |
0 |
0 |
0 |
| settings.store("client_no_context_takeover", Simple(cfg.client_no_context_takeover)); |
0 |
0 |
0 |
|
| 121 |
0 |
▶ | settings.store("server_no_context_takeover", Simple(cfg.server_no_context_takeover)); |
Branch: 2 branches
| Branch | True | False | Total |
| settings.store("server_no_context_takeover", Simple(cfg.server_no_context_takeover)); |
0 |
0 |
0 |
| settings.store("server_no_context_takeover", Simple(cfg.server_no_context_takeover)); |
0 |
0 |
0 |
|
| 122 |
0 |
▶ | settings.store("mem_level", Simple(cfg.mem_level)); |
Branch: 2 branches
| Branch | True | False | Total |
| settings.store("mem_level", Simple(cfg.mem_level)); |
0 |
0 |
0 |
| settings.store("mem_level", Simple(cfg.mem_level)); |
0 |
0 |
0 |
|
| 123 |
0 |
▶ | settings.store("compression_level", Simple(cfg.compression_level)); |
Branch: 2 branches
| Branch | True | False | Total |
| settings.store("compression_level", Simple(cfg.compression_level)); |
0 |
0 |
0 |
| settings.store("compression_level", Simple(cfg.compression_level)); |
0 |
0 |
0 |
|
| 124 |
0 |
▶ | settings.store("strategy", Simple(cfg.strategy)); |
Branch: 2 branches
| Branch | True | False | Total |
| settings.store("strategy", Simple(cfg.strategy)); |
0 |
0 |
0 |
| settings.store("strategy", Simple(cfg.strategy)); |
0 |
0 |
0 |
|
| 125 |
0 |
▶ | settings.store("compression_threshold", Simple(cfg.compression_threshold)); |
Branch: 2 branches
| Branch | True | False | Total |
| settings.store("compression_threshold", Simple(cfg.compression_threshold)); |
0 |
0 |
0 |
| settings.store("compression_threshold", Simple(cfg.compression_threshold)); |
0 |
0 |
0 |
|
| 126 |
0 |
▶ | return Ref::create(settings); |
Branch: 1 branch
| Branch | True | False | Total |
| return Ref::create(settings); |
0 |
0 |
0 |
|
| 127 |
0 |
| } |
| 128 |
|
| |
| 129 |
|
| }}} |