HTTP/2 requests are not processed
Added by Albert Zenkoff about 1 month ago
Hi!
I have a problem with the HTTP/2 requests. I understand from the documentation that HTTP/2 is supported but it is not clear whether any special configuration is required. I have an endpoint configured:
auto healthResource = std::make_shared<HealthResource>(*g_db);
server.addResource(healthResource, "/health");
The endpoint handler gets executed if I access it with the HTTP/1.1 but it does not get executed with HTTP/2
Health ping!
[2025-Aug-05 03:52:58.659] 886837 - [access] "wthttp: 127.0.0.1 GET /health HTTP/1.1 200 9"
[2025-Aug-05 03:52:58.659] 886837 - [info] "WebRequest: took 0.186 ms"
[2025-Aug-05 03:53:01.126] 886837 - [access] "wthttp: 10.0.22.210 PRI * HTTP/2.0 501 97"
The second request is HTTP/2 and is just that - it gets logged but it does not invoke the handler.
What am I missing? Your help is appreciated.
Replies (1)
RE: HTTP/2 requests are not processed - Added by Albert Zenkoff about 1 month ago
Hmm, running tests with curl and forcing HTTP/2 gives me this:
"Remote peer returned unexpected data while we expected SETTINGS frame. Perhaps, peer does not support HTTP/2 properly."
Should I conclude that HTTP/2 doe not really work and go back to HTTP/1.1?