io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker00.class Maven / Gradle / Ivy
???? 2b Bio/netty/handler/codec/http/websocketx/WebSocketClientHandshaker00 @io/netty/handler/codec/http/websocketx/WebSocketClientHandshaker WebSocketClientHandshaker00.java WEBSOCKET Lio/netty/util/AsciiString; expectedChallengeResponseBytes Lio/netty/buffer/ByteBuf; ?(Ljava/net/URI;Lio/netty/handler/codec/http/websocketx/WebSocketVersion;Ljava/lang/String;Lio/netty/handler/codec/http/HttpHeaders;I)V
this DLio/netty/handler/codec/http/websocketx/WebSocketClientHandshaker00; webSocketURL Ljava/net/URI; version 9Lio/netty/handler/codec/http/websocketx/WebSocketVersion; subprotocol Ljava/lang/String;
customHeaders )Lio/netty/handler/codec/http/HttpHeaders; maxFramePayloadLength I newHandshakeRequest /()Lio/netty/handler/codec/http/FullHttpRequest; 4io/netty/handler/codec/http/websocketx/WebSocketUtil randomNumber (II)I
??? java/lang/Integer # toString (I)Ljava/lang/String; % &
$ ' insertRandomCharacters &(Ljava/lang/String;)Ljava/lang/String; ) *
+ insertSpaces '(Ljava/lang/String;I)Ljava/lang/String; - .
/ randomBytes (I)[B 1 2
3 java/nio/ByteBuffer 5 allocate (I)Ljava/nio/ByteBuffer; 7 8
6 9 putInt ; 8
6 < array ()[B > ?
6 @ java/lang/System B arraycopy *(Ljava/lang/Object;ILjava/lang/Object;II)V D E
C F md5 ([B)[B H I
J io/netty/buffer/Unpooled L
wrappedBuffer ([B)Lio/netty/buffer/ByteBuf; N O
M P R uri ()Ljava/net/URI; T U
V rawPath "(Ljava/net/URI;)Ljava/lang/String; X Y
Z
websocketPort (Ljava/net/URI;)I \ ]
^ java/net/URI ` getHost ()Ljava/lang/String; b c
a d 2io/netty/handler/codec/http/DefaultFullHttpRequest f 'io/netty/handler/codec/http/HttpVersion h HTTP_1_1 )Lio/netty/handler/codec/http/HttpVersion; j k i l &io/netty/handler/codec/http/HttpMethod n GET (Lio/netty/handler/codec/http/HttpMethod; p q o r f(Lio/netty/handler/codec/http/HttpVersion;Lio/netty/handler/codec/http/HttpMethod;Ljava/lang/String;)V
t
g u +io/netty/handler/codec/http/FullHttpRequest w headers +()Lio/netty/handler/codec/http/HttpHeaders; y z x { +io/netty/handler/codec/http/HttpHeaderNames } UPGRADE ~ ? ? 'io/netty/handler/codec/http/HttpHeaders ? add U(Ljava/lang/CharSequence;Ljava/lang/Object;)Lio/netty/handler/codec/http/HttpHeaders; ? ?
? ?
CONNECTION ? ~ ? ,io/netty/handler/codec/http/HttpHeaderValues ? ? ? HOST ? ~ ? websocketHostValue ((Ljava/net/URI;)Ljava/lang/CharSequence; ? ?
? ORIGIN ? ~ ? websocketOriginValue -(Ljava/lang/String;I)Ljava/lang/CharSequence; ? ?
? SEC_WEBSOCKET_KEY1 ? ~ ? SEC_WEBSOCKET_KEY2 ? ~ ? expectedSubprotocol ? c
? java/lang/String ? isEmpty ()Z ? ?
? ? SEC_WEBSOCKET_PROTOCOL ? ~ ? [B ? ? T(Lio/netty/handler/codec/http/HttpHeaders;)Lio/netty/handler/codec/http/HttpHeaders; ? ?
? ? CONTENT_LENGTH ? ~ ? valueOf (I)Ljava/lang/Integer; ? ?
$ ? set ? ?
? ? content ()Lio/netty/buffer/ByteBuf; ? ? x ? io/netty/buffer/ByteBuf ?
writeBytes ? O
? ? spaces1 spaces2 max1 max2 number1 number2 product1 product2 key1 key2 key3 buffer Ljava/nio/ByteBuffer; number1Array number2Array challenge wsURL path wsPort host request -Lio/netty/handler/codec/http/FullHttpRequest; verify 1(Lio/netty/handler/codec/http/FullHttpResponse;)V .io/netty/handler/codec/http/HttpResponseStatus ? WebSocket Protocol Handshake ? (ILjava/lang/String;)V
?
? ? ,io/netty/handler/codec/http/FullHttpResponse ? status 2()Lio/netty/handler/codec/http/HttpResponseStatus; ? ? ? ? equals (Ljava/lang/Object;)Z ? ?
? ? Bio/netty/handler/codec/http/websocketx/WebSocketHandshakeException ? java/lang/StringBuilder ? ()V
?
? ? &Invalid handshake response getStatus: ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ?
? % c
? (Ljava/lang/String;)V
? ? { get ,(Ljava/lang/CharSequence;)Ljava/lang/String;
? io/netty/util/AsciiString
contentEqualsIgnoreCase (Ljava/lang/CharSequence;)Z
$Invalid handshake response upgrade: java/lang/CharSequence
containsValue 4(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Z)Z
? 'Invalid handshake response connection: ? ?
? ? Invalid challenge response .Lio/netty/handler/codec/http/FullHttpResponse; 0Lio/netty/handler/codec/http/HttpResponseStatus; upgrade Ljava/lang/CharSequence; [C& java/lang/Math( random ()D*+
),@_? @@? length ()I23
?4 substring (II)Ljava/lang/String;67
?86 &
?: (C)Ljava/lang/StringBuilder; ?<
?= rand split part1 part2 i key count randomChars randCount spaces newWebsocketDecoder @()Lio/netty/handler/codec/http/websocketx/WebSocketFrameDecoder; >io/netty/handler/codec/http/websocketx/WebSocket00FrameDecoderK 3
M (I)V
O
LP newWebSocketEncoder @()Lio/netty/handler/codec/http/websocketx/WebSocketFrameEncoder; >io/netty/handler/codec/http/websocketx/WebSocket00FrameEncoderT
U ? WebSocketX (Ljava/lang/CharSequence;)V
Z
[ Code LocalVariableTable LineNumberTable
StackMapTable
SourceFile !
] l *+,-?
? ^ > _
C D ] ? ?? !<? !="l>"l6? !6? !6h6h6? (: ? (:
? ,:
? ,:
? 0:
? 0:
? 4:? ::? =W? A:
? ::? =W? A:?:
? G? G? G*? K? Q? S*? W:? [:? _6? e:? gY? m? s? v:? | :? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ? ? ?? ?
? ?W*? ?:? ? ?? ? ?? ?W*? ??
*? ?? ?W? ??? ?? ?W? ? ? ?W? ^ ? ? | ? u ? p ? j ? c ? ([ ? .U ? 4O ? ;H ? BA ?
g ? ? m ? ? | ? ?
? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? y ; H ? _ ? . [ \ ^ _ a b ( d . e 4 g ; h B j I k P m X n ` p g r m s u t | u ? v ? w ? y ? z ? { ? | ? } ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?) ?1 ?5 ?; ?H ?S ?Z ?d ?s ?? ?` = ?S ? ? ? 6 ? ? ? a ? ? x ? ? ? ? ] o ?? ?Ye? ?M+? ? ,? ? #? ?Y? ?Y? ??? ?+? ? ????+? N-? ??:? ??? ? ?Y? ?Y? ?? ?????-? ?? ??? %? ?Y? ?Y? ?? ?-? ??? ????+? :*? S?? ? ?Y ??? ^ > ? ?!" ? ?# @ ? y I x$% ? ? _ : ? ? ? 9 ? @ ? I ? T ? q ? ? ? ? ? ? ? ? ? ? ? ?` ? 9 ?? 7 ?/? ?
) * ] f ?? !<?M>? 9?-.k0c?6!?
/? :? ~? ,?U????6? @*?5? !6*?9:*?;:? ?Y? ?? ?,4?>? ??K????*? ^ \ %? [ -@ d $A l B K CC ?D ?E ?F&