Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'release/0.0.11-1'

  • Loading branch information...
commit b3a4707e81cb3c01e24bf1f3c9c3bb3307c43902 2 parents 846f5f7 + 20f6598
@codahale codahale authored
View
2  pom.xml
@@ -6,7 +6,7 @@
<groupId>com.yammer</groupId>
<artifactId>dropwizard_2.9.1</artifactId>
- <version>0.0.11</version>
+ <version>0.0.11-1</version>
<name>Dropwizard for Scala ${scala.version}</name>
<properties>
View
8 src/main/scala/com/yammer/dropwizard/config/ServerFactory.scala
@@ -24,7 +24,7 @@ object ServerFactory extends Logging {
val server = makeServer(mainConnector, internalConnector)
val handlers = new HandlerCollection
- handlers.addHandler(new InstrumentedHandler(servletContext))
+ handlers.addHandler(servletContext)
handlers.addHandler(internalServletContext)
if (config("request_log.enabled").or(false)) {
handlers.addHandler(RequestLogHandlerFactory.buildHandler)
@@ -102,14 +102,16 @@ object ServerFactory extends Logging {
}
context.setConnectorNames(Array("main"))
+
+ val instrumented = new InstrumentedHandler(context)
if (config("http.gzip.enabled").or(true)) {
- val gzip = new GzipHandler(context)
+ val gzip = new GzipHandler(instrumented)
config("http.gzip.min_entity_size_bytes").asOption[Int].foreach(gzip.setMinGzipSize)
config("http.gzip.buffer_size_kilobytes").asOption[Int].foreach { n => gzip.setBufferSize(n * 1024) }
config("http.gzip.excluded_user_agents").asOption[Set[String]].foreach { s => gzip.setExcluded(s.asJava) }
config("http.gzip.mime_types").asOption[Set[String]].foreach {s => gzip.setMimeTypes(s.asJava)}
gzip
- } else context
+ } else instrumented
}
private def internalServletContext(implicit tasks: Set[Task]) = {
Please sign in to comment.
Something went wrong with that request. Please try again.