sttp icon indicating copy to clipboard operation
sttp copied to clipboard

Ability to use RawHeader with akka-http backend

Open kvma opened this issue 2 years ago • 1 comments

I'm observing that when using the akka-http backend, headers with values that contain key-value-pairs, double quotes will get stripped out:

i.e.

Authorization: My-Request-Auth k1="v1" k2="v2,v3"

Which seems to be caused by akka http's parse: https://github.com/softwaremill/sttp/blob/8dcc4878b9f400fb45c10d80e5878f5a3d605830/akka-http-backend/src/main/scala/sttp/client3/akkahttp/ToAkka.scala#L24

When using akka-http directly I could get around this by passing in a RawHeader. Is it possible to expose the ability for sttp3 to avoid the parsing call and optionally use a RawHeader?

kvma avatar Feb 08 '23 22:02 kvma

Hm is this a known issue in akka-http? I guess reporting it won't do any good, but still ...

I guess we could replace this with raw headers, maybe you can try preparing a PR?

adamw avatar Feb 09 '23 16:02 adamw