diff options
author | Sergey Nastich <nastich@users.noreply.github.com> | 2018-09-30 16:40:04 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-30 16:40:04 -0400 |
commit | 0783a7767d69b32afb4acf3eb01d541660ea879d (patch) | |
tree | 0bed85e31470b5cfc1b2077a80b96d585e22bce3 /src/main | |
parent | 55f498fe092a46d3c16a40007224807f146fccef (diff) | |
download | driver-core-0783a7767d69b32afb4acf3eb01d541660ea879d.tar.gz driver-core-0783a7767d69b32afb4acf3eb01d541660ea879d.tar.bz2 driver-core-0783a7767d69b32afb4acf3eb01d541660ea879d.zip |
Fix `responseToListResponse` for `x-resource-count` header in lowercase (#228)v1.14.6
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/scala/xyz/driver/core/rest/RestService.scala | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/main/scala/xyz/driver/core/rest/RestService.scala b/src/main/scala/xyz/driver/core/rest/RestService.scala index a324338..09d98b8 100644 --- a/src/main/scala/xyz/driver/core/rest/RestService.scala +++ b/src/main/scala/xyz/driver/core/rest/RestService.scala @@ -6,8 +6,6 @@ import akka.stream.Materializer import scala.concurrent.{ExecutionContext, Future} import scalaz.{ListT, OptionT} -import scalaz.syntax.equal._ -import scalaz.Scalaz.stringInstance trait RestService extends Service { @@ -76,7 +74,7 @@ trait RestService extends Service { response: HttpResponse): Future[ListResponse[T]] = { import DefaultJsonProtocol._ val resourceCount = response.headers - .find(_.name() === ContextHeaders.ResourceCount) + .find(_.name() equalsIgnoreCase ContextHeaders.ResourceCount) .map(_.value().toInt) .getOrElse(0) val meta = ListResponse.Meta(resourceCount, pagination.getOrElse(Pagination(resourceCount max 1, 1))) |