Lines Matching refs:http2
169 if (config->http2.upstream.debug.frame_debug) { in on_header_callback2()
212 auto token = http2::lookup_token(namebuf.base, namebuf.len); in on_header_callback2()
336 auto &dump = config->http2.upstream.debug.dump; in on_request_headers()
339 http2::dump_nv(dump.request_header, nva); in on_request_headers()
342 auto content_length = req.fs.header(http2::HD_CONTENT_LENGTH); in on_request_headers()
349 auto authority = req.fs.header(http2::HD__AUTHORITY); in on_request_headers()
350 auto path = req.fs.header(http2::HD__PATH); in on_request_headers()
351 auto method = req.fs.header(http2::HD__METHOD); in on_request_headers()
352 auto scheme = req.fs.header(http2::HD__SCHEME); in on_request_headers()
354 auto method_token = http2::lookup_method_token(method->value); in on_request_headers()
379 authority = req.fs.header(http2::HD_HOST); in on_request_headers()
394 req.path = http2::rewrite_clean_path(downstream->get_block_allocator(), in on_request_headers()
399 auto connect_proto = req.fs.header(http2::HD__PROTOCOL); in on_request_headers()
540 if (get_config()->http2.upstream.debug.frame_debug) { in on_frame_recv_callback()
657 if (get_config()->http2.upstream.debug.frame_debug) { in on_frame_send_callback()
738 auto token = http2::lookup_token(nv.name, nv.namelen); in on_frame_send_callback()
740 case http2::HD__METHOD: in on_frame_send_callback()
741 req.method = http2::lookup_method_token(value); in on_frame_send_callback()
743 case http2::HD__SCHEME: in on_frame_send_callback()
746 case http2::HD__AUTHORITY: in on_frame_send_callback()
749 case http2::HD__PATH: in on_frame_send_callback()
750 req.path = http2::rewrite_clean_path(promised_balloc, value); in on_frame_send_callback()
994 if (config->http2.upstream.debug.frame_debug) { in create_http2_upstream_callbacks()
1025 auto &http2conf = config->http2; in Http2Upstream()
1175 auto &http2conf = config->http2; in on_write()
1472 http2::copy_headers_to_nva_nocopy(nva, trailers, http2::HDOP_STRIP_ALL); in downstream_data_read_callback()
1520 auto response_status = http2::stringify_status(balloc, resp.http_status); in send_reply()
1522 nva.push_back(http2::make_nv_ls_nocopy(":status", response_status)); in send_reply()
1529 case http2::HD_CONNECTION: in send_reply()
1530 case http2::HD_KEEP_ALIVE: in send_reply()
1531 case http2::HD_PROXY_CONNECTION: in send_reply()
1532 case http2::HD_TE: in send_reply()
1533 case http2::HD_TRANSFER_ENCODING: in send_reply()
1534 case http2::HD_UPGRADE: in send_reply()
1537 nva.push_back(http2::make_nv_nocopy(kv.name, kv.value, kv.no_index)); in send_reply()
1540 if (!resp.fs.header(http2::HD_SERVER)) { in send_reply()
1541 nva.push_back(http2::make_nv_ls_nocopy("server", config->http.server_name)); in send_reply()
1545 nva.push_back(http2::make_nv_nocopy(p.name, p.value)); in send_reply()
1589 auto response_status = http2::stringify_status(balloc, status_code); in error_reply()
1594 {http2::make_nv_ls_nocopy(":status", response_status), in error_reply()
1595 http2::make_nv_ll("content-type", "text/html; charset=UTF-8"), in error_reply()
1596 http2::make_nv_ls_nocopy("server", get_config()->http.server_name), in error_reply()
1597 http2::make_nv_ls_nocopy("content-length", content_length), in error_reply()
1598 http2::make_nv_ls_nocopy("date", date)}}; in error_reply()
1700 auto &http2conf = config->http2; in on_downstream_header_complete()
1719 resp.fs.header(http2::HD_LINK) && in on_downstream_header_complete()
1735 auto response_status = http2::stringify_status(balloc, resp.http_status); in on_downstream_header_complete()
1737 nva.push_back(http2::make_nv_ls_nocopy(":status", response_status)); in on_downstream_header_complete()
1739 http2::copy_headers_to_nva_nocopy(nva, resp.fs.headers(), in on_downstream_header_complete()
1740 http2::HDOP_STRIP_ALL); in on_downstream_header_complete()
1760 auto striphd_flags = http2::HDOP_STRIP_ALL & ~http2::HDOP_STRIP_VIA; in on_downstream_header_complete()
1764 response_status = http2::stringify_status(balloc, 200); in on_downstream_header_complete()
1765 striphd_flags |= http2::HDOP_STRIP_SEC_WEBSOCKET_ACCEPT; in on_downstream_header_complete()
1767 response_status = http2::stringify_status(balloc, resp.http_status); in on_downstream_header_complete()
1770 nva.push_back(http2::make_nv_ls_nocopy(":status", response_status)); in on_downstream_header_complete()
1772 http2::copy_headers_to_nva_nocopy(nva, resp.fs.headers(), striphd_flags); in on_downstream_header_complete()
1775 nva.push_back(http2::make_nv_ls_nocopy("server", httpconf.server_name)); in on_downstream_header_complete()
1777 auto server = resp.fs.header(http2::HD_SERVER); in on_downstream_header_complete()
1779 nva.push_back(http2::make_nv_ls_nocopy("server", (*server).value)); in on_downstream_header_complete()
1795 nva.push_back(http2::make_nv_ls_nocopy("set-cookie", cookie_str)); in on_downstream_header_complete()
1799 auto via = resp.fs.header(http2::HD_VIA); in on_downstream_header_complete()
1802 nva.push_back(http2::make_nv_ls_nocopy("via", (*via).value)); in on_downstream_header_complete()
1821 nva.push_back(http2::make_nv_ls_nocopy("via", StringRef{iov.base, p})); in on_downstream_header_complete()
1825 nva.push_back(http2::make_nv_nocopy(p.name, p.value)); in on_downstream_header_complete()
1831 nva.push_back(http2::make_nv_ll("x-http2-push", "1")); in on_downstream_header_complete()
1839 http2::dump_nv(http2conf.upstream.debug.dump.response_header, nva.data(), in on_downstream_header_complete()
1983 http2::HD_LOCATION); in redirect_to_https()
2126 auto base = http2::get_pure_path_component(req.path); in prepare_push_promise()
2134 if (kv.token != http2::HD_LINK) { in prepare_push_promise()
2137 for (auto &link : http2::parse_link_header(kv.value)) { in prepare_push_promise()
2140 rv = http2::construct_push_component(balloc, scheme, authority, path, in prepare_push_promise()
2180 nva.push_back(http2::make_nv_ll(":method", "GET")); in submit_push_promise()
2181 nva.push_back(http2::make_nv_ls_nocopy(":scheme", scheme)); in submit_push_promise()
2182 nva.push_back(http2::make_nv_ls_nocopy(":path", path)); in submit_push_promise()
2183 nva.push_back(http2::make_nv_ls_nocopy(":authority", authority)); in submit_push_promise()
2188 case http2::HD__AUTHORITY: in submit_push_promise()
2189 case http2::HD__SCHEME: in submit_push_promise()
2190 case http2::HD__METHOD: in submit_push_promise()
2191 case http2::HD__PATH: in submit_push_promise()
2193 case http2::HD_ACCEPT_ENCODING: in submit_push_promise()
2194 case http2::HD_ACCEPT_LANGUAGE: in submit_push_promise()
2195 case http2::HD_CACHE_CONTROL: in submit_push_promise()
2196 case http2::HD_HOST: in submit_push_promise()
2197 case http2::HD_USER_AGENT: in submit_push_promise()
2198 nva.push_back(http2::make_nv_nocopy(kv.name, kv.value, kv.no_index)); in submit_push_promise()
2234 return !(config->http2.no_server_push || in push_enabled()
2250 auto base = http2::get_pure_path_component(req.path); in initiate_push()
2259 rv = http2::construct_push_component(balloc, scheme, authority, path, base, in initiate_push()
2342 nva.push_back(http2::make_nv(kv.name, kv.value, kv.no_index)); in on_downstream_push_promise_complete()