Skip to content

Commit 2a0a5e9

Browse files
authored
fix: Don't send content length header for unary gRPC responses (#2075)
Also includes * bump: Akka HTTP 10.7.2
1 parent 3de4be5 commit 2a0a5e9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

project/Dependencies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ object Dependencies {
2424
// https://doc.akka.io/libraries/akka-core/current/project/downstream-upgrade-strategy.html
2525
val akka = "2.10.5"
2626
val akkaBinary = VersionNumber(akka).numbers match { case Seq(major, minor, _*) => s"$major.$minor" }
27-
val akkaHttp = "10.7.1"
27+
val akkaHttp = "10.7.2"
2828
val akkaHttpBinary = VersionNumber(akkaHttp).numbers match { case Seq(major, minor, _*) => s"$major.$minor" }
2929

3030
val grpc = "1.73.0" // checked synced by VersionSyncCheckPlugin

runtime/src/main/scala/akka/grpc/internal/GrpcProtocolWeb.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ abstract class GrpcProtocolWebBase(subType: String) extends AbstractGrpcProtocol
3232
HttpResponse(
3333
status = StatusCodes.OK,
3434
headers = headers,
35-
entity = HttpEntity(contentType, encodeDataToFrameBytes(codec, data, trailer)),
35+
entity =
36+
HttpEntity.Strict(contentType, encodeDataToFrameBytes(codec, data, trailer), reportContentLength = false),
3637
protocol = HttpProtocols.`HTTP/1.1`)
3738

3839
private def encodeDataToFrameBytes(codec: Codec, data: ByteString, trailer: Trailer): ByteString = {

0 commit comments

Comments
 (0)