Response compression handler not added for HTTP2 requests
dimitribouniol opened this issue · 0 comments
dimitribouniol commented
Describe the bug
I noticed the response compression didn't work for HTTP2 requests, because the addVaporHTTP2Handlers()
method doesn't seem to add the handlers like the HTTP1 handler does.
To Reproduce
- Configure an app with TLS and the following lines:
app.http.server.configuration.responseCompression = .enabled
app.http.server.configuration.supportVersions = [.one, .two]
- Access the route via Safari
- Notice requests aren't compressed. Removing the
supportedVersions
line (and thus HTTP2) enables compression as expected.
Expected behavior
Responses should be compressed when accessed over typical browsers.
Environment
- Vapor Framework version: 4.87.1
- Vapor Toolbox version: 18.7.4
- OS version: macOS 14.1.2