636 lines
14 KiB
Smali
636 lines
14 KiB
Smali
.class public final Lokhttp3/internal/e/f;
|
|
.super Ljava/lang/Object;
|
|
.source "Http2Codec.java"
|
|
|
|
# interfaces
|
|
.implements Lokhttp3/internal/c/c;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/internal/e/f$a;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final btC:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field private static final btD:Ljava/util/List;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/util/List<",
|
|
"Ljava/lang/String;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# instance fields
|
|
.field private final bqB:Lokhttp3/u;
|
|
|
|
.field final bsE:Lokhttp3/internal/b/g;
|
|
|
|
.field private final btE:Lokhttp3/Interceptor$Chain;
|
|
|
|
.field private final btF:Lokhttp3/internal/e/g;
|
|
|
|
.field private btG:Lokhttp3/internal/e/i;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 18
|
|
|
|
const/16 v0, 0xc
|
|
|
|
new-array v0, v0, [Ljava/lang/String;
|
|
|
|
const-string v1, "connection"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
const-string v3, "host"
|
|
|
|
const/4 v4, 0x1
|
|
|
|
aput-object v3, v0, v4
|
|
|
|
const-string v5, "keep-alive"
|
|
|
|
const/4 v6, 0x2
|
|
|
|
aput-object v5, v0, v6
|
|
|
|
const-string v7, "proxy-connection"
|
|
|
|
const/4 v8, 0x3
|
|
|
|
aput-object v7, v0, v8
|
|
|
|
const-string v9, "te"
|
|
|
|
const/4 v10, 0x4
|
|
|
|
aput-object v9, v0, v10
|
|
|
|
const-string v11, "transfer-encoding"
|
|
|
|
const/4 v12, 0x5
|
|
|
|
aput-object v11, v0, v12
|
|
|
|
const-string v13, "encoding"
|
|
|
|
const/4 v14, 0x6
|
|
|
|
aput-object v13, v0, v14
|
|
|
|
const/4 v15, 0x7
|
|
|
|
const-string v16, "upgrade"
|
|
|
|
aput-object v16, v0, v15
|
|
|
|
const/16 v16, 0x8
|
|
|
|
const-string v17, ":method"
|
|
|
|
aput-object v17, v0, v16
|
|
|
|
const/16 v16, 0x9
|
|
|
|
const-string v17, ":path"
|
|
|
|
aput-object v17, v0, v16
|
|
|
|
const/16 v16, 0xa
|
|
|
|
const-string v17, ":scheme"
|
|
|
|
aput-object v17, v0, v16
|
|
|
|
const/16 v16, 0xb
|
|
|
|
const-string v17, ":authority"
|
|
|
|
aput-object v17, v0, v16
|
|
|
|
invoke-static {v0}, Lokhttp3/internal/c;->p([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/e/f;->btC:Ljava/util/List;
|
|
|
|
const/16 v0, 0x8
|
|
|
|
new-array v0, v0, [Ljava/lang/String;
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
aput-object v3, v0, v4
|
|
|
|
aput-object v5, v0, v6
|
|
|
|
aput-object v7, v0, v8
|
|
|
|
aput-object v9, v0, v10
|
|
|
|
aput-object v11, v0, v12
|
|
|
|
aput-object v13, v0, v14
|
|
|
|
const-string v1, "upgrade"
|
|
|
|
aput-object v1, v0, v15
|
|
|
|
invoke-static {v0}, Lokhttp3/internal/c;->p([Ljava/lang/Object;)Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lokhttp3/internal/e/f;->btD:Ljava/util/List;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lokhttp3/t;Lokhttp3/Interceptor$Chain;Lokhttp3/internal/b/g;Lokhttp3/internal/e/g;)V
|
|
.locals 0
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/e/f;->btE:Lokhttp3/Interceptor$Chain;
|
|
|
|
iput-object p3, p0, Lokhttp3/internal/e/f;->bsE:Lokhttp3/internal/b/g;
|
|
|
|
iput-object p4, p0, Lokhttp3/internal/e/f;->btF:Lokhttp3/internal/e/g;
|
|
|
|
iget-object p1, p1, Lokhttp3/t;->bls:Ljava/util/List;
|
|
|
|
sget-object p2, Lokhttp3/u;->bqf:Lokhttp3/u;
|
|
|
|
invoke-interface {p1, p2}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
sget-object p1, Lokhttp3/u;->bqf:Lokhttp3/u;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sget-object p1, Lokhttp3/u;->bqe:Lokhttp3/u;
|
|
|
|
:goto_0
|
|
iput-object p1, p0, Lokhttp3/internal/e/f;->bqB:Lokhttp3/u;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final CR()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/e/f;->btF:Lokhttp3/internal/e/g;
|
|
|
|
iget-object v0, v0, Lokhttp3/internal/e/g;->btY:Lokhttp3/internal/e/j;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/e/j;->flush()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final CS()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/e/f;->btG:Lokhttp3/internal/e/i;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/e/i;->Dj()Lokio/p;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Lokio/p;->close()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final a(Lokhttp3/w;J)Lokio/p;
|
|
.locals 0
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/e/f;->btG:Lokhttp3/internal/e/i;
|
|
|
|
invoke-virtual {p1}, Lokhttp3/internal/e/i;->Dj()Lokio/p;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public final aa(Z)Lokhttp3/Response$a;
|
|
.locals 10
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/e/f;->btG:Lokhttp3/internal/e/i;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/e/i;->Di()Lokhttp3/Headers;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/e/f;->bqB:Lokhttp3/u;
|
|
|
|
new-instance v2, Lokhttp3/Headers$a;
|
|
|
|
invoke-direct {v2}, Lokhttp3/Headers$a;-><init>()V
|
|
|
|
iget-object v3, v0, Lokhttp3/Headers;->bpe:[Ljava/lang/String;
|
|
|
|
array-length v3, v3
|
|
|
|
div-int/lit8 v3, v3, 0x2
|
|
|
|
const/4 v4, 0x0
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object v6, v4
|
|
|
|
:goto_0
|
|
if-ge v5, v3, :cond_2
|
|
|
|
invoke-virtual {v0, v5}, Lokhttp3/Headers;->dk(I)Ljava/lang/String;
|
|
|
|
move-result-object v7
|
|
|
|
invoke-virtual {v0, v5}, Lokhttp3/Headers;->dl(I)Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
const-string v9, ":status"
|
|
|
|
invoke-virtual {v7, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v9
|
|
|
|
if-eqz v9, :cond_0
|
|
|
|
invoke-static {v8}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
const-string v7, "HTTP/1.1 "
|
|
|
|
invoke-virtual {v7, v6}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-static {v6}, Lokhttp3/internal/c/k;->eh(Ljava/lang/String;)Lokhttp3/internal/c/k;
|
|
|
|
move-result-object v6
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
sget-object v9, Lokhttp3/internal/e/f;->btD:Ljava/util/List;
|
|
|
|
invoke-interface {v9, v7}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v9
|
|
|
|
if-nez v9, :cond_1
|
|
|
|
sget-object v9, Lokhttp3/internal/a;->bqW:Lokhttp3/internal/a;
|
|
|
|
invoke-virtual {v9, v2, v7, v8}, Lokhttp3/internal/a;->a(Lokhttp3/Headers$a;Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_1
|
|
:goto_1
|
|
add-int/lit8 v5, v5, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
if-eqz v6, :cond_4
|
|
|
|
new-instance v0, Lokhttp3/Response$a;
|
|
|
|
invoke-direct {v0}, Lokhttp3/Response$a;-><init>()V
|
|
|
|
iput-object v1, v0, Lokhttp3/Response$a;->bqB:Lokhttp3/u;
|
|
|
|
iget v1, v6, Lokhttp3/internal/c/k;->code:I
|
|
|
|
iput v1, v0, Lokhttp3/Response$a;->code:I
|
|
|
|
iget-object v1, v6, Lokhttp3/internal/c/k;->message:Ljava/lang/String;
|
|
|
|
iput-object v1, v0, Lokhttp3/Response$a;->message:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2}, Lokhttp3/Headers$a;->BX()Lokhttp3/Headers;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lokhttp3/Response$a;->c(Lokhttp3/Headers;)Lokhttp3/Response$a;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
sget-object p1, Lokhttp3/internal/a;->bqW:Lokhttp3/internal/a;
|
|
|
|
invoke-virtual {p1, v0}, Lokhttp3/internal/a;->a(Lokhttp3/Response$a;)I
|
|
|
|
move-result p1
|
|
|
|
const/16 v1, 0x64
|
|
|
|
if-ne p1, v1, :cond_3
|
|
|
|
return-object v4
|
|
|
|
:cond_3
|
|
return-object v0
|
|
|
|
:cond_4
|
|
new-instance p1, Ljava/net/ProtocolException;
|
|
|
|
const-string v0, "Expected \':status\' header not present"
|
|
|
|
invoke-direct {p1, v0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
goto :goto_3
|
|
|
|
:goto_2
|
|
throw p1
|
|
|
|
:goto_3
|
|
goto :goto_2
|
|
.end method
|
|
|
|
.method public final c(Lokhttp3/w;)V
|
|
.locals 7
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/e/f;->btG:Lokhttp3/internal/e/i;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object v0, p1, Lokhttp3/w;->bpJ:Lokhttp3/RequestBody;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
iget-object v2, p1, Lokhttp3/w;->bpI:Lokhttp3/Headers;
|
|
|
|
new-instance v3, Ljava/util/ArrayList;
|
|
|
|
iget-object v4, v2, Lokhttp3/Headers;->bpe:[Ljava/lang/String;
|
|
|
|
array-length v4, v4
|
|
|
|
div-int/lit8 v4, v4, 0x2
|
|
|
|
add-int/lit8 v4, v4, 0x4
|
|
|
|
invoke-direct {v3, v4}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
new-instance v4, Lokhttp3/internal/e/c;
|
|
|
|
sget-object v5, Lokhttp3/internal/e/c;->bte:Lokio/ByteString;
|
|
|
|
iget-object v6, p1, Lokhttp3/w;->method:Ljava/lang/String;
|
|
|
|
invoke-direct {v4, v5, v6}, Lokhttp3/internal/e/c;-><init>(Lokio/ByteString;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
new-instance v4, Lokhttp3/internal/e/c;
|
|
|
|
sget-object v5, Lokhttp3/internal/e/c;->btf:Lokio/ByteString;
|
|
|
|
iget-object v6, p1, Lokhttp3/w;->blo:Lokhttp3/s;
|
|
|
|
invoke-static {v6}, Lokhttp3/internal/c/i;->d(Lokhttp3/s;)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-direct {v4, v5, v6}, Lokhttp3/internal/e/c;-><init>(Lokio/ByteString;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
const-string v4, "Host"
|
|
|
|
invoke-virtual {p1, v4}, Lokhttp3/w;->dt(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
new-instance v5, Lokhttp3/internal/e/c;
|
|
|
|
sget-object v6, Lokhttp3/internal/e/c;->bth:Lokio/ByteString;
|
|
|
|
invoke-direct {v5, v6, v4}, Lokhttp3/internal/e/c;-><init>(Lokio/ByteString;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v3, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_2
|
|
new-instance v4, Lokhttp3/internal/e/c;
|
|
|
|
sget-object v5, Lokhttp3/internal/e/c;->btg:Lokio/ByteString;
|
|
|
|
iget-object p1, p1, Lokhttp3/w;->blo:Lokhttp3/s;
|
|
|
|
iget-object p1, p1, Lokhttp3/s;->bph:Ljava/lang/String;
|
|
|
|
invoke-direct {v4, v5, p1}, Lokhttp3/internal/e/c;-><init>(Lokio/ByteString;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v3, v4}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
iget-object p1, v2, Lokhttp3/Headers;->bpe:[Ljava/lang/String;
|
|
|
|
array-length p1, p1
|
|
|
|
div-int/lit8 p1, p1, 0x2
|
|
|
|
:goto_1
|
|
if-ge v1, p1, :cond_4
|
|
|
|
invoke-virtual {v2, v1}, Lokhttp3/Headers;->dk(I)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
sget-object v5, Ljava/util/Locale;->US:Ljava/util/Locale;
|
|
|
|
invoke-virtual {v4, v5}, Ljava/lang/String;->toLowerCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-static {v4}, Lokio/ByteString;->eo(Ljava/lang/String;)Lokio/ByteString;
|
|
|
|
move-result-object v4
|
|
|
|
sget-object v5, Lokhttp3/internal/e/f;->btC:Ljava/util/List;
|
|
|
|
invoke-virtual {v4}, Lokio/ByteString;->DZ()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v5, v6}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v5
|
|
|
|
if-nez v5, :cond_3
|
|
|
|
new-instance v5, Lokhttp3/internal/e/c;
|
|
|
|
invoke-virtual {v2, v1}, Lokhttp3/Headers;->dl(I)Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-direct {v5, v4, v6}, Lokhttp3/internal/e/c;-><init>(Lokio/ByteString;Ljava/lang/String;)V
|
|
|
|
invoke-interface {v3, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
:cond_3
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
iget-object p1, p0, Lokhttp3/internal/e/f;->btF:Lokhttp3/internal/e/g;
|
|
|
|
invoke-virtual {p1, v3, v0}, Lokhttp3/internal/e/g;->c(Ljava/util/List;Z)Lokhttp3/internal/e/i;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/e/f;->btG:Lokhttp3/internal/e/i;
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/e/f;->btG:Lokhttp3/internal/e/i;
|
|
|
|
iget-object p1, p1, Lokhttp3/internal/e/i;->buB:Lokhttp3/internal/e/i$c;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/e/f;->btE:Lokhttp3/Interceptor$Chain;
|
|
|
|
invoke-interface {v0}, Lokhttp3/Interceptor$Chain;->Cl()I
|
|
|
|
move-result v0
|
|
|
|
int-to-long v0, v0
|
|
|
|
sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {p1, v0, v1, v2}, Lokio/r;->d(JLjava/util/concurrent/TimeUnit;)Lokio/r;
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/e/f;->btG:Lokhttp3/internal/e/i;
|
|
|
|
iget-object p1, p1, Lokhttp3/internal/e/i;->buC:Lokhttp3/internal/e/i$c;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/e/f;->btE:Lokhttp3/Interceptor$Chain;
|
|
|
|
invoke-interface {v0}, Lokhttp3/Interceptor$Chain;->Cm()I
|
|
|
|
move-result v0
|
|
|
|
int-to-long v0, v0
|
|
|
|
sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {p1, v0, v1, v2}, Lokio/r;->d(JLjava/util/concurrent/TimeUnit;)Lokio/r;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final cancel()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/e/f;->btG:Lokhttp3/internal/e/i;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
sget-object v1, Lokhttp3/internal/e/b;->bsV:Lokhttp3/internal/e/b;
|
|
|
|
invoke-virtual {v0, v1}, Lokhttp3/internal/e/i;->c(Lokhttp3/internal/e/b;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final d(Lokhttp3/Response;)Lokhttp3/x;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "Content-Type"
|
|
|
|
invoke-virtual {p1, v0}, Lokhttp3/Response;->dt(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1}, Lokhttp3/internal/c/e;->e(Lokhttp3/Response;)J
|
|
|
|
move-result-wide v1
|
|
|
|
new-instance p1, Lokhttp3/internal/e/f$a;
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/e/f;->btG:Lokhttp3/internal/e/i;
|
|
|
|
iget-object v3, v3, Lokhttp3/internal/e/i;->buz:Lokhttp3/internal/e/i$b;
|
|
|
|
invoke-direct {p1, p0, v3}, Lokhttp3/internal/e/f$a;-><init>(Lokhttp3/internal/e/f;Lokio/q;)V
|
|
|
|
new-instance v3, Lokhttp3/internal/c/h;
|
|
|
|
invoke-static {p1}, Lokio/j;->b(Lokio/q;)Lokio/d;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v3, v0, v1, v2, p1}, Lokhttp3/internal/c/h;-><init>(Ljava/lang/String;JLokio/d;)V
|
|
|
|
return-object v3
|
|
.end method
|