Class RoutingUtils

java.lang.Object
io.quarkus.vertx.http.runtime.RoutingUtils

public final class RoutingUtils extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    compressIfNeeded(VertxHttpBuildTimeConfig config, Set<String> compressMediaTypes, io.vertx.ext.web.RoutingContext ctx, String path)
    Enabled compression by removing CONTENT_ENCODING header as specified in Vert.x when the media-type should be compressed and config enable compression.
    static String
    getNormalizedAndDecodedPath(io.vertx.ext.web.RoutingContext ctx)
    Get the normalized and decoded path: - normalize based on RFC3986 - convert % encoded characters to their non encoded form (using URIDecoder.decodeURIComponent(java.lang.String)) - invalid if the path contains '?' (query section of the path)
    static String
    resolvePath(io.vertx.ext.web.RoutingContext ctx)
    Normalize and decode the path then strip the mount point from it

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getNormalizedAndDecodedPath

      public static String getNormalizedAndDecodedPath(io.vertx.ext.web.RoutingContext ctx)
      Get the normalized and decoded path: - normalize based on RFC3986 - convert % encoded characters to their non encoded form (using URIDecoder.decodeURIComponent(java.lang.String)) - invalid if the path contains '?' (query section of the path)
      Parameters:
      ctx - the RoutingContext
      Returns:
      the normalized and decoded path or null if not valid
    • resolvePath

      public static String resolvePath(io.vertx.ext.web.RoutingContext ctx)
      Normalize and decode the path then strip the mount point from it
      Parameters:
      ctx - the RoutingContext
      Returns:
      the normalized and decoded path without the mount point or null if not valid
    • compressIfNeeded

      public static void compressIfNeeded(VertxHttpBuildTimeConfig config, Set<String> compressMediaTypes, io.vertx.ext.web.RoutingContext ctx, String path)
      Enabled compression by removing CONTENT_ENCODING header as specified in Vert.x when the media-type should be compressed and config enable compression.
      Parameters:
      config -
      compressMediaTypes -
      ctx -
      path -