public class org.apache.tomcat.util.http.RequestUtil
  minor version: 0
  major version: 59
  flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
  this_class: org.apache.tomcat.util.http.RequestUtil
  super_class: java.lang.Object
{
  private void <init>();
    descriptor: ()V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=1, locals=1, args_size=1
        start local 0 // org.apache.tomcat.util.http.RequestUtil this
         0: .line 27
            aload 0 /* this */
            invokespecial java.lang.Object.<init>:()V
         1: .line 29
            return
        end local 0 // org.apache.tomcat.util.http.RequestUtil this
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    2     0  this  Lorg/apache/tomcat/util/http/RequestUtil;

  public static java.lang.String normalize(java.lang.String);
    descriptor: (Ljava/lang/String;)Ljava/lang/String;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=2, locals=1, args_size=1
        start local 0 // java.lang.String path
         0: .line 44
            aload 0 /* path */
            iconst_1
            invokestatic org.apache.tomcat.util.http.RequestUtil.normalize:(Ljava/lang/String;Z)Ljava/lang/String;
            areturn
        end local 0 // java.lang.String path
      LocalVariableTable:
        Start  End  Slot  Name  Signature
            0    1     0  path  Ljava/lang/String;
    MethodParameters:
      Name  Flags
      path  

  public static java.lang.String normalize(java.lang.String, boolean);
    descriptor: (Ljava/lang/String;Z)Ljava/lang/String;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=5, locals=6, args_size=2
        start local 0 // java.lang.String path
        start local 1 // boolean replaceBackSlash
         0: .line 62
            aload 0 /* path */
            ifnonnull 2
         1: .line 63
            aconst_null
            areturn
         2: .line 67
      StackMap locals:
      StackMap stack:
            aload 0 /* path */
            astore 2 /* normalized */
        start local 2 // java.lang.String normalized
         3: .line 69
            iload 1 /* replaceBackSlash */
            ifeq 5
            aload 2 /* normalized */
            bipush 92
            invokevirtual java.lang.String.indexOf:(I)I
            iflt 5
         4: .line 70
            aload 2 /* normalized */
            bipush 92
            bipush 47
            invokevirtual java.lang.String.replace:(CC)Ljava/lang/String;
            astore 2 /* normalized */
         5: .line 73
      StackMap locals: java.lang.String
      StackMap stack:
            aload 2 /* normalized */
            ldc "/"
            invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
            ifne 7
         6: .line 74
            new java.lang.StringBuilder
            dup
            ldc "/"
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            aload 2 /* normalized */
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            astore 2 /* normalized */
         7: .line 76
      StackMap locals:
      StackMap stack:
            iconst_0
            istore 3 /* addedTrailingSlash */
        start local 3 // boolean addedTrailingSlash
         8: .line 77
            aload 2 /* normalized */
            ldc "/."
            invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
            ifne 9
            aload 2 /* normalized */
            ldc "/.."
            invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
            ifeq 11
         9: .line 78
      StackMap locals: int
      StackMap stack:
            new java.lang.StringBuilder
            dup
            aload 2 /* normalized */
            invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            ldc "/"
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            astore 2 /* normalized */
        10: .line 79
            iconst_1
            istore 3 /* addedTrailingSlash */
        11: .line 84
      StackMap locals:
      StackMap stack:
            aload 2 /* normalized */
            ldc "//"
            invokevirtual java.lang.String.indexOf:(Ljava/lang/String;)I
            istore 4 /* index */
        start local 4 // int index
        12: .line 85
            iload 4 /* index */
            ifge 14
        13: .line 86
            goto 16
        14: .line 88
      StackMap locals: int
      StackMap stack:
            new java.lang.StringBuilder
            dup
            aload 2 /* normalized */
            iconst_0
            iload 4 /* index */
            invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
            invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            aload 2 /* normalized */
            iload 4 /* index */
            iconst_1
            iadd
            invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            astore 2 /* normalized */
        end local 4 // int index
        15: .line 83
            goto 11
        16: .line 93
      StackMap locals:
      StackMap stack:
            aload 2 /* normalized */
            ldc "/./"
            invokevirtual java.lang.String.indexOf:(Ljava/lang/String;)I
            istore 4 /* index */
        start local 4 // int index
        17: .line 94
            iload 4 /* index */
            ifge 19
        18: .line 95
            goto 21
        19: .line 97
      StackMap locals: int
      StackMap stack:
            new java.lang.StringBuilder
            dup
            aload 2 /* normalized */
            iconst_0
            iload 4 /* index */
            invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
            invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            aload 2 /* normalized */
            iload 4 /* index */
            iconst_2
            iadd
            invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            astore 2 /* normalized */
        end local 4 // int index
        20: .line 92
            goto 16
        21: .line 102
      StackMap locals:
      StackMap stack:
            aload 2 /* normalized */
            ldc "/../"
            invokevirtual java.lang.String.indexOf:(Ljava/lang/String;)I
            istore 4 /* index */
        start local 4 // int index
        22: .line 103
            iload 4 /* index */
            ifge 24
        23: .line 104
            goto 29
        24: .line 106
      StackMap locals: int
      StackMap stack:
            iload 4 /* index */
            ifne 26
        25: .line 107
            aconst_null
            areturn
        26: .line 109
      StackMap locals:
      StackMap stack:
            aload 2 /* normalized */
            bipush 47
            iload 4 /* index */
            iconst_1
            isub
            invokevirtual java.lang.String.lastIndexOf:(II)I
            istore 5 /* index2 */
        start local 5 // int index2
        27: .line 110
            new java.lang.StringBuilder
            dup
            aload 2 /* normalized */
            iconst_0
            iload 5 /* index2 */
            invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
            invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
            invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
            aload 2 /* normalized */
            iload 4 /* index */
            iconst_3
            iadd
            invokevirtual java.lang.String.substring:(I)Ljava/lang/String;
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            astore 2 /* normalized */
        end local 5 // int index2
        end local 4 // int index
        28: .line 101
            goto 21
        29: .line 113
      StackMap locals:
      StackMap stack:
            aload 2 /* normalized */
            invokevirtual java.lang.String.length:()I
            iconst_1
            if_icmple 31
            iload 3 /* addedTrailingSlash */
            ifeq 31
        30: .line 116
            aload 2 /* normalized */
            iconst_0
            aload 2 /* normalized */
            invokevirtual java.lang.String.length:()I
            iconst_1
            isub
            invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
            astore 2 /* normalized */
        31: .line 120
      StackMap locals:
      StackMap stack:
            aload 2 /* normalized */
            areturn
        end local 3 // boolean addedTrailingSlash
        end local 2 // java.lang.String normalized
        end local 1 // boolean replaceBackSlash
        end local 0 // java.lang.String path
      LocalVariableTable:
        Start  End  Slot                Name  Signature
            0   32     0                path  Ljava/lang/String;
            0   32     1    replaceBackSlash  Z
            3   32     2          normalized  Ljava/lang/String;
            8   32     3  addedTrailingSlash  Z
           12   15     4               index  I
           17   20     4               index  I
           22   28     4               index  I
           27   28     5              index2  I
    MethodParameters:
                  Name  Flags
      path              
      replaceBackSlash  

  public static boolean isSameOrigin(jakarta.servlet.http.HttpServletRequest, java.lang.String);
    descriptor: (Ljakarta/servlet/http/HttpServletRequest;Ljava/lang/String;)Z
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=2, locals=6, args_size=2
        start local 0 // jakarta.servlet.http.HttpServletRequest request
        start local 1 // java.lang.String origin
         0: .line 126
            new java.lang.StringBuilder
            dup
            invokespecial java.lang.StringBuilder.<init>:()V
            astore 2 /* target */
        start local 2 // java.lang.StringBuilder target
         1: .line 127
            aload 0 /* request */
            invokeinterface jakarta.servlet.http.HttpServletRequest.getScheme:()Ljava/lang/String;
            astore 3 /* scheme */
        start local 3 // java.lang.String scheme
         2: .line 128
            aload 3 /* scheme */
            ifnonnull 4
         3: .line 129
            iconst_0
            ireturn
         4: .line 131
      StackMap locals: java.lang.StringBuilder java.lang.String
      StackMap stack:
            aload 3 /* scheme */
            getstatic java.util.Locale.ENGLISH:Ljava/util/Locale;
            invokevirtual java.lang.String.toLowerCase:(Ljava/util/Locale;)Ljava/lang/String;
            astore 3 /* scheme */
         5: .line 133
            aload 2 /* target */
            aload 3 /* scheme */
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            pop
         6: .line 134
            aload 2 /* target */
            ldc "://"
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            pop
         7: .line 136
            aload 0 /* request */
            invokeinterface jakarta.servlet.http.HttpServletRequest.getServerName:()Ljava/lang/String;
            astore 4 /* host */
        start local 4 // java.lang.String host
         8: .line 137
            aload 4 /* host */
            ifnonnull 10
         9: .line 138
            iconst_0
            ireturn
        10: .line 140
      StackMap locals: java.lang.String
      StackMap stack:
            aload 2 /* target */
            aload 4 /* host */
            invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
            pop
        11: .line 142
            aload 0 /* request */
            invokeinterface jakarta.servlet.http.HttpServletRequest.getServerPort:()I
            istore 5 /* port */
        start local 5 // int port
        12: .line 145
            aload 2 /* target */
            invokevirtual java.lang.StringBuilder.length:()I
            aload 1 /* origin */
            invokevirtual java.lang.String.length:()I
            if_icmpne 20
        13: .line 149
            ldc "http"
            aload 3 /* scheme */
            invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
            ifne 14
            ldc "ws"
            aload 3 /* scheme */
            invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
            ifeq 15
      StackMap locals: int
      StackMap stack:
        14: iload 5 /* port */
            bipush 80
            if_icmpne 17
        15: .line 150
      StackMap locals:
      StackMap stack:
            ldc "https"
            aload 3 /* scheme */
            invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
            ifne 16
            ldc "wss"
            aload 3 /* scheme */
            invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
            ifeq 22
      StackMap locals:
      StackMap stack:
        16: iload 5 /* port */
            sipush 443
            if_icmpeq 22
        17: .line 151
      StackMap locals:
      StackMap stack:
            aload 2 /* target */
            bipush 58
            invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
            pop
        18: .line 152
            aload 2 /* target */
            iload 5 /* port */
            invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
            pop
        19: .line 154
            goto 22
        20: .line 159
      StackMap locals:
      StackMap stack:
            aload 2 /* target */
            bipush 58
            invokevirtual java.lang.StringBuilder.append:(C)Ljava/lang/StringBuilder;
            pop
        21: .line 160
            aload 2 /* target */
            iload 5 /* port */
            invokevirtual java.lang.StringBuilder.append:(I)Ljava/lang/StringBuilder;
            pop
        22: .line 166
      StackMap locals:
      StackMap stack:
            aload 1 /* origin */
            aload 2 /* target */
            invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
            invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
            ireturn
        end local 5 // int port
        end local 4 // java.lang.String host
        end local 3 // java.lang.String scheme
        end local 2 // java.lang.StringBuilder target
        end local 1 // java.lang.String origin
        end local 0 // jakarta.servlet.http.HttpServletRequest request
      LocalVariableTable:
        Start  End  Slot     Name  Signature
            0   23     0  request  Ljakarta/servlet/http/HttpServletRequest;
            0   23     1   origin  Ljava/lang/String;
            1   23     2   target  Ljava/lang/StringBuilder;
            2   23     3   scheme  Ljava/lang/String;
            8   23     4     host  Ljava/lang/String;
           12   23     5     port  I
    MethodParameters:
         Name  Flags
      request  
      origin   

  public static boolean isValidOrigin(java.lang.String);
    descriptor: (Ljava/lang/String;)Z
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=3, locals=2, args_size=1
        start local 0 // java.lang.String origin
         0: .line 184
            aload 0 /* origin */
            ldc "%"
            invokevirtual java.lang.String.contains:(Ljava/lang/CharSequence;)Z
            ifeq 2
         1: .line 185
            iconst_0
            ireturn
         2: .line 189
      StackMap locals:
      StackMap stack:
            ldc "null"
            aload 0 /* origin */
            invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
            ifeq 4
         3: .line 190
            iconst_1
            ireturn
         4: .line 196
      StackMap locals:
      StackMap stack:
            aload 0 /* origin */
            ldc "file://"
            invokevirtual java.lang.String.startsWith:(Ljava/lang/String;)Z
            ifeq 6
         5: .line 197
            iconst_1
            ireturn
         6: .line 202
      StackMap locals:
      StackMap stack:
            new java.net.URI
            dup
            aload 0 /* origin */
            invokespecial java.net.URI.<init>:(Ljava/lang/String;)V
            astore 1 /* originURI */
        start local 1 // java.net.URI originURI
         7: .line 203
            goto 10
        end local 1 // java.net.URI originURI
      StackMap locals:
      StackMap stack: java.net.URISyntaxException
         8: pop
         9: .line 204
            iconst_0
            ireturn
        start local 1 // java.net.URI originURI
        10: .line 207
      StackMap locals: java.net.URI
      StackMap stack:
            aload 1 /* originURI */
            invokevirtual java.net.URI.getScheme:()Ljava/lang/String;
            ifnull 11
            iconst_1
            ireturn
      StackMap locals:
      StackMap stack:
        11: iconst_0
            ireturn
        end local 1 // java.net.URI originURI
        end local 0 // java.lang.String origin
      LocalVariableTable:
        Start  End  Slot       Name  Signature
            0   12     0     origin  Ljava/lang/String;
            7    8     1  originURI  Ljava/net/URI;
           10   12     1  originURI  Ljava/net/URI;
      Exception table:
        from    to  target  type
           6     7       8  Class java.net.URISyntaxException
    MethodParameters:
        Name  Flags
      origin  
}
SourceFile: "RequestUtil.java"