b.smali

.class public final Lokhttp3/internal/b/b;
.super Ljava/lang/Object;
.source "CallServerInterceptor.java"

# interfaces
.implements Lokhttp3/ab;


# instance fields
.field private final bwi:Z


# direct methods
.method public constructor <init>(Z)V
    .registers 2

    .prologue
    .line 36
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 37
    iput-boolean p1, p0, Lokhttp3/internal/b/b;->bwi:Z

    .line 38
    return-void
.end method


# virtual methods
.method public final a(Lokhttp3/ac;)Lokhttp3/ao;
    .registers 13

    .prologue
    const/4 v10, 0x0

    .line 41
    check-cast p1, Lokhttp3/internal/b/h;

    .line 1105
    iget-object v2, p1, Lokhttp3/internal/b/h;->bXy:Lokhttp3/internal/b/d;

    .line 2101
    iget-object v3, p1, Lokhttp3/internal/b/h;->bXx:Lokhttp3/internal/connection/g;

    .line 3067
    iget-object v0, p1, Lokhttp3/internal/b/h;->bXt:Lokhttp3/internal/connection/c;

    .line 44
    check-cast v0, Lokhttp3/internal/connection/c;

    .line 3117
    iget-object v4, p1, Lokhttp3/internal/b/h;->bWI:Lokhttp3/al;

    .line 47
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v6

    .line 49
    invoke-static {}, Lokhttp3/u;->QS()V

    .line 50
    invoke-interface {v2, v4}, Lokhttp3/internal/b/d;->c(Lokhttp3/al;)V

    .line 51
    invoke-static {}, Lokhttp3/u;->QT()V

    .line 53
    const/4 v1, 0x0

    .line 4050
    iget-object v5, v4, Lokhttp3/al;->method:Ljava/lang/String;

    .line 54
    invoke-static {v5}, Lokhttp3/internal/b/g;->gi(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_135

    .line 4066
    iget-object v5, v4, Lokhttp3/al;->body:Lokhttp3/an;

    .line 54
    if-eqz v5, :cond_135

    .line 58
    const-string v5, "100-continue"

    const-string v8, "Expect"

    invoke-virtual {v4, v8}, Lokhttp3/al;->gd(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    invoke-virtual {v5, v8}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v5

    if-eqz v5, :cond_40

    .line 59
    invoke-interface {v2}, Lokhttp3/internal/b/d;->RL()V

    .line 60
    invoke-static {}, Lokhttp3/u;->QW()V

    .line 61
    const/4 v1, 0x1

    invoke-interface {v2, v1}, Lokhttp3/internal/b/d;->bm(Z)Lokhttp3/ap;

    move-result-object v1

    .line 64
    :cond_40
    if-nez v1, :cond_119

    .line 66
    invoke-static {}, Lokhttp3/u;->QU()V

    .line 5066
    iget-object v0, v4, Lokhttp3/al;->body:Lokhttp3/an;

    .line 67
    invoke-virtual {v0}, Lokhttp3/an;->contentLength()J

    move-result-wide v8

    .line 68
    new-instance v0, Lokhttp3/internal/b/c;

    .line 69
    invoke-interface {v2, v4, v8, v9}, Lokhttp3/internal/b/d;->a(Lokhttp3/al;J)Lokio/r;

    move-result-object v5

    invoke-direct {v0, v5}, Lokhttp3/internal/b/c;-><init>(Lokio/r;)V

    .line 70
    invoke-static {v0}, Lokio/m;->c(Lokio/r;)Lokio/e;

    move-result-object v0

    .line 6066
    iget-object v5, v4, Lokhttp3/al;->body:Lokhttp3/an;

    .line 72
    invoke-virtual {v5, v0}, Lokhttp3/an;->writeTo(Lokio/e;)V

    .line 73
    invoke-interface {v0}, Lokio/e;->close()V

    .line 75
    invoke-static {}, Lokhttp3/u;->QV()V

    move-object v0, v1

    .line 84
    :goto_64
    invoke-interface {v2}, Lokhttp3/internal/b/d;->HP()V

    .line 86
    if-nez v0, :cond_70

    .line 87
    invoke-static {}, Lokhttp3/u;->QW()V

    .line 88
    invoke-interface {v2, v10}, Lokhttp3/internal/b/d;->bm(Z)Lokhttp3/ap;

    move-result-object v0

    .line 6332
    :cond_70
    iput-object v4, v0, Lokhttp3/ap;->bWI:Lokhttp3/al;

    .line 93
    invoke-virtual {v3}, Lokhttp3/internal/connection/g;->RJ()Lokhttp3/internal/connection/c;

    move-result-object v1

    .line 6560
    iget-object v1, v1, Lokhttp3/internal/connection/c;->bWK:Lokhttp3/y;

    .line 7352
    iput-object v1, v0, Lokhttp3/ap;->bWK:Lokhttp3/y;

    .line 7427
    iput-wide v6, v0, Lokhttp3/ap;->bWP:J

    .line 95
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v8

    .line 7432
    iput-wide v8, v0, Lokhttp3/ap;->bWQ:J

    .line 96
    invoke-virtual {v0}, Lokhttp3/ap;->RB()Lokhttp3/ao;

    move-result-object v1

    .line 8098
    iget v0, v1, Lokhttp3/ao;->code:I

    .line 99
    const/16 v5, 0x64

    if-ne v0, v5, :cond_a8

    .line 102
    invoke-interface {v2, v10}, Lokhttp3/internal/b/d;->bm(Z)Lokhttp3/ap;

    move-result-object v0

    .line 8332
    iput-object v4, v0, Lokhttp3/ap;->bWI:Lokhttp3/al;

    .line 106
    invoke-virtual {v3}, Lokhttp3/internal/connection/g;->RJ()Lokhttp3/internal/connection/c;

    move-result-object v1

    .line 8560
    iget-object v1, v1, Lokhttp3/internal/connection/c;->bWK:Lokhttp3/y;

    .line 9352
    iput-object v1, v0, Lokhttp3/ap;->bWK:Lokhttp3/y;

    .line 9427
    iput-wide v6, v0, Lokhttp3/ap;->bWP:J

    .line 108
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    .line 9432
    iput-wide v4, v0, Lokhttp3/ap;->bWQ:J

    .line 109
    invoke-virtual {v0}, Lokhttp3/ap;->RB()Lokhttp3/ao;

    move-result-object v1

    .line 10098
    iget v0, v1, Lokhttp3/ao;->code:I

    .line 115
    :cond_a8
    invoke-static {}, Lokhttp3/u;->QX()V

    .line 117
    iget-boolean v4, p0, Lokhttp3/internal/b/b;->bwi:Z

    if-eqz v4, :cond_125

    const/16 v4, 0x65

    if-ne v0, v4, :cond_125

    .line 119
    invoke-virtual {v1}, Lokhttp3/ao;->RA()Lokhttp3/ap;

    move-result-object v1

    sget-object v2, Lokhttp3/internal/c;->bWX:Lokhttp3/aq;

    .line 10386
    iput-object v2, v1, Lokhttp3/ap;->bWL:Lokhttp3/aq;

    .line 121
    invoke-virtual {v1}, Lokhttp3/ap;->RB()Lokhttp3/ao;

    move-result-object v1

    .line 128
    :goto_bf
    const-string v2, "close"

    .line 12086
    iget-object v4, v1, Lokhttp3/ao;->bWI:Lokhttp3/al;

    .line 128
    const-string v5, "Connection"

    invoke-virtual {v4, v5}, Lokhttp3/al;->gd(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-nez v2, :cond_dd

    const-string v2, "close"

    const-string v4, "Connection"

    .line 129
    invoke-virtual {v1, v4}, Lokhttp3/ao;->gd(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v4}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z

    move-result v2

    if-eqz v2, :cond_e0

    .line 130
    :cond_dd
    invoke-virtual {v3}, Lokhttp3/internal/connection/g;->RK()V

    .line 133
    :cond_e0
    const/16 v2, 0xcc

    if-eq v0, v2, :cond_e8

    const/16 v2, 0xcd

    if-ne v0, v2, :cond_134

    .line 12177
    :cond_e8
    iget-object v2, v1, Lokhttp3/ao;->bWL:Lokhttp3/aq;

    .line 133
    invoke-virtual {v2}, Lokhttp3/aq;->contentLength()J

    move-result-wide v2

    const-wide/16 v4, 0x0

    cmp-long v2, v2, v4

    if-lez v2, :cond_134

    .line 134
    new-instance v2, Ljava/net/ProtocolException;

    new-instance v3, Ljava/lang/StringBuilder;

    const-string v4, "HTTP "

    invoke-direct {v3, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v0

    const-string v3, " had non-zero Content-Length: "

    invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v0

    .line 13177
    iget-object v1, v1, Lokhttp3/ao;->bWL:Lokhttp3/aq;

    .line 135
    invoke-virtual {v1}, Lokhttp3/aq;->contentLength()J

    move-result-wide v4

    invoke-virtual {v0, v4, v5}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-direct {v2, v0}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V

    throw v2

    .line 76
    :cond_119
    invoke-virtual {v0}, Lokhttp3/internal/connection/c;->RF()Z

    move-result v0

    if-nez v0, :cond_122

    .line 80
    invoke-virtual {v3}, Lokhttp3/internal/connection/g;->RK()V

    :cond_122
    move-object v0, v1

    goto/16 :goto_64

    .line 123
    :cond_125
    invoke-virtual {v1}, Lokhttp3/ao;->RA()Lokhttp3/ap;

    move-result-object v4

    .line 124
    invoke-interface {v2, v1}, Lokhttp3/internal/b/d;->e(Lokhttp3/ao;)Lokhttp3/aq;

    move-result-object v1

    .line 11386
    iput-object v1, v4, Lokhttp3/ap;->bWL:Lokhttp3/aq;

    .line 125
    invoke-virtual {v4}, Lokhttp3/ap;->RB()Lokhttp3/ao;

    move-result-object v1

    goto :goto_bf

    .line 138
    :cond_134
    return-object v1

    :cond_135
    move-object v0, v1

    goto/16 :goto_64
.end method