We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 855b65a commit f3a17acCopy full SHA for f3a17ac
runtime/src/main/scala/akka/grpc/internal/Codecs.scala
@@ -25,11 +25,8 @@ object Codecs {
25
* @return a codec to compress data frame bodies with, which will be [[Identity]] unless the client specifies support for another supported encoding.
26
*/
27
def negotiate(request: jm.HttpRequest): Codec = {
28
- val accepted: Array[String] =
29
- request.asInstanceOf[sm.HttpMessage].header[`Message-Accept-Encoding`] match {
30
- case Some(h) => h.values
31
- case None => Array.empty
32
- }
+ // DO NOT USE request.header[`Message-Accept-Encoding`], as that doesn't work for custom headers
+ val accepted = `Message-Accept-Encoding`.findIn(request.asInstanceOf[sm.HttpMessage].headers)
33
34
if (accepted.length == 0) {
35
Identity
0 commit comments