/third_party/nghttp2/src/ |
D | shrpx_worker_test.cc | 53 BlockAllocator balloc(1024, 1024); in test_shrpx_worker_match_downstream_addr_group() local 67 StringRef::from_lit("/"), groups, 255, balloc)); in test_shrpx_worker_match_downstream_addr_group() 72 StringRef::from_lit("/"), groups, 255, balloc)); in test_shrpx_worker_match_downstream_addr_group() 77 StringRef::from_lit("/alpha"), groups, 255, balloc)); in test_shrpx_worker_match_downstream_addr_group() 82 balloc)); in test_shrpx_worker_match_downstream_addr_group() 87 StringRef::from_lit("/alpha/bravo"), groups, 255, balloc)); in test_shrpx_worker_match_downstream_addr_group() 92 StringRef::from_lit("/Alpha/bravo"), groups, 255, balloc)); in test_shrpx_worker_match_downstream_addr_group() 97 balloc)); in test_shrpx_worker_match_downstream_addr_group() 102 balloc)); in test_shrpx_worker_match_downstream_addr_group() 109 balloc)); in test_shrpx_worker_match_downstream_addr_group() [all …]
|
D | shrpx_http_test.cc | 42 BlockAllocator balloc(1024, 1024); in test_shrpx_http_create_forwarded() local 46 http::create_forwarded(balloc, in test_shrpx_http_create_forwarded() 56 balloc, FORWARDED_FOR, StringRef::from_lit("alpha"), in test_shrpx_http_create_forwarded() 62 balloc, FORWARDED_BY | FORWARDED_FOR, in test_shrpx_http_create_forwarded() 68 balloc, FORWARDED_BY | FORWARDED_FOR, in test_shrpx_http_create_forwarded() 74 balloc, in test_shrpx_http_create_forwarded() 95 BlockAllocator balloc(1024, 1024); in test_shrpx_http_create_affinity_cookie() local 98 c = http::create_affinity_cookie(balloc, StringRef::from_lit("cookie-val"), in test_shrpx_http_create_affinity_cookie() 103 c = http::create_affinity_cookie(balloc, StringRef::from_lit("alpha"), in test_shrpx_http_create_affinity_cookie() 108 c = http::create_affinity_cookie(balloc, StringRef::from_lit("bravo"), in test_shrpx_http_create_affinity_cookie() [all …]
|
D | util_test.cc | 117 BlockAllocator balloc(4096, 4096); in test_util_to_base64() local 120 util::to_base64(balloc, StringRef::from_lit("AAA--B_"))); in test_util_to_base64() 122 util::to_base64(balloc, StringRef::from_lit("AAA--B_B"))); in test_util_to_base64() 136 BlockAllocator balloc(4096, 4096); in test_util_percent_encode_token() local 138 util::percent_encode_token(balloc, StringRef::from_lit("h2"))); in test_util_percent_encode_token() 140 util::percent_encode_token(balloc, StringRef::from_lit("h3~"))); in test_util_percent_encode_token() 142 util::percent_encode_token(balloc, StringRef::from_lit("100%"))); in test_util_percent_encode_token() 144 util::percent_encode_token(balloc, StringRef::from_lit("http 2"))); in test_util_percent_encode_token() 160 BlockAllocator balloc(1024, 1024); in test_util_percent_decode() local 163 balloc, StringRef::from_lit("%66%6F%6f%62%61%72"))); in test_util_percent_decode() [all …]
|
D | shrpx_config_test.cc | 41 BlockAllocator balloc(4096, 4096); in test_shrpx_config_parse_header() local 43 auto p = parse_header(balloc, StringRef::from_lit("a: b")); in test_shrpx_config_parse_header() 47 p = parse_header(balloc, StringRef::from_lit("a: b")); in test_shrpx_config_parse_header() 51 p = parse_header(balloc, StringRef::from_lit(":a: b")); in test_shrpx_config_parse_header() 54 p = parse_header(balloc, StringRef::from_lit("a: :b")); in test_shrpx_config_parse_header() 58 p = parse_header(balloc, StringRef::from_lit(": b")); in test_shrpx_config_parse_header() 61 p = parse_header(balloc, StringRef::from_lit("alpha: bravo charlie")); in test_shrpx_config_parse_header() 65 p = parse_header(balloc, StringRef::from_lit("a,: b")); in test_shrpx_config_parse_header() 68 p = parse_header(balloc, StringRef::from_lit("a: b\x0a")); in test_shrpx_config_parse_header() 73 BlockAllocator balloc(4096, 4096); in test_shrpx_config_parse_log_format() local [all …]
|
D | base64_test.cc | 62 BlockAllocator balloc(4096, 4096); in test_base64_decode() local 67 CU_ASSERT("\xff" == base64::decode(balloc, std::begin(in), std::end(in))); in test_base64_decode() 74 base64::decode(balloc, std::begin(in), std::end(in))); in test_base64_decode() 81 base64::decode(balloc, std::begin(in), std::end(in))); in test_base64_decode() 88 base64::decode(balloc, std::begin(in), std::end(in))); in test_base64_decode() 95 CU_ASSERT("" == base64::decode(balloc, std::begin(in), std::end(in))); in test_base64_decode() 103 CU_ASSERT("" == base64::decode(balloc, std::begin(in), std::end(in))); in test_base64_decode() 110 CU_ASSERT("" == base64::decode(balloc, std::begin(in), std::end(in))); in test_base64_decode() 117 CU_ASSERT("" == base64::decode(balloc, std::begin(in), std::end(in))); in test_base64_decode()
|
D | shrpx_mruby_module_response.cc | 111 auto &balloc = downstream->get_block_allocator(); in response_mod_header() local 125 make_string_ref(balloc, StringRef{RSTRING_PTR(key), in response_mod_header() 158 make_string_ref(balloc, in response_mod_header() 166 make_string_ref(balloc, in response_mod_header() 210 auto &balloc = downstream->get_block_allocator(); in response_return() local 243 auto content_length = util::make_string_ref_uint(balloc, vallen); in response_return() 260 make_string_ref(balloc, lgconf->tstamp->time_http), in response_return() 299 auto &balloc = downstream->get_block_allocator(); in response_send_info() local 317 balloc, in response_send_info() 334 make_string_ref(balloc, in response_send_info() [all …]
|
D | shrpx_config.cc | 358 HeaderRefs::value_type parse_header(BlockAllocator &balloc, in parse_header() argument 371 make_byte_ref(balloc, std::distance(std::begin(optarg), colon) + 1); in parse_header() 379 make_string_ref(balloc, StringRef{value, std::end(optarg)})); in parse_header() 450 altsvc.protocol_id = make_string_ref(config->balloc, tokens[0]); in parse_altsvc() 453 altsvc.service = make_string_ref(config->balloc, tokens[1]); in parse_altsvc() 457 altsvc.host = make_string_ref(config->balloc, tokens[2]); in parse_altsvc() 462 altsvc.origin = make_string_ref(config->balloc, tokens[3]); in parse_altsvc() 467 altsvc.params = make_string_ref(config->balloc, tokens[4]); in parse_altsvc() 699 std::vector<LogFragment> parse_log_format(BlockAllocator &balloc, in parse_log_format() argument 765 make_string_ref(balloc, StringRef{literal_start, var_start})); in parse_log_format() [all …]
|
D | shrpx_mruby_module_request.cc | 120 auto &balloc = downstream->get_block_allocator(); in request_set_authority() local 132 make_string_ref(balloc, StringRef{authority, static_cast<size_t>(n)}); in request_set_authority() 154 auto &balloc = downstream->get_block_allocator(); in request_set_scheme() local 166 make_string_ref(balloc, StringRef{scheme, static_cast<size_t>(n)}); in request_set_scheme() 188 auto &balloc = downstream->get_block_allocator(); in request_set_path() local 197 make_string_ref(balloc, StringRef{path, static_cast<size_t>(pathlen)}); in request_set_path() 217 auto &balloc = downstream->get_block_allocator(); in request_mod_header() local 233 make_string_ref(balloc, StringRef{RSTRING_PTR(key), in request_mod_header() 266 make_string_ref(balloc, in request_mod_header() 274 make_string_ref(balloc, in request_mod_header()
|
D | shrpx_http.cc | 38 StringRef create_error_html(BlockAllocator &balloc, unsigned int http_status) { in create_error_html() argument 48 auto status_string = http2::stringify_status(balloc, http_status); in create_error_html() 52 balloc, StringRef::from_lit(R"(<!DOCTYPE html><html lang="en"><title>)"), in create_error_html() 60 StringRef create_forwarded(BlockAllocator &balloc, int params, in create_forwarded() argument 77 auto iov = make_byte_ref(balloc, len + 1); in create_forwarded() 176 StringRef create_affinity_cookie(BlockAllocator &balloc, const StringRef &name, in create_affinity_cookie() argument 191 auto iov = make_byte_ref(balloc, len + 1); in create_affinity_cookie() 223 StringRef create_altsvc_header_value(BlockAllocator &balloc, in create_altsvc_header_value() argument 249 auto iov = make_byte_ref(balloc, len + 2); in create_altsvc_header_value()
|
D | shrpx_http.h | 44 StringRef create_error_html(BlockAllocator &balloc, unsigned int status_code); 59 StringRef create_forwarded(BlockAllocator &balloc, int params, 73 StringRef create_affinity_cookie(BlockAllocator &balloc, const StringRef &name, 83 StringRef create_altsvc_header_value(BlockAllocator &balloc,
|
D | shrpx_https_upstream.cc | 142 auto &balloc = downstream->get_block_allocator(); in htp_uricb() local 164 concat_string_ref(balloc, req.authority, StringRef{data, len}); in htp_uricb() 166 req.path = concat_string_ref(balloc, req.path, StringRef{data, len}); in htp_uricb() 257 void rewrite_request_host_path_from_uri(BlockAllocator &balloc, Request &req, in rewrite_request_host_path_from_uri() argument 276 auto iovec = make_byte_ref(balloc, authoritylen + 1); in rewrite_request_host_path_from_uri() 323 path = concat_string_ref(balloc, path, StringRef::from_lit("?"), in rewrite_request_host_path_from_uri() 328 req.path = http2::rewrite_clean_path(balloc, path); in rewrite_request_host_path_from_uri() 344 auto &balloc = downstream->get_block_allocator(); in htp_hdrs_completecb() local 347 kv.value = util::rstrip(balloc, kv.value); in htp_hdrs_completecb() 434 req.path = http2::rewrite_clean_path(balloc, req.path); in htp_hdrs_completecb() [all …]
|
D | http2.h | 103 StringRef stringify_status(BlockAllocator &balloc, unsigned int status_code); 286 StringRef rewrite_location_uri(BlockAllocator &balloc, const StringRef &uri, 380 StringRef path_join(BlockAllocator &balloc, const StringRef &base_path, 404 StringRef normalize_path(BlockAllocator &balloc, const StringRef &path, 410 StringRef normalize_path_colon(BlockAllocator &balloc, const StringRef &path, 415 StringRef rewrite_clean_path(BlockAllocator &balloc, const StringRef &src); 427 int construct_push_component(BlockAllocator &balloc, StringRef &scheme, 432 StringRef copy_lower(BlockAllocator &balloc, const StringRef &src);
|
D | http2.cc | 144 StringRef stringify_status(BlockAllocator &balloc, unsigned int status_code) { in stringify_status() argument 246 return util::make_string_ref_uint(balloc, status_code); in stringify_status() 631 StringRef rewrite_location_uri(BlockAllocator &balloc, const StringRef &uri, in rewrite_location_uri() argument 667 auto iov = make_byte_ref(balloc, len + 1); in rewrite_location_uri() 1353 BlockAllocator balloc(1024, 1024); in path_join() local 1355 return path_join(balloc, base_path, base_query, rel_path, rel_query).str(); in path_join() 1595 int construct_push_component(BlockAllocator &balloc, StringRef &scheme, in construct_push_component() argument 1634 auto iov = make_byte_ref(balloc, len + 1); in construct_push_component() 1659 path = http2::path_join(balloc, base, StringRef{}, rel, relq); in construct_push_component() 1701 StringRef path_join(BlockAllocator &balloc, const StringRef &base_path, in path_join() argument [all …]
|
D | shrpx_mruby_module_env.cc | 176 auto &balloc = downstream->get_block_allocator(); in env_get_tls_client_fingerprint_md() local 177 auto f = util::format_hex(balloc, in env_get_tls_client_fingerprint_md() 217 auto &balloc = downstream->get_block_allocator(); in env_get_tls_client_subject_name() local 218 auto name = tls::get_x509_subject_name(balloc, x); in env_get_tls_client_subject_name() 247 auto &balloc = downstream->get_block_allocator(); in env_get_tls_client_issuer_name() local 248 auto name = tls::get_x509_issuer_name(balloc, x); in env_get_tls_client_issuer_name() 277 auto &balloc = downstream->get_block_allocator(); in env_get_tls_client_serial() local 278 auto sn = tls::get_x509_serial(balloc, x); in env_get_tls_client_serial() 407 auto &balloc = downstream->get_block_allocator(); in env_get_tls_session_id() local 408 auto id = util::format_hex(balloc, StringRef{session_id, session_id_length}); in env_get_tls_session_id()
|
D | shrpx_api_downstream_connection.cc | 109 auto &balloc = downstream_->get_block_allocator(); in send_reply() local 133 auto buf = make_byte_ref(balloc, buflen); in send_reply() 145 auto content_length = util::make_string_ref_uint(balloc, buf.len); in send_reply() 283 auto &balloc = downstream_->get_block_allocator(); in error_method_not_allowed() local 285 auto iov = make_byte_ref(balloc, len + 1); in error_method_not_allowed() 437 auto &balloc = downstream_->get_block_allocator(); in handle_configrevision() local 445 balloc, StringRef::from_lit(R"(,"data":{"configRevision":)"), in handle_configrevision() 446 util::make_string_ref_uint(balloc, config->config_revision), in handle_configrevision()
|
D | shrpx_downstream.h | 65 FieldStore(BlockAllocator &balloc, size_t headers_initial_capacity) in FieldStore() argument 67 balloc_(balloc), in FieldStore() 155 Request(BlockAllocator &balloc) in Request() 156 : fs(balloc, 16), in Request() 237 Response(BlockAllocator &balloc) in Response() 238 : fs(balloc, 32), in Response()
|
D | http2_test.cc | 264 BlockAllocator balloc(4096, 4096); in check_rewrite_location_uri() local 268 balloc, StringRef{uri}, u, StringRef{match_host}, in check_rewrite_location_uri() 1071 BlockAllocator balloc(4096, 4096); in test_http2_rewrite_clean_path() local 1075 http2::rewrite_clean_path(balloc, in test_http2_rewrite_clean_path() 1080 balloc, StringRef::from_lit("/delta%3a"))); in test_http2_rewrite_clean_path() 1086 balloc, StringRef::from_lit("/alpha/charlie/%2e././bravo/delta/.."))); in test_http2_rewrite_clean_path() 1089 http2::rewrite_clean_path(balloc, StringRef::from_lit("alpha%3a"))); in test_http2_rewrite_clean_path() 1091 CU_ASSERT("" == http2::rewrite_clean_path(balloc, StringRef{})); in test_http2_rewrite_clean_path() 1095 http2::rewrite_clean_path(balloc, StringRef::from_lit("//alpha?bravo"))); in test_http2_rewrite_clean_path() 1118 BlockAllocator balloc(4096, 4096); in test_http2_construct_push_component() local [all …]
|
D | shrpx_http2_upstream.cc | 112 auto &balloc = http->get_downstream()->get_block_allocator(); in upgrade_upstream() local 115 http2_settings = util::to_base64(balloc, http2_settings); in upgrade_upstream() 117 auto settings_payload = base64::decode(balloc, std::begin(http2_settings), in upgrade_upstream() 1523 auto &balloc = downstream->get_block_allocator(); in send_reply() local 1530 auto response_status = http2::stringify_status(balloc, resp.http_status); in send_reply() 1584 auto &balloc = downstream->get_block_allocator(); in error_reply() local 1586 auto html = http::create_error_html(balloc, status_code); in error_reply() 1599 auto response_status = http2::stringify_status(balloc, status_code); in error_reply() 1600 auto content_length = util::make_string_ref_uint(balloc, html.size()); in error_reply() 1601 auto date = make_string_ref(balloc, lgconf->tstamp->time_http); in error_reply() [all …]
|
D | util.cc | 151 StringRef percent_encode_token(BlockAllocator &balloc, in percent_encode_token() argument 153 auto iov = make_byte_ref(balloc, target.size() * 3 + 1); in percent_encode_token() 192 StringRef quote_string(BlockAllocator &balloc, const StringRef &target) { in quote_string() argument 196 return make_string_ref(balloc, target); in quote_string() 199 auto iov = make_byte_ref(balloc, target.size() + cnt + 1); in quote_string() 472 StringRef format_hex(BlockAllocator &balloc, const StringRef &s) { in format_hex() argument 473 auto iov = make_byte_ref(balloc, s.size() * 2 + 1); in format_hex() 503 StringRef to_base64(BlockAllocator &balloc, const StringRef &token68str) { in to_base64() argument 506 auto iov = make_byte_ref(balloc, len + 1); in to_base64() 1298 StringRef make_http_hostport(BlockAllocator &balloc, const StringRef &host, in make_http_hostport() argument [all …]
|
D | util.h | 133 StringRef percent_decode(BlockAllocator &balloc, const StringRef &src); 136 StringRef percent_encode_token(BlockAllocator &balloc, const StringRef &target); 163 StringRef quote_string(BlockAllocator &balloc, const StringRef &target); 194 StringRef format_hex(BlockAllocator &balloc, const StringRef &s); 212 StringRef decode_hex(BlockAllocator &balloc, const StringRef &s); 455 StringRef make_string_ref_uint(BlockAllocator &balloc, T n) { in make_string_ref_uint() argument 456 auto iov = make_byte_ref(balloc, NGHTTP2_MAX_UINT64_DIGITS + 1); in make_string_ref_uint() 521 StringRef to_base64(BlockAllocator &balloc, const StringRef &token68str); 769 StringRef make_hostport(BlockAllocator &balloc, const StringRef &host, 800 StringRef make_http_hostport(BlockAllocator &balloc, const StringRef &host, [all …]
|
D | shrpx_downstream_test.cc | 36 BlockAllocator balloc(16, 16); in test_downstream_field_store_append_last_header() local 37 FieldStore fs(balloc, 0); in test_downstream_field_store_append_last_header() 64 BlockAllocator balloc(16, 16); in test_downstream_field_store_header() local 65 FieldStore fs(balloc, 0); in test_downstream_field_store_header()
|
D | shrpx_worker.cc | 284 make_string_ref(shared_addr->balloc, src.affinity.cookie.name); in replace_downstream_config() 287 make_string_ref(shared_addr->balloc, src.affinity.cookie.path); in replace_downstream_config() 304 dst_addr.host = make_string_ref(shared_addr->balloc, src_addr.host); in replace_downstream_config() 306 make_string_ref(shared_addr->balloc, src_addr.hostport); in replace_downstream_config() 310 dst_addr.group = make_string_ref(shared_addr->balloc, src_addr.group); in replace_downstream_config() 315 dst_addr.sni = make_string_ref(shared_addr->balloc, src_addr.sni); in replace_downstream_config() 1055 faddr.hostport = util::make_http_hostport(mod_config()->balloc, in create_quic_server_socket() 1154 size_t catch_all, BlockAllocator &balloc) { in match_downstream_addr_group_host() argument 1175 auto rev_host_src = make_byte_ref(balloc, host.size() - 1); in match_downstream_addr_group_host() 1233 size_t catch_all, BlockAllocator &balloc) { in match_downstream_addr_group() argument [all …]
|
D | shrpx_http2_downstream_connection.cc | 252 auto &balloc = downstream_->get_block_allocator(); in push_request_headers() local 371 balloc, params, handler->get_forwarded_by(), in push_request_headers() 379 value = concat_string_ref(balloc, fwd->value, in push_request_headers() 397 xff_value = concat_string_ref(balloc, xff->value, in push_request_headers() 416 xfp_value = concat_string_ref(balloc, xfp->value, in push_request_headers() 438 auto iov = make_byte_ref(balloc, vialen + 1); in push_request_headers()
|
D | shrpx_tls.h | 305 StringRef get_x509_subject_name(BlockAllocator &balloc, X509 *x); 309 StringRef get_x509_issuer_name(BlockAllocator &balloc, X509 *x); 313 StringRef get_x509_serial(BlockAllocator &balloc, X509 *x);
|
/third_party/jerryscript/targets/curie_bsp/jerry_app/quark/ |
D | main.c | 52 jerry_char_t *err_str_buf = (jerry_char_t *) balloc (err_str_size, NULL); in jerry_resolve_error() 80 size_t *str_lens = (size_t *) balloc ((argc - 2) * sizeof(size_t), &err); in eval_jerry_script() 93 char *buffer = (char *) balloc (str_total_length, &err); in eval_jerry_script()
|