39 static int HTTP2RegisterPatternsForProtocolDetection(
void)
46 16, 0, STREAM_TOSERVER) < 0)
58 const char *proto_name =
"http2";
62 if (HTTP2RegisterPatternsForProtocolDetection() < 0)
66 rs_http2_register_parser();
77 if (h2s == NULL || h1tx == NULL) {
80 if (h1tx->request_method == NULL) {
85 rs_http2_tx_set_method(
86 h2s, bstr_ptr(h1tx->request_method), (uint32_t)bstr_len(h1tx->request_method));
87 if (h1tx->request_uri != NULL) {
91 h2s, bstr_ptr(h1tx->request_uri), (uint32_t)bstr_len(h1tx->request_uri));
93 size_t nbheaders = htp_table_size(h1tx->request_headers);
94 for (
size_t i = 0; i < nbheaders; i++) {
95 htp_header_t *h = htp_table_get_index(h1tx->request_headers, i, NULL);
96 rs_http2_tx_add_header(h2s, bstr_ptr(h->name), (uint32_t)bstr_len(h->name),
97 bstr_ptr(h->value), (uint32_t)bstr_len(h->value));