855 lines
20 KiB
Smali
855 lines
20 KiB
Smali
.class public final Lokhttp3/internal/d/a;
|
|
.super Ljava/lang/Object;
|
|
.source "Http1Codec.java"
|
|
|
|
# interfaces
|
|
.implements Lokhttp3/internal/c/c;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/internal/d/a$f;,
|
|
Lokhttp3/internal/d/a$c;,
|
|
Lokhttp3/internal/d/a$e;,
|
|
Lokhttp3/internal/d/a$a;,
|
|
Lokhttp3/internal/d/a$b;,
|
|
Lokhttp3/internal/d/a$d;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field final bsc:Lokhttp3/t;
|
|
|
|
.field final btU:Lokio/BufferedSink;
|
|
|
|
.field private buC:J
|
|
|
|
.field final buy:Lokhttp3/internal/b/g;
|
|
|
|
.field final lY:Lokio/d;
|
|
|
|
.field state:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(Lokhttp3/t;Lokhttp3/internal/b/g;Lokio/d;Lokio/BufferedSink;)V
|
|
.locals 2
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
iput v0, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
const-wide/32 v0, 0x40000
|
|
|
|
iput-wide v0, p0, Lokhttp3/internal/d/a;->buC:J
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/d/a;->bsc:Lokhttp3/t;
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/d/a;->buy:Lokhttp3/internal/b/g;
|
|
|
|
iput-object p3, p0, Lokhttp3/internal/d/a;->lY:Lokio/d;
|
|
|
|
iput-object p4, p0, Lokhttp3/internal/d/a;->btU:Lokio/BufferedSink;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private Gl()Ljava/lang/String;
|
|
.locals 5
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/d/a;->lY:Lokio/d;
|
|
|
|
iget-wide v1, p0, Lokhttp3/internal/d/a;->buC:J
|
|
|
|
invoke-interface {v0, v1, v2}, Lokio/d;->ay(J)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
iget-wide v1, p0, Lokhttp3/internal/d/a;->buC:J
|
|
|
|
invoke-virtual {v0}, Ljava/lang/String;->length()I
|
|
|
|
move-result v3
|
|
|
|
int-to-long v3, v3
|
|
|
|
sub-long/2addr v1, v3
|
|
|
|
iput-wide v1, p0, Lokhttp3/internal/d/a;->buC:J
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method static a(Lokio/g;)V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokio/g;->byP:Lokio/s;
|
|
|
|
sget-object v1, Lokio/s;->bzi:Lokio/s;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
iput-object v1, p0, Lokio/g;->byP:Lokio/s;
|
|
|
|
invoke-virtual {v0}, Lokio/s;->HG()Lokio/s;
|
|
|
|
invoke-virtual {v0}, Lokio/s;->HF()Lokio/s;
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
new-instance p0, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v0, "delegate == null"
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final Gj()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/d/a;->btU:Lokio/BufferedSink;
|
|
|
|
invoke-interface {v0}, Lokio/BufferedSink;->flush()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final Gk()V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/d/a;->btU:Lokio/BufferedSink;
|
|
|
|
invoke-interface {v0}, Lokio/BufferedSink;->flush()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final Gm()Lokhttp3/Headers;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
new-instance v0, Lokhttp3/Headers$a;
|
|
|
|
invoke-direct {v0}, Lokhttp3/Headers$a;-><init>()V
|
|
|
|
:goto_0
|
|
invoke-direct {p0}, Lokhttp3/internal/d/a;->Gl()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
sget-object v2, Lokhttp3/internal/a;->bsQ:Lokhttp3/internal/a;
|
|
|
|
invoke-virtual {v2, v0, v1}, Lokhttp3/internal/a;->a(Lokhttp3/Headers$a;Ljava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
invoke-virtual {v0}, Lokhttp3/Headers$a;->Fm()Lokhttp3/Headers;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final Y(Z)Lokhttp3/Response$a;
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget v0, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
const/4 v1, 0x3
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eq v0, v2, :cond_1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "state: "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget v1, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
:try_start_0
|
|
invoke-direct {p0}, Lokhttp3/internal/d/a;->Gl()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Lokhttp3/internal/c/k;->ec(Ljava/lang/String;)Lokhttp3/internal/c/k;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v2, Lokhttp3/Response$a;
|
|
|
|
invoke-direct {v2}, Lokhttp3/Response$a;-><init>()V
|
|
|
|
iget-object v3, v0, Lokhttp3/internal/c/k;->bsw:Lokhttp3/u;
|
|
|
|
iput-object v3, v2, Lokhttp3/Response$a;->bsw:Lokhttp3/u;
|
|
|
|
iget v3, v0, Lokhttp3/internal/c/k;->code:I
|
|
|
|
iput v3, v2, Lokhttp3/Response$a;->code:I
|
|
|
|
iget-object v3, v0, Lokhttp3/internal/c/k;->message:Ljava/lang/String;
|
|
|
|
iput-object v3, v2, Lokhttp3/Response$a;->message:Ljava/lang/String;
|
|
|
|
invoke-virtual {p0}, Lokhttp3/internal/d/a;->Gm()Lokhttp3/Headers;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v3}, Lokhttp3/Response$a;->c(Lokhttp3/Headers;)Lokhttp3/Response$a;
|
|
|
|
move-result-object v2
|
|
|
|
const/16 v3, 0x64
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
iget p1, v0, Lokhttp3/internal/c/k;->code:I
|
|
|
|
if-ne p1, v3, :cond_2
|
|
|
|
const/4 p1, 0x0
|
|
|
|
return-object p1
|
|
|
|
:cond_2
|
|
iget p1, v0, Lokhttp3/internal/c/k;->code:I
|
|
|
|
if-ne p1, v3, :cond_3
|
|
|
|
iput v1, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
return-object v2
|
|
|
|
:cond_3
|
|
const/4 p1, 0x4
|
|
|
|
iput p1, p0, Lokhttp3/internal/d/a;->state:I
|
|
:try_end_0
|
|
.catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return-object v2
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
new-instance v0, Ljava/io/IOException;
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v2, "unexpected end of stream on "
|
|
|
|
invoke-direct {v1, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/d/a;->buy:Lokhttp3/internal/b/g;
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {v0, v1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, p1}, Ljava/io/IOException;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final a(Lokhttp3/w;J)Lokio/q;
|
|
.locals 5
|
|
|
|
const-string v0, "Transfer-Encoding"
|
|
|
|
invoke-virtual {p1, v0}, Lokhttp3/w;->dp(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
const-string v0, "chunked"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result p1
|
|
|
|
const-string v0, "state: "
|
|
|
|
const/4 v1, 0x2
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
iget p1, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
if-ne p1, v2, :cond_0
|
|
|
|
iput v1, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
new-instance p1, Lokhttp3/internal/d/a$b;
|
|
|
|
invoke-direct {p1, p0}, Lokhttp3/internal/d/a$b;-><init>(Lokhttp3/internal/d/a;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget p3, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_1
|
|
const-wide/16 v3, -0x1
|
|
|
|
cmp-long p1, p2, v3
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
iget p1, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
if-ne p1, v2, :cond_2
|
|
|
|
iput v1, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
new-instance p1, Lokhttp3/internal/d/a$d;
|
|
|
|
invoke-direct {p1, p0, p2, p3}, Lokhttp3/internal/d/a$d;-><init>(Lokhttp3/internal/d/a;J)V
|
|
|
|
return-object p1
|
|
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget p3, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_3
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p2, "Cannot stream a request body without chunked encoding or a known content length!"
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final a(Lokhttp3/Headers;Ljava/lang/String;)V
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget v0, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/d/a;->btU:Lokio/BufferedSink;
|
|
|
|
invoke-interface {v0, p2}, Lokio/BufferedSink;->ej(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "\r\n"
|
|
|
|
invoke-interface {p2, v0}, Lokio/BufferedSink;->ej(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
const/4 p2, 0x0
|
|
|
|
iget-object v1, p1, Lokhttp3/Headers;->bqX:[Ljava/lang/String;
|
|
|
|
array-length v1, v1
|
|
|
|
div-int/lit8 v1, v1, 0x2
|
|
|
|
:goto_0
|
|
if-ge p2, v1, :cond_0
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/d/a;->btU:Lokio/BufferedSink;
|
|
|
|
invoke-virtual {p1, p2}, Lokhttp3/Headers;->de(I)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Lokio/BufferedSink;->ej(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
move-result-object v2
|
|
|
|
const-string v3, ": "
|
|
|
|
invoke-interface {v2, v3}, Lokio/BufferedSink;->ej(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {p1, p2}, Lokhttp3/Headers;->df(I)Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v2, v3}, Lokio/BufferedSink;->ej(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v2, v0}, Lokio/BufferedSink;->ej(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
add-int/lit8 p2, p2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object p1, p0, Lokhttp3/internal/d/a;->btU:Lokio/BufferedSink;
|
|
|
|
invoke-interface {p1, v0}, Lokio/BufferedSink;->ej(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
const/4 p1, 0x1
|
|
|
|
iput p1, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
return-void
|
|
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "state: "
|
|
|
|
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget v0, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
goto :goto_2
|
|
|
|
:goto_1
|
|
throw p1
|
|
|
|
:goto_2
|
|
goto :goto_1
|
|
.end method
|
|
|
|
.method public final ar(J)Lokio/r;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget v0, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
const/4 v1, 0x4
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x5
|
|
|
|
iput v0, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
new-instance v0, Lokhttp3/internal/d/a$e;
|
|
|
|
invoke-direct {v0, p0, p1, p2}, Lokhttp3/internal/d/a$e;-><init>(Lokhttp3/internal/d/a;J)V
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "state: "
|
|
|
|
invoke-direct {p2, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget v0, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
invoke-virtual {p2, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final c(Lokhttp3/w;)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/d/a;->buy:Lokhttp3/internal/b/g;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/b/g;->Gg()Lokhttp3/internal/b/c;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v0, v0, Lokhttp3/internal/b/c;->btQ:Lokhttp3/y;
|
|
|
|
iget-object v0, v0, Lokhttp3/y;->bnm:Ljava/net/Proxy;
|
|
|
|
invoke-virtual {v0}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
iget-object v2, p1, Lokhttp3/w;->bsl:Ljava/lang/String;
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 v2, 0x20
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v2, p1, Lokhttp3/w;->bnf:Lokhttp3/s;
|
|
|
|
invoke-virtual {v2}, Lokhttp3/s;->Fo()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_0
|
|
|
|
sget-object v2, Ljava/net/Proxy$Type;->HTTP:Ljava/net/Proxy$Type;
|
|
|
|
if-ne v0, v2, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, p1, Lokhttp3/w;->bnf:Lokhttp3/s;
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object v0, p1, Lokhttp3/w;->bnf:Lokhttp3/s;
|
|
|
|
invoke-static {v0}, Lokhttp3/internal/c/i;->d(Lokhttp3/s;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
:goto_1
|
|
const-string v0, " HTTP/1.1"
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object p1, p1, Lokhttp3/w;->brC:Lokhttp3/Headers;
|
|
|
|
invoke-virtual {p0, p1, v0}, Lokhttp3/internal/d/a;->a(Lokhttp3/Headers;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final cancel()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/d/a;->buy:Lokhttp3/internal/b/g;
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/b/g;->Gg()Lokhttp3/internal/b/c;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
iget-object v0, v0, Lokhttp3/internal/b/c;->btR:Ljava/net/Socket;
|
|
|
|
invoke-static {v0}, Lokhttp3/internal/c;->a(Ljava/net/Socket;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public final e(Lokhttp3/Response;)Lokhttp3/x;
|
|
.locals 9
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
const-string v0, "Content-Type"
|
|
|
|
invoke-virtual {p1, v0}, Lokhttp3/Response;->dP(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1}, Lokhttp3/internal/c/e;->g(Lokhttp3/Response;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const-wide/16 v1, 0x0
|
|
|
|
invoke-virtual {p0, v1, v2}, Lokhttp3/internal/d/a;->ar(J)Lokio/r;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v3, Lokhttp3/internal/c/h;
|
|
|
|
invoke-static {p1}, Lokio/j;->b(Lokio/r;)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
|
|
|
|
:cond_0
|
|
const-string v1, "Transfer-Encoding"
|
|
|
|
invoke-virtual {p1, v1}, Lokhttp3/Response;->dP(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "chunked"
|
|
|
|
invoke-virtual {v2, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
const-string v2, "state: "
|
|
|
|
const/4 v3, 0x5
|
|
|
|
const/4 v4, 0x4
|
|
|
|
const-wide/16 v5, -0x1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
iget-object p1, p1, Lokhttp3/Response;->bsv:Lokhttp3/w;
|
|
|
|
iget-object p1, p1, Lokhttp3/w;->bnf:Lokhttp3/s;
|
|
|
|
iget v1, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
if-ne v1, v4, :cond_1
|
|
|
|
iput v3, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
new-instance v1, Lokhttp3/internal/d/a$c;
|
|
|
|
invoke-direct {v1, p0, p1}, Lokhttp3/internal/d/a$c;-><init>(Lokhttp3/internal/d/a;Lokhttp3/s;)V
|
|
|
|
new-instance p1, Lokhttp3/internal/c/h;
|
|
|
|
invoke-static {v1}, Lokio/j;->b(Lokio/r;)Lokio/d;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {p1, v0, v5, v6, v1}, Lokhttp3/internal/c/h;-><init>(Ljava/lang/String;JLokio/d;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget v1, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_2
|
|
invoke-static {p1}, Lokhttp3/internal/c/e;->f(Lokhttp3/Response;)J
|
|
|
|
move-result-wide v7
|
|
|
|
cmp-long p1, v7, v5
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
invoke-virtual {p0, v7, v8}, Lokhttp3/internal/d/a;->ar(J)Lokio/r;
|
|
|
|
move-result-object p1
|
|
|
|
new-instance v1, Lokhttp3/internal/c/h;
|
|
|
|
invoke-static {p1}, Lokio/j;->b(Lokio/r;)Lokio/d;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v1, v0, v7, v8, p1}, Lokhttp3/internal/c/h;-><init>(Ljava/lang/String;JLokio/d;)V
|
|
|
|
return-object v1
|
|
|
|
:cond_3
|
|
new-instance p1, Lokhttp3/internal/c/h;
|
|
|
|
iget v1, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
if-ne v1, v4, :cond_5
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/d/a;->buy:Lokhttp3/internal/b/g;
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
iput v3, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
invoke-virtual {v1}, Lokhttp3/internal/b/g;->Gh()V
|
|
|
|
new-instance v1, Lokhttp3/internal/d/a$f;
|
|
|
|
invoke-direct {v1, p0}, Lokhttp3/internal/d/a$f;-><init>(Lokhttp3/internal/d/a;)V
|
|
|
|
invoke-static {v1}, Lokio/j;->b(Lokio/r;)Lokio/d;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-direct {p1, v0, v5, v6, v1}, Lokhttp3/internal/c/h;-><init>(Ljava/lang/String;JLokio/d;)V
|
|
|
|
return-object p1
|
|
|
|
:cond_4
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v0, "streamAllocation == null"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_5
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0, v2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget v1, p0, Lokhttp3/internal/d/a;->state:I
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|