Respect {{contentCompression}} in setters
Trying to enable request or response compression if the
{{contentCompression}} flag was disabled during generation makes
no sense. So, do not update the respective members in such case
and raise warnings.
The getters are left untouched, because they will simply always
return false (the default value) in such case.
As a drive-by: fix the Accept-Encoding header to also report that
deflate algorithm is supported, because we already have the code
that implements it.
Add tests that check roundtrip file sending with all the possible
combinations of request and response compression.
Fixes: QTBUG-143041
Pick-to: 6.11
Change-Id: I11c09cf3106e088c659f9b041ca18a8c0c294b3a
Reviewed-by: Tatiana Borisova <tatiana.borisova@qt.io>
| commit | dd547c199efdcc5174ab0de9796de5c69b3b5372 |
| parent | e89bbd6b124fb4b5bdf9d9bff25f792ab13b0cbb |
| author | Ivan Solovev <ivan.solovev@qt.io> |
| committer | Ivan Solovev <ivan.solovev@qt.io> |
| commit time | Fri, 16 Jan 2026 14:13:44 +0100 |
- M src/tools/qtopenapi-generator/src/main/resources/cpp-qt6-client/common/api-base-body.mustache
- M src/tools/qtopenapi-generator/src/main/resources/cpp-qt6-client/common/httprequest.cpp.mustache
- M tests/auto/compression/CMakeLists.txt
- M tests/auto/compression/client/tst_compression/CMakeLists.txt
- M tests/auto/compression/client/tst_compression/compression.yaml
- A tests/auto/compression/client/tst_compression/test.pdf
- M tests/auto/compression/client/tst_compression/tst_compression.cpp
- A tests/auto/compression/server/CMakeLists.txt
- A tests/auto/compression/server/go.mod
- A tests/auto/compression/server/go.sum
- A tests/auto/compression/server/go/api_test_.go
- A tests/auto/compression/server/go/routers.go
- A tests/auto/compression/server/main.go