diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 222292db..4e80f9e4 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -3,7 +3,7 @@ import sbt._ object Dependencies { val versions = new { - val twitter = "19.5.1" + val twitter = "19.6.0" val guice = "4.0" val logback = "1.2.3" val mockito = "1.10.19" diff --git a/utils/src/main/scala/io/github/cactacea/utils/ETagFilter.scala b/utils/src/main/scala/io/github/cactacea/utils/ETagFilter.scala index 68167435..68309df4 100644 --- a/utils/src/main/scala/io/github/cactacea/utils/ETagFilter.scala +++ b/utils/src/main/scala/io/github/cactacea/utils/ETagFilter.scala @@ -5,7 +5,7 @@ import com.twitter.finagle.http.{Method, Request, Response} import com.twitter.io.Buf.ByteArray.Owned.extract import com.twitter.util.Future import com.roundeights.hasher.Implicits._ -import org.jboss.netty.handler.codec.http.HttpHeaders.Names._ +import io.netty.handler.codec.http.HttpHeaderNames._ class ETagFilter extends SimpleFilter[Request, Response] { @@ -13,10 +13,10 @@ class ETagFilter extends SimpleFilter[Request, Response] { service(request).map({response => if (request.method == Method.Get && response.statusCode == 200) { val tag = extract(response.content).md5.hex - if (request.headerMap.get(IF_NONE_MATCH) == Some(tag)) { + if (request.headerMap.get(IF_NONE_MATCH.toString) == Some(tag)) { Response(request.version, http.Status.NotModified) } else { - response.headerMap(ETAG) = tag + response.headerMap(ETAG.toString) = tag response } } else {