Class HttpCompressionHandler

java.lang.Object
io.quarkus.vertx.http.runtime.HttpCompressionHandler
All Implemented Interfaces:
io.vertx.core.Handler<io.vertx.ext.web.RoutingContext>

public class HttpCompressionHandler extends Object implements io.vertx.core.Handler<io.vertx.ext.web.RoutingContext>
A simple wrapping handler that removes the Content-Encoding: identity HTTP header if the Content-Type header is set and the value is a compressed media type as configured via HttpBuildTimeConfig.compressMediaTypes.
  • Constructor Details

    • HttpCompressionHandler

      public HttpCompressionHandler(io.vertx.core.Handler<io.vertx.ext.web.RoutingContext> routeHandler, Set<String> compressedMediaTypes)
  • Method Details

    • handle

      public void handle(io.vertx.ext.web.RoutingContext context)
      Specified by:
      handle in interface io.vertx.core.Handler<io.vertx.ext.web.RoutingContext>
    • compressIfNeeded

      public static void compressIfNeeded(io.vertx.ext.web.RoutingContext context, Set<String> compressedMediaTypes)