Skip to content

Commit

Permalink
finagle: upgrade to Netty 4.1.35.Final and netty-tcnative 2.0.25.Final
Browse files Browse the repository at this point in the history
Problem/Solution

Upgrade Netty to 4.1.35.Final and netty-tcnative to 2.0.25.Final
and change `c.t.f.netty4.http.handler.FixedLengthMessageAggregator` to leverage
the Netty `isStartMessage` change (netty/netty#8793).

JIRA Issues: CSL-7908

Differential Revision: https://phabricator.twitter.biz/D312439
  • Loading branch information
enbnt authored and jenkins committed May 21, 2019
1 parent f1f9767 commit 9ffbf7a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 22 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Note that ``PHAB_ID=#`` and ``RB_ID=#`` correspond to associated messages in com
Unreleased
----------

* finagle: Upgrade to Netty 4.1.35.Final and netty-tcnative 2.0.25.Final.
``PHAB_ID=D312439``

19.5.1
------

Expand Down
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ val releaseVersion = "19.6.0-SNAPSHOT"

val libthriftVersion = "0.10.0"

val netty4Version = "4.1.31.Final"
val netty4Version = "4.1.35.Final"

// zkVersion should be kept in sync with the 'util-zk' dependency version
val zkVersion = "3.5.0-alpha"
Expand All @@ -32,7 +32,7 @@ val netty4LibsTest = Seq(
)
val netty4Http = "io.netty" % "netty-codec-http" % netty4Version
val netty4Http2 = "io.netty" % "netty-codec-http2" % netty4Version
val netty4StaticSsl = "io.netty" % "netty-tcnative-boringssl-static" % "2.0.19.Final"
val netty4StaticSsl = "io.netty" % "netty-tcnative-boringssl-static" % "2.0.25.Final"
val opencensusVersion = "0.19.1"
val jacksonVersion = "2.9.8"
val jacksonLibs = Seq(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,9 @@ private[http] class FixedLengthMessageAggregator(
extends FinagleHttpObjectAggregator(maxContentLength.inBytes.toInt, handleExpectContinue) {
require(maxContentLength.bytes >= 0)

private[this] var decoding = false

override def acceptInboundMessage(msg: Any): Boolean = msg match {
case _: FullHttpMessage =>
false

case msg: HttpMessage if shouldAggregate(msg) =>
decoding = true
true

case _: HttpContent if decoding =>
true

case _ =>
false
}

override def finishAggregation(aggregated: FullHttpMessage): Unit = {
decoding = false
super.finishAggregation(aggregated)
override def isStartMessage(msg: HttpObject): Boolean = msg match {
case httpMsg: HttpMessage => shouldAggregate(httpMsg)
case _ => false
}

private[this] def shouldAggregate(msg: HttpMessage): Boolean = {
Expand Down

0 comments on commit 9ffbf7a

Please sign in to comment.