Nordix / kahttp

Keep-alive http test program

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for H2C

Zsolt-LazarZsolt opened this issue · comments

It would be great if kahttp server could support traffic over http2 without TLS.
This could be governed by the client: If the client initiates http2 connection to the cleartext port the traffic could be over http2.

It would also be great if this could be easily looked up from the response the server gives:
The proto field in the response could also contain if tls is used or not:
Proto: HTTP/1.1 would mean for me: regular http1.1
Proto: HTTP/1.1 + TLS -> tls
Proto: HTTP/2 -> h2c
Proto: HTTP/2 + TLS -> h2
Of course TLS can be a new field also, that could also be easily follow-able for me.

Thank you in advance.

The response modifications are not implemented. These items should be deducted from the request and the response headers.

Example with curl;

$ curl -D - --http2 http://192.168.1.2
HTTP/1.1 101 Switching Protocols
Connection: Upgrade
Upgrade: h2c

HTTP/2 200 
x-kahttp-server-host: Kahttp/ekm@vm-002
content-type: text/plain; charset=utf-8
content-length: 216
date: Sat, 28 Nov 2020 08:45:39 GMT

Method: GET
URL: /
Proto: HTTP/2.0
ContentLength: -1
TransferEncoding: []
Host: 192.168.1.2
RemoteAddr: 192.168.1.2:44726
RequestURI: /
X-Kahttp-Server-Host: Kahttp/ekm@vm-002
Accept: [*/*]
User-Agent: [curl/7.58.0]