io.netty.handler.codec.http.HttpServerUpgradeHandler.class Maven / Gradle / Ivy
???? 2F 4io/netty/handler/codec/http/HttpServerUpgradeHandler 0io/netty/handler/codec/http/HttpObjectAggregator HttpServerUpgradeHandler.java Aio/netty/handler/codec/http/HttpServerUpgradeHandler$UpgradeEvent UpgradeEvent Hio/netty/handler/codec/http/HttpServerUpgradeHandler$UpgradeCodecFactory UpgradeCodecFactory Aio/netty/handler/codec/http/HttpServerUpgradeHandler$UpgradeCodec UpgradeCodec @io/netty/handler/codec/http/HttpServerUpgradeHandler$SourceCodec SourceCodec 6io/netty/handler/codec/http/HttpServerUpgradeHandler$1 sourceCodec BLio/netty/handler/codec/http/HttpServerUpgradeHandler$SourceCodec; upgradeCodecFactory JLio/netty/handler/codec/http/HttpServerUpgradeHandler$UpgradeCodecFactory; handlingUpgrade Z $assertionsDisabled ?(Lio/netty/handler/codec/http/HttpServerUpgradeHandler$SourceCodec;Lio/netty/handler/codec/http/HttpServerUpgradeHandler$UpgradeCodecFactory;)V ?(Lio/netty/handler/codec/http/HttpServerUpgradeHandler$SourceCodec;Lio/netty/handler/codec/http/HttpServerUpgradeHandler$UpgradeCodecFactory;I)V
this 6Lio/netty/handler/codec/http/HttpServerUpgradeHandler; (I)V "
# !io/netty/util/internal/ObjectUtil & checkNotNull 8(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object; ( )
' * , / maxContentLength I decode c(Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/HttpObject;Ljava/util/List;)V java/lang/Exception 5 7 isUpgradeRequest +(Lio/netty/handler/codec/http/HttpObject;)Z 9 :
; io/netty/util/ReferenceCountUtil = retain &(Ljava/lang/Object;)Ljava/lang/Object; ? @
> A java/util/List C add (Ljava/lang/Object;)Z E F D G +io/netty/handler/codec/http/FullHttpRequest I M(Lio/netty/channel/ChannelHandlerContext;Ljava/lang/Object;Ljava/util/List;)V 3 K
L isEmpty ()Z N O D P R size ()I T U D V java/lang/AssertionError X ()V Z
Y [ get (I)Ljava/lang/Object; ] ^ D _ upgrade X(Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/FullHttpRequest;)Z a b
c clear e Z D f fullRequest -Lio/netty/handler/codec/http/FullHttpRequest; ctx (Lio/netty/channel/ChannelHandlerContext; msg (Lio/netty/handler/codec/http/HttpObject; out $Ljava/util/List; Ljava/util/List; 'io/netty/handler/codec/http/HttpRequest q headers +()Lio/netty/handler/codec/http/HttpHeaders; s t r u +io/netty/handler/codec/http/HttpHeaderNames w UPGRADE Lio/netty/util/AsciiString; y z x { 'io/netty/handler/codec/http/HttpHeaders } ,(Ljava/lang/CharSequence;)Ljava/lang/String; ]
~ ? J u splitHeader *(Ljava/lang/CharSequence;)Ljava/util/List; ? ?
? &io/netty/channel/ChannelHandlerContext ? java/lang/CharSequence ? newUpgradeCodec ](Ljava/lang/CharSequence;)Lio/netty/handler/codec/http/HttpServerUpgradeHandler$UpgradeCodec; ? ?
?
CONNECTION ? z x ? requiredUpgradeHeaders ()Ljava/util/Collection; ? ?
? io/netty/util/AsciiString ? containsContentEqualsIgnoreCase 1(Ljava/util/Collection;Ljava/lang/CharSequence;)Z ? ?
? ? "containsAllContentEqualsIgnoreCase /(Ljava/util/Collection;Ljava/util/Collection;)Z ? ?
? ? java/util/Collection ? iterator ()Ljava/util/Iterator; ? ? ? ? java/util/Iterator ? hasNext ? O ? ? next ()Ljava/lang/Object; ? ? ? ? contains (Ljava/lang/CharSequence;)Z ? ?
~ ? createUpgradeResponse H(Ljava/lang/CharSequence;)Lio/netty/handler/codec/http/FullHttpResponse; ? ?
? ,io/netty/handler/codec/http/FullHttpResponse ? ? u prepareUpgradeResponse ?(Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/FullHttpRequest;Lio/netty/handler/codec/http/HttpHeaders;)Z ? ?
? H(Ljava/lang/CharSequence;Lio/netty/handler/codec/http/FullHttpRequest;)V ?
?
writeAndFlush 4(Ljava/lang/Object;)Lio/netty/channel/ChannelFuture; ? ? ? ?(Lio/netty/handler/codec/http/HttpServerUpgradeHandler;Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/HttpServerUpgradeHandler$UpgradeCodec;Lio/netty/handler/codec/http/FullHttpRequest;Lio/netty/handler/codec/http/HttpServerUpgradeHandler$UpgradeEvent;)V ?
? io/netty/channel/ChannelFuture ? addListener R(Lio/netty/util/concurrent/GenericFutureListener;)Lio/netty/channel/ChannelFuture; ? ? ? ? p Ljava/lang/CharSequence; c CLio/netty/handler/codec/http/HttpServerUpgradeHandler$UpgradeCodec; i requiredHeader request requestedProtocols *Ljava/util/List; numRequestedProtocols upgradeCodec upgradeProtocol connectionHeader requiredHeaders 0Ljava/util/Collection; Ljava/util/Collection; values upgradeResponse .Lio/netty/handler/codec/http/FullHttpResponse; event CLio/netty/handler/codec/http/HttpServerUpgradeHandler$UpgradeEvent; finalUpgradeCodec 3io/netty/handler/codec/http/DefaultFullHttpResponse ? 'io/netty/handler/codec/http/HttpVersion ? HTTP_1_1 )Lio/netty/handler/codec/http/HttpVersion; ? ? ? ? .io/netty/handler/codec/http/HttpResponseStatus ? SWITCHING_PROTOCOLS 0Lio/netty/handler/codec/http/HttpResponseStatus; ? ? ? ? io/netty/buffer/Unpooled ? EMPTY_BUFFER Lio/netty/buffer/ByteBuf; ? ? ? ? v(Lio/netty/handler/codec/http/HttpVersion;Lio/netty/handler/codec/http/HttpResponseStatus;Lio/netty/buffer/ByteBuf;Z)V ?
? ?
? u ,io/netty/handler/codec/http/HttpHeaderValues ? ? { U(Ljava/lang/CharSequence;Ljava/lang/Object;)Lio/netty/handler/codec/http/HttpHeaders; E ?
~ CONTENT_LENGTH z x ZERO z ? res 5Lio/netty/handler/codec/http/DefaultFullHttpResponse; java/lang/StringBuilder
length U ?
# java/util/ArrayList
# charAt (I)C ? java/lang/Character isWhitespace (C)Z
toString ()Ljava/lang/String;
setLength! "
" append (C)Ljava/lang/StringBuilder;$%
&
C header builder Ljava/lang/StringBuilder; protocols &io/netty/handler/codec/http/HttpObject. 3 4
0
access$000 z(Lio/netty/handler/codec/http/HttpServerUpgradeHandler;)Lio/netty/handler/codec/http/HttpServerUpgradeHandler$SourceCodec; x0 java/lang/Class6 desiredAssertionStatus8 O
79 Code LocalVariableTable LineNumberTable LocalVariableTypeTable
StackMapTable
Exceptions Signature w(Lio/netty/channel/ChannelHandlerContext;Lio/netty/handler/codec/http/HttpObject;Ljava/util/List;)V D(Ljava/lang/CharSequence;)Ljava/util/List;
SourceFile InnerClasses !
; J *+,? ? <