QGrpcChannelOptions: allow narrowing accepted compression algorithms
QtGrpc unconditionally advertised `identity,deflate,gzip` in the
grpc-accept-encoding header on every RPC, with no way to opt out or to
query which algorithms the current build supports.
Introduce QtGrpc::CompressionAlgorithm and three accessors on
QGrpcChannelOptions: acceptedCompressionAlgorithms(),
setAcceptedCompressionAlgorithms(), and the static
supportedCompressionAlgorithms(). The default advertises every algorithm
the build can decompress, an empty set refuses all server compression.
Uncompressed messages (identity) are always accepted per the gRPC spec.
A server response using an encoding outside the accepted set now
finishes the call with StatusCode::Unimplemented.
[ChangeLog][QtGrpc][QGrpcChannelOptions] Added
setAcceptedCompressionAlgorithms() and supportedCompressionAlgorithms()
to control accepted server compression. Pass an empty set to refuse it.
Fixes: QTBUG-146709
Change-Id: I32808ee435c75077ec957cdfd4f4be8c59318908
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>