1 year ago

#359725

test-img

IGP

How to form a connect message in http2? (library: nghttp2, language: C)

I try to send a connection message to a server but I get a response from the server with the status 400 (Bad request). I understand from RFC that the ":scheme" and ":path" pseudo-header fields MUST be omitted, so I put in the header just :method and :authority

  nghttp2_nv hdrs[] = {
      MAKE_NV2(":method", "CONNECT"),
      MAKE_NV(":authority", authority, authoritylen),
      };

 nghttp2_submit_request(session, NULL, hdrs, ARRLEN(hdrs), NULL, NULL);

What I did wrong?

c

http2

nghttp2

0 Answers

Your Answer

Accepted video resources