io.netty.handler.codec.http.HttpUtil.class Maven / Gradle / Ivy
???? 2? $io/netty/handler/codec/http/HttpUtil java/lang/Object
HttpUtil.java
EMPTY_HEADERS .Lio/netty/handler/codec/http/EmptyHttpHeaders; Ljava/lang/Deprecated; CHARSET_EQUALS Lio/netty/util/AsciiString; SEMICOLON ()V
this &Lio/netty/handler/codec/http/HttpUtil; isOriginForm (Ljava/net/URI;)Z java/net/URI getScheme ()Ljava/lang/String;
getSchemeSpecificPart
getHost
getAuthority
! uri Ljava/net/URI; isAsteriskForm * & getPath (
) java/lang/String + equals (Ljava/lang/Object;)Z - .
, / getQuery 1
2 getFragment 4
5 isKeepAlive ,(Lio/netty/handler/codec/http/HttpMessage;)Z 'io/netty/handler/codec/http/HttpMessage 9 headers +()Lio/netty/handler/codec/http/HttpHeaders; ; < : = +io/netty/handler/codec/http/HttpHeaderNames ?
CONNECTION A
@ B 'io/netty/handler/codec/http/HttpHeaders D get ,(Ljava/lang/CharSequence;)Ljava/lang/String; F G
E H ,io/netty/handler/codec/http/HttpHeaderValues J CLOSE L
K M io/netty/util/AsciiString O contentEqualsIgnoreCase (Ljava/lang/CharSequence;)Z Q R
P S java/lang/CharSequence U protocolVersion +()Lio/netty/handler/codec/http/HttpVersion; W X : Y 'io/netty/handler/codec/http/HttpVersion [ isKeepAliveDefault ()Z ] ^
\ _
KEEP_ALIVE a
K b message )Lio/netty/handler/codec/http/HttpMessage;
connection Ljava/lang/CharSequence; setKeepAlive -(Lio/netty/handler/codec/http/HttpMessage;Z)V V(Lio/netty/handler/codec/http/HttpHeaders;Lio/netty/handler/codec/http/HttpVersion;Z)V h j
k keepAlive Z remove C(Ljava/lang/CharSequence;)Lio/netty/handler/codec/http/HttpHeaders; o p
E q set U(Ljava/lang/CharSequence;Ljava/lang/Object;)Lio/netty/handler/codec/http/HttpHeaders; s t
E u h )Lio/netty/handler/codec/http/HttpHeaders; httpVersion )Lio/netty/handler/codec/http/HttpVersion; getContentLength ,(Lio/netty/handler/codec/http/HttpMessage;)J CONTENT_LENGTH }
@ ~ java/lang/Long ? parseLong (Ljava/lang/String;)J ? ?
? ? getWebSocketContentLength ,(Lio/netty/handler/codec/http/HttpMessage;)I ? ?
? java/lang/NumberFormatException ? java/lang/StringBuilder ?
? header not found: ? append -(Ljava/lang/String;)Ljava/lang/StringBuilder; ? ?
? ? -(Ljava/lang/Object;)Ljava/lang/StringBuilder; ? ?
? ? toString ?
? ? (Ljava/lang/String;)V ?
? ? value Ljava/lang/String; webSocketContentLength J -(Lio/netty/handler/codec/http/HttpMessage;J)J ignore !Ljava/lang/NumberFormatException; defaultValue -(Lio/netty/handler/codec/http/HttpMessage;I)I ??? { ?
? java/lang/Math ? min (JJ)J ? ?
? ? I 'io/netty/handler/codec/http/HttpRequest ? &io/netty/handler/codec/http/HttpMethod ? GET (Lio/netty/handler/codec/http/HttpMethod; ? ? ? ? method *()Lio/netty/handler/codec/http/HttpMethod; ? ? ? ?
? / SEC_WEBSOCKET_KEY1 ?
@ ? contains ? R
E ? SEC_WEBSOCKET_KEY2 ?
@ ? (io/netty/handler/codec/http/HttpResponse ? status 2()Lio/netty/handler/codec/http/HttpResponseStatus; ? ? ? ? .io/netty/handler/codec/http/HttpResponseStatus ? code ()I ? ?
? ? SEC_WEBSOCKET_ORIGIN ?
@ ? SEC_WEBSOCKET_LOCATION ?
@ ? req )Lio/netty/handler/codec/http/HttpRequest; res *Lio/netty/handler/codec/http/HttpResponse; setContentLength -(Lio/netty/handler/codec/http/HttpMessage;J)V valueOf (J)Ljava/lang/Long; ? ?
? ? length isContentLengthSet m is100ContinueExpected isExpectHeaderValid ? 8
? EXPECT ?
@ ? CONTINUE ?
K ?
P ? equalsIgnoreCase (Ljava/lang/String;)Z ? ?
, ? expectValue isUnsupportedExpectation HTTP_1_1 ? z \ ? compareTo ,(Lio/netty/handler/codec/http/HttpVersion;)I ? ?
\ ? set100ContinueExpected expected isTransferEncodingChunked TRANSFER_ENCODING
@ CHUNKED
K 4(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Z)Z ?
E setTransferEncodingChunked getAll *(Ljava/lang/CharSequence;)Ljava/util/List;
E java/util/List isEmpty ^ java/util/ArrayList (Ljava/util/Collection;)V
iterator ()Ljava/util/Iterator; java/util/Iterator hasNext ^! next ()Ljava/lang/Object;#$% o
' W(Ljava/lang/CharSequence;Ljava/lang/Iterable;)Lio/netty/handler/codec/http/HttpHeaders; s)
E* encodings $Ljava/util/List; Ljava/util/List; values *Ljava/util/List; valuesIt .Ljava/util/Iterator; Ljava/util/Iterator; chunked
getCharset E(Lio/netty/handler/codec/http/HttpMessage;)Ljava/nio/charset/Charset; io/netty/util/CharsetUtil7
ISO_8859_1 Ljava/nio/charset/Charset;9: 8; _(Lio/netty/handler/codec/http/HttpMessage;Ljava/nio/charset/Charset;)Ljava/nio/charset/Charset;5=
> ,java/nio/charset/UnsupportedCharsetException@ getCharsetAsSequence C(Lio/netty/handler/codec/http/HttpMessage;)Ljava/lang/CharSequence;BC
D V ? java/nio/charset/CharsetG forName .(Ljava/lang/String;)Ljava/nio/charset/Charset;IJ
HK unsupportedException .Ljava/nio/charset/UnsupportedCharsetException; defaultCharset charsetCharSequence getCharsetAsString CONTENT_TYPER
@S
U indexOfIgnoreCaseAscii 4(Ljava/lang/CharSequence;Ljava/lang/CharSequence;I)IWX
PY ? ?
P[ V[ subSequence (II)Ljava/lang/CharSequence;^_ V` indexOfEncoding indexOfCharset contentTypeValue getMimeType
f indexOfSemicolon encodeAscii0 4(Ljava/lang/CharSequence;Lio/netty/buffer/ByteBuf;)V charAt (I)Ckl Vm c2b (C)Bop
q io/netty/buffer/ByteBufs writeByte (I)Lio/netty/buffer/ByteBuf;uv
tw i seq buf Lio/netty/buffer/ByteBuf; c C ,io/netty/handler/codec/http/EmptyHttpHeaders?
? ? CHARSET?
K? =? of 5(Ljava/lang/CharSequence;)Lio/netty/util/AsciiString;??
P? ;?
Deprecated RuntimeVisibleAnnotations Code LocalVariableTable LineNumberTable
StackMapTable LocalVariableTypeTable
SourceFile 1 ? ?
? / *? ? ? ? - ? _ "*? ? *? ? *? ? *? "? ? ? ? " # $ ? 4 5 ! 4? @ % ? ? <'*? *? 0? 1*? ? **? ? #*? ? *? "? *? 3? *? 6? ? ? ? <