Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ import io.udash.web.guide.rest.ExposedRestInterfaces
import io.udash.web.guide.rpc.ExposedRpcInterfaces
import io.udash.web.guide.{GuideExceptions, MainServerRPC}
import monix.execution.Scheduler
import org.eclipse.jetty.compression.server.CompressionHandler
import org.eclipse.jetty.ee8.nested.SessionHandler
import org.eclipse.jetty.ee8.servlet.{DefaultServlet, ServletContextHandler, ServletHolder}
import org.eclipse.jetty.ee8.websocket.javax.server.config.JavaxWebSocketServletContainerInitializer
import org.eclipse.jetty.rewrite.handler.{RewriteHandler, RewriteRegexRule}
import org.eclipse.jetty.server.Server
import org.eclipse.jetty.server.handler.ContextHandlerCollection
import org.eclipse.jetty.server.handler.gzip.GzipHandler
import org.eclipse.jetty.util.resource.ResourceFactory

import java.nio.file.Path
Expand All @@ -31,7 +31,7 @@ class ApplicationServer(val port: Int, homepageResourceBase: String, guideResour
server.stop()

private val homepage =
new GzipHandler(createContextHandler(
new CompressionHandler(createContextHandler(
hosts = Array("udash.io", "www.udash.io", "udash.local", "127.0.0.1"),
resourceBase = homepageResourceBase
).get())
Expand Down Expand Up @@ -64,7 +64,7 @@ class ApplicationServer(val port: Int, homepageResourceBase: String, guideResour

contextHandler.addServlet(new ServletHolder(RestServlet[MainServerREST](new ExposedRestInterfaces)), "/rest_api/*")

new GzipHandler(contextHandler.get())
new CompressionHandler(contextHandler.get())
}

server.setHandler(
Expand Down
4 changes: 3 additions & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ object Dependencies {

val scalaLoggingVersion = "3.9.6"

val jettyVersion = "12.1.0"
val jettyVersion = "12.1.1"
val typesafeConfigVersion = "1.4.5"
val flexmarkVersion = "0.64.8"
val logbackVersion = "1.3.15"
Expand Down Expand Up @@ -162,6 +162,8 @@ object Dependencies {

"org.eclipse.jetty" % "jetty-rewrite" % jettyVersion,
"org.eclipse.jetty.ee8.websocket" % "jetty-ee8-websocket-javax-server" % jettyVersion,
"org.eclipse.jetty.compression" % "jetty-compression-server" % jettyVersion,
"org.eclipse.jetty.compression" % "jetty-compression-gzip" % jettyVersion,

"com.typesafe" % "config" % typesafeConfigVersion,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import monix.execution.Scheduler
import org.eclipse.jetty.ee8.nested.SessionHandler
import org.eclipse.jetty.ee8.servlet.{ServletContextHandler, ServletHolder}
import org.eclipse.jetty.server.Server
import org.eclipse.jetty.server.handler.gzip.GzipHandler
import org.scalatest.BeforeAndAfterAll
import org.scalatest.concurrent.{Eventually, ScalaFutures}
import org.scalatest.time.{Millis, Seconds, Span}
Expand All @@ -31,7 +30,7 @@ class EndpointsIntegrationTest extends UdashSharedTest with UsesHttpServer with
contextHandler.setSessionHandler(new SessionHandler)
contextHandler.addServlet(holder, s"$contextPrefix/*")

server.setHandler(new GzipHandler(contextHandler.get()))
server.setHandler(contextHandler.get())
}

def futureHandle(rawHandle: RawRest.HandleRequest): RestRequest => Future[RestResponse] =
Expand Down