mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
1366 lines
37 KiB
Smali
1366 lines
37 KiB
Smali
.class public final Lokhttp3/internal/http1/Http1ExchangeCodec;
|
|
.super Ljava/lang/Object;
|
|
.source "Http1ExchangeCodec.kt"
|
|
|
|
# interfaces
|
|
.implements Lokhttp3/internal/http/ExchangeCodec;
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;,
|
|
Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;,
|
|
Lokhttp3/internal/http1/Http1ExchangeCodec$AbstractSource;,
|
|
Lokhttp3/internal/http1/Http1ExchangeCodec$FixedLengthSource;,
|
|
Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;,
|
|
Lokhttp3/internal/http1/Http1ExchangeCodec$UnknownLengthSource;,
|
|
Lokhttp3/internal/http1/Http1ExchangeCodec$Companion;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/SourceDebugExtension;
|
|
value = "SMAP\nHttp1ExchangeCodec.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Http1ExchangeCodec.kt\nokhttp3/internal/http1/Http1ExchangeCodec\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,497:1\n1#2:498\n*E\n"
|
|
.end annotation
|
|
|
|
.annotation runtime Lkotlin/Metadata;
|
|
bv = {
|
|
0x1,
|
|
0x0,
|
|
0x3
|
|
}
|
|
d1 = {
|
|
"\u0000\u0088\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0002\u0008\u0002\n\u0002\u0010\u0008\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010\t\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0004\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0007\n\u0002\u0018\u0002\n\u0002\u0008\u0006\n\u0002\u0010\u000e\n\u0002\u0008\t\u0018\u0000 ?2\u00020\u0001:\u0007<=>?@ABB\'\u0012\u0008\u0010\u0002\u001a\u0004\u0018\u00010\u0003\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007\u0012\u0006\u0010\u0008\u001a\u00020\t\u00a2\u0006\u0002\u0010\nJ\u0008\u0010\u001b\u001a\u00020\u001cH\u0016J\u0018\u0010\u001d\u001a\u00020\u001e2\u0006\u0010\u001f\u001a\u00020\u00172\u0006\u0010 \u001a\u00020!H\u0016J\u0010\u0010\"\u001a\u00020\u001c2\u0006\u0010#\u001a\u00020$H\u0002J\u0008\u0010%\u001a\u00020\u001cH\u0016J\u0008\u0010&\u001a\u00020\u001cH\u0016J\u0008\u0010\'\u001a\u00020\u001eH\u0002J\u0010\u0010(\u001a\u00020)2\u0006\u0010*\u001a\u00020+H\u0002J\u0010\u0010,\u001a\u00020)2\u0006\u0010-\u001a\u00020!H\u0002J\u0008\u0010.\u001a\u00020\u001eH\u0002J\u0008\u0010/\u001a\u00020)H\u0002J\u0010\u00100\u001a\u00020)2\u0006\u00101\u001a\u00020\u0019H\u0016J\u0012\u00102\u001a\u0004\u0018\u0001032\u0006\u00104\u001a\u00020\u0010H\u0016J\u0010\u00105\u001a\u00020!2\u0006\u00101\u001a\u00020\u0019H\u0016J\u000e\u00106\u001a\u00020\u001c2\u0006\u00101\u001a\u00020\u0019J\u0008\u0010\u0014\u001a\u00020\u0015H\u0016J\u0016\u00107\u001a\u00020\u001c2\u0006\u00108\u001a\u00020\u00152\u0006\u00109\u001a\u00020:J\u0010\u0010;\u001a\u00020\u001c2\u0006\u0010\u001f\u001a\u00020\u0017H\u0016R\u0010\u0010\u0002\u001a\u0004\u0018\u00010\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0014\u0010\u0004\u001a\u00020\u0005X\u0096\u0004\u00a2\u0006\u0008\n\u0000\u001a\u0004\u0008\u000b\u0010\u000cR\u000e\u0010\r\u001a\u00020\u000eX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u0011\u0010\u000f\u001a\u00020\u00108F\u00a2\u0006\u0006\u001a\u0004\u0008\u000f\u0010\u0011R\u000e\u0010\u0008\u001a\u00020\tX\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0006\u001a\u00020\u0007X\u0082\u0004\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0012\u001a\u00020\u0013X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0010\u0010\u0014\u001a\u0004\u0018\u00010\u0015X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u0018\u0010\u0016\u001a\u00020\u0010*\u00020\u00178BX\u0082\u0004\u00a2\u0006\u0006\u001a\u0004\u0008\u0016\u0010\u0018R\u0018\u0010\u0016\u001a\u00020\u0010*\u00020\u00198BX\u0082\u0004\u00a2\u0006\u0006\u001a\u0004\u0008\u0016\u0010\u001a\u00a8\u0006C"
|
|
}
|
|
d2 = {
|
|
"Lokhttp3/internal/http1/Http1ExchangeCodec;",
|
|
"Lokhttp3/internal/http/ExchangeCodec;",
|
|
"client",
|
|
"Lokhttp3/OkHttpClient;",
|
|
"connection",
|
|
"Lokhttp3/internal/connection/RealConnection;",
|
|
"source",
|
|
"Lokio/BufferedSource;",
|
|
"sink",
|
|
"Lokio/BufferedSink;",
|
|
"(Lokhttp3/OkHttpClient;Lokhttp3/internal/connection/RealConnection;Lokio/BufferedSource;Lokio/BufferedSink;)V",
|
|
"getConnection",
|
|
"()Lokhttp3/internal/connection/RealConnection;",
|
|
"headersReader",
|
|
"Lokhttp3/internal/http1/HeadersReader;",
|
|
"isClosed",
|
|
"",
|
|
"()Z",
|
|
"state",
|
|
"",
|
|
"trailers",
|
|
"Lokhttp3/Headers;",
|
|
"isChunked",
|
|
"Lokhttp3/Request;",
|
|
"(Lokhttp3/Request;)Z",
|
|
"Lokhttp3/Response;",
|
|
"(Lokhttp3/Response;)Z",
|
|
"cancel",
|
|
"",
|
|
"createRequestBody",
|
|
"Lokio/Sink;",
|
|
"request",
|
|
"contentLength",
|
|
"",
|
|
"detachTimeout",
|
|
"timeout",
|
|
"Lokio/ForwardingTimeout;",
|
|
"finishRequest",
|
|
"flushRequest",
|
|
"newChunkedSink",
|
|
"newChunkedSource",
|
|
"Lokio/Source;",
|
|
"url",
|
|
"Lokhttp3/HttpUrl;",
|
|
"newFixedLengthSource",
|
|
"length",
|
|
"newKnownLengthSink",
|
|
"newUnknownLengthSource",
|
|
"openResponseBodySource",
|
|
"response",
|
|
"readResponseHeaders",
|
|
"Lokhttp3/Response$Builder;",
|
|
"expectContinue",
|
|
"reportedContentLength",
|
|
"skipConnectBody",
|
|
"writeRequest",
|
|
"headers",
|
|
"requestLine",
|
|
"",
|
|
"writeRequestHeaders",
|
|
"AbstractSource",
|
|
"ChunkedSink",
|
|
"ChunkedSource",
|
|
"Companion",
|
|
"FixedLengthSource",
|
|
"KnownLengthSink",
|
|
"UnknownLengthSource",
|
|
"okhttp"
|
|
}
|
|
k = 0x1
|
|
mv = {
|
|
0x1,
|
|
0x4,
|
|
0x0
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field public static final Companion:Lokhttp3/internal/http1/Http1ExchangeCodec$Companion;
|
|
|
|
.field private static final NO_CHUNK_YET:J = -0x1L
|
|
|
|
.field private static final STATE_CLOSED:I = 0x6
|
|
|
|
.field private static final STATE_IDLE:I = 0x0
|
|
|
|
.field private static final STATE_OPEN_REQUEST_BODY:I = 0x1
|
|
|
|
.field private static final STATE_OPEN_RESPONSE_BODY:I = 0x4
|
|
|
|
.field private static final STATE_READING_RESPONSE_BODY:I = 0x5
|
|
|
|
.field private static final STATE_READ_RESPONSE_HEADERS:I = 0x3
|
|
|
|
.field private static final STATE_WRITING_REQUEST_BODY:I = 0x2
|
|
|
|
|
|
# instance fields
|
|
.field private final client:Lokhttp3/OkHttpClient;
|
|
|
|
.field private final connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
.field private final headersReader:Lokhttp3/internal/http1/HeadersReader;
|
|
|
|
.field private final sink:Lokio/BufferedSink;
|
|
|
|
.field private final source:Lokio/BufferedSource;
|
|
|
|
.field private state:I
|
|
|
|
.field private trailers:Lokhttp3/Headers;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lokhttp3/internal/http1/Http1ExchangeCodec$Companion;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/http1/Http1ExchangeCodec$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
|
|
|
|
sput-object v0, Lokhttp3/internal/http1/Http1ExchangeCodec;->Companion:Lokhttp3/internal/http1/Http1ExchangeCodec$Companion;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lokhttp3/OkHttpClient;Lokhttp3/internal/connection/RealConnection;Lokio/BufferedSource;Lokio/BufferedSink;)V
|
|
.locals 1
|
|
|
|
const-string v0, "connection"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "source"
|
|
|
|
invoke-static {p3, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "sink"
|
|
|
|
invoke-static {p4, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 64
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->client:Lokhttp3/OkHttpClient;
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
iput-object p3, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->source:Lokio/BufferedSource;
|
|
|
|
iput-object p4, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->sink:Lokio/BufferedSink;
|
|
|
|
.line 73
|
|
new-instance p1, Lokhttp3/internal/http1/HeadersReader;
|
|
|
|
invoke-direct {p1, p3}, Lokhttp3/internal/http1/HeadersReader;-><init>(Lokio/BufferedSource;)V
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->headersReader:Lokhttp3/internal/http1/HeadersReader;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$detachTimeout(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokio/ForwardingTimeout;)V
|
|
.locals 0
|
|
|
|
.line 64
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->detachTimeout(Lokio/ForwardingTimeout;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$getClient$p(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokhttp3/OkHttpClient;
|
|
.locals 0
|
|
|
|
.line 64
|
|
iget-object p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->client:Lokhttp3/OkHttpClient;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getHeadersReader$p(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokhttp3/internal/http1/HeadersReader;
|
|
.locals 0
|
|
|
|
.line 64
|
|
iget-object p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->headersReader:Lokhttp3/internal/http1/HeadersReader;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getSink$p(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSink;
|
|
.locals 0
|
|
|
|
.line 64
|
|
iget-object p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->sink:Lokio/BufferedSink;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getSource$p(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokio/BufferedSource;
|
|
.locals 0
|
|
|
|
.line 64
|
|
iget-object p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->source:Lokio/BufferedSource;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getState$p(Lokhttp3/internal/http1/Http1ExchangeCodec;)I
|
|
.locals 0
|
|
|
|
.line 64
|
|
iget p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$getTrailers$p(Lokhttp3/internal/http1/Http1ExchangeCodec;)Lokhttp3/Headers;
|
|
.locals 0
|
|
|
|
.line 64
|
|
iget-object p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->trailers:Lokhttp3/Headers;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static final synthetic access$setState$p(Lokhttp3/internal/http1/Http1ExchangeCodec;I)V
|
|
.locals 0
|
|
|
|
.line 64
|
|
iput p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final synthetic access$setTrailers$p(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokhttp3/Headers;)V
|
|
.locals 0
|
|
|
|
.line 64
|
|
iput-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->trailers:Lokhttp3/Headers;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final detachTimeout(Lokio/ForwardingTimeout;)V
|
|
.locals 1
|
|
|
|
.line 243
|
|
invoke-virtual {p1}, Lokio/ForwardingTimeout;->delegate()Lokio/Timeout;
|
|
|
|
move-result-object p0
|
|
|
|
.line 244
|
|
sget-object v0, Lokio/Timeout;->NONE:Lokio/Timeout;
|
|
|
|
invoke-virtual {p1, v0}, Lokio/ForwardingTimeout;->setDelegate(Lokio/Timeout;)Lokio/ForwardingTimeout;
|
|
|
|
.line 245
|
|
invoke-virtual {p0}, Lokio/Timeout;->clearDeadline()Lokio/Timeout;
|
|
|
|
.line 246
|
|
invoke-virtual {p0}, Lokio/Timeout;->clearTimeout()Lokio/Timeout;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private final isChunked(Lokhttp3/Request;)Z
|
|
.locals 1
|
|
|
|
const-string p0, "Transfer-Encoding"
|
|
|
|
.line 79
|
|
invoke-virtual {p1, p0}, Lokhttp3/Request;->header(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
const-string v0, "chunked"
|
|
|
|
invoke-static {v0, p0, p1}, Lkotlin/text/StringsKt;->equals(Ljava/lang/String;Ljava/lang/String;Z)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method private final isChunked(Lokhttp3/Response;)Z
|
|
.locals 2
|
|
|
|
const/4 p0, 0x0
|
|
|
|
const/4 v0, 0x2
|
|
|
|
const-string v1, "Transfer-Encoding"
|
|
|
|
.line 76
|
|
invoke-static {p1, v1, p0, v0, p0}, Lokhttp3/Response;->header$default(Lokhttp3/Response;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
const-string v0, "chunked"
|
|
|
|
invoke-static {v0, p0, p1}, Lkotlin/text/StringsKt;->equals(Ljava/lang/String;Ljava/lang/String;Z)Z
|
|
|
|
move-result p0
|
|
|
|
return p0
|
|
.end method
|
|
|
|
.method private final newChunkedSink()Lokio/Sink;
|
|
.locals 2
|
|
|
|
iget v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_1
|
|
|
|
const/4 v0, 0x2
|
|
|
|
iput v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
.line 209
|
|
new-instance v0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;
|
|
|
|
invoke-direct {v0, p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSink;-><init>(Lokhttp3/internal/http1/Http1ExchangeCodec;)V
|
|
|
|
check-cast v0, Lokio/Sink;
|
|
|
|
return-object v0
|
|
|
|
.line 207
|
|
:cond_1
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "state: "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast v0, Ljava/lang/Throwable;
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private final newChunkedSource(Lokhttp3/HttpUrl;)Lokio/Source;
|
|
.locals 2
|
|
|
|
iget v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
const/4 v1, 0x4
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v0, 0x5
|
|
|
|
iput v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
.line 227
|
|
new-instance v0, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;
|
|
|
|
invoke-direct {v0, p0, p1}, Lokhttp3/internal/http1/Http1ExchangeCodec$ChunkedSource;-><init>(Lokhttp3/internal/http1/Http1ExchangeCodec;Lokhttp3/HttpUrl;)V
|
|
|
|
check-cast v0, Lokio/Source;
|
|
|
|
return-object v0
|
|
|
|
.line 225
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "state: "
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private final newFixedLengthSource(J)Lokio/Source;
|
|
.locals 2
|
|
|
|
iget v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
const/4 v1, 0x4
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v0, 0x5
|
|
|
|
iput v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
.line 221
|
|
new-instance v0, Lokhttp3/internal/http1/Http1ExchangeCodec$FixedLengthSource;
|
|
|
|
invoke-direct {v0, p0, p1, p2}, Lokhttp3/internal/http1/Http1ExchangeCodec$FixedLengthSource;-><init>(Lokhttp3/internal/http1/Http1ExchangeCodec;J)V
|
|
|
|
check-cast v0, Lokio/Source;
|
|
|
|
return-object v0
|
|
|
|
.line 219
|
|
:cond_1
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, "state: "
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method private final newKnownLengthSink()Lokio/Sink;
|
|
.locals 2
|
|
|
|
iget v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v1, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v1, :cond_1
|
|
|
|
const/4 v0, 0x2
|
|
|
|
iput v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
.line 215
|
|
new-instance v0, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;
|
|
|
|
invoke-direct {v0, p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$KnownLengthSink;-><init>(Lokhttp3/internal/http1/Http1ExchangeCodec;)V
|
|
|
|
check-cast v0, Lokio/Sink;
|
|
|
|
return-object v0
|
|
|
|
.line 213
|
|
:cond_1
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "state: "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast v0, Ljava/lang/Throwable;
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method private final newUnknownLengthSource()Lokio/Source;
|
|
.locals 2
|
|
|
|
iget v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
const/4 v1, 0x4
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_1
|
|
|
|
const/4 v0, 0x5
|
|
|
|
iput v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
.line 233
|
|
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->getConnection()Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/internal/connection/RealConnection;->noNewExchanges$okhttp()V
|
|
|
|
.line 234
|
|
new-instance v0, Lokhttp3/internal/http1/Http1ExchangeCodec$UnknownLengthSource;
|
|
|
|
invoke-direct {v0, p0}, Lokhttp3/internal/http1/Http1ExchangeCodec$UnknownLengthSource;-><init>(Lokhttp3/internal/http1/Http1ExchangeCodec;)V
|
|
|
|
check-cast v0, Lokio/Source;
|
|
|
|
return-object v0
|
|
|
|
.line 231
|
|
:cond_1
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "state: "
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v0, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast v0, Ljava/lang/Throwable;
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public cancel()V
|
|
.locals 0
|
|
|
|
.line 104
|
|
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->getConnection()Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/RealConnection;->cancel()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public createRequestBody(Lokhttp3/Request;J)Lokio/Sink;
|
|
.locals 2
|
|
|
|
const-string v0, "request"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 93
|
|
invoke-virtual {p1}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/RequestBody;->isDuplex()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
new-instance p0, Ljava/net/ProtocolException;
|
|
|
|
const-string p1, "Duplex connections are not supported for HTTP/1"
|
|
|
|
invoke-direct {p0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
|
|
.line 95
|
|
:cond_1
|
|
:goto_0
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->isChunked(Lokhttp3/Request;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
invoke-direct {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->newChunkedSink()Lokio/Sink;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
const-wide/16 v0, -0x1
|
|
|
|
cmp-long p1, p2, v0
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
.line 96
|
|
invoke-direct {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->newKnownLengthSink()Lokio/Sink;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_1
|
|
return-object p0
|
|
|
|
.line 98
|
|
:cond_3
|
|
new-instance p0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string p1, "Cannot stream a request body without chunked encoding or a known content length!"
|
|
|
|
invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public finishRequest()V
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->sink:Lokio/BufferedSink;
|
|
|
|
.line 155
|
|
invoke-interface {p0}, Lokio/BufferedSink;->flush()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public flushRequest()V
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->sink:Lokio/BufferedSink;
|
|
|
|
.line 151
|
|
invoke-interface {p0}, Lokio/BufferedSink;->flush()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public getConnection()Lokhttp3/internal/connection/RealConnection;
|
|
.locals 0
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->connection:Lokhttp3/internal/connection/RealConnection;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public final isClosed()Z
|
|
.locals 1
|
|
|
|
iget p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
const/4 v0, 0x6
|
|
|
|
if-ne p0, v0, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x0
|
|
|
|
:goto_0
|
|
return p0
|
|
.end method
|
|
|
|
.method public openResponseBodySource(Lokhttp3/Response;)Lokio/Source;
|
|
.locals 4
|
|
|
|
const-string v0, "response"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 132
|
|
invoke-static {p1}, Lokhttp3/internal/http/HttpHeaders;->promisesBody(Lokhttp3/Response;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-wide/16 v0, 0x0
|
|
|
|
invoke-direct {p0, v0, v1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->newFixedLengthSource(J)Lokio/Source;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
.line 133
|
|
:cond_0
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->isChunked(Lokhttp3/Response;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->newChunkedSource(Lokhttp3/HttpUrl;)Lokio/Source;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
.line 135
|
|
:cond_1
|
|
invoke-static {p1}, Lokhttp3/internal/Util;->headersContentLength(Lokhttp3/Response;)J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
cmp-long p1, v0, v2
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 137
|
|
invoke-direct {p0, v0, v1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->newFixedLengthSource(J)Lokio/Source;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
.line 139
|
|
:cond_2
|
|
invoke-direct {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->newUnknownLengthSource()Lokio/Source;
|
|
|
|
move-result-object p0
|
|
|
|
:goto_0
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public readResponseHeaders(Z)Lokhttp3/Response$Builder;
|
|
.locals 4
|
|
|
|
iget v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->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
|
|
const/4 v2, 0x0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
if-eqz v2, :cond_4
|
|
|
|
.line 178
|
|
:try_start_0
|
|
sget-object v0, Lokhttp3/internal/http/StatusLine;->Companion:Lokhttp3/internal/http/StatusLine$Companion;
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->headersReader:Lokhttp3/internal/http1/HeadersReader;
|
|
|
|
invoke-virtual {v2}, Lokhttp3/internal/http1/HeadersReader;->readLine()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v2}, Lokhttp3/internal/http/StatusLine$Companion;->parse(Ljava/lang/String;)Lokhttp3/internal/http/StatusLine;
|
|
|
|
move-result-object v0
|
|
|
|
.line 180
|
|
new-instance v2, Lokhttp3/Response$Builder;
|
|
|
|
invoke-direct {v2}, Lokhttp3/Response$Builder;-><init>()V
|
|
|
|
.line 181
|
|
iget-object v3, v0, Lokhttp3/internal/http/StatusLine;->protocol:Lokhttp3/Protocol;
|
|
|
|
invoke-virtual {v2, v3}, Lokhttp3/Response$Builder;->protocol(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v2
|
|
|
|
.line 182
|
|
iget v3, v0, Lokhttp3/internal/http/StatusLine;->code:I
|
|
|
|
invoke-virtual {v2, v3}, Lokhttp3/Response$Builder;->code(I)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v2
|
|
|
|
.line 183
|
|
iget-object v3, v0, Lokhttp3/internal/http/StatusLine;->message:Ljava/lang/String;
|
|
|
|
invoke-virtual {v2, v3}, Lokhttp3/Response$Builder;->message(Ljava/lang/String;)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->headersReader:Lokhttp3/internal/http1/HeadersReader;
|
|
|
|
.line 184
|
|
invoke-virtual {v3}, Lokhttp3/internal/http1/HeadersReader;->readHeaders()Lokhttp3/Headers;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v2, v3}, Lokhttp3/Response$Builder;->headers(Lokhttp3/Headers;)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v2
|
|
|
|
const/16 v3, 0x64
|
|
|
|
if-eqz p1, :cond_2
|
|
|
|
.line 187
|
|
iget p1, v0, Lokhttp3/internal/http/StatusLine;->code:I
|
|
|
|
if-ne p1, v3, :cond_2
|
|
|
|
const/4 v2, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
.line 190
|
|
:cond_2
|
|
iget p1, v0, Lokhttp3/internal/http/StatusLine;->code:I
|
|
|
|
if-ne p1, v3, :cond_3
|
|
|
|
iput v1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const/4 p1, 0x4
|
|
|
|
iput p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
:try_end_0
|
|
.catch Ljava/io/EOFException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:goto_1
|
|
return-object v2
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
.line 201
|
|
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->getConnection()Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Lokhttp3/HttpUrl;->redact()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 202
|
|
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
|
|
|
|
invoke-virtual {v1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
invoke-direct {v0, p0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
check-cast v0, Ljava/lang/Throwable;
|
|
|
|
throw v0
|
|
|
|
.line 174
|
|
:cond_4
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "state: "
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
.line 173
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public reportedContentLength(Lokhttp3/Response;)J
|
|
.locals 1
|
|
|
|
const-string v0, "response"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 124
|
|
invoke-static {p1}, Lokhttp3/internal/http/HttpHeaders;->promisesBody(Lokhttp3/Response;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-wide/16 p0, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
.line 125
|
|
:cond_0
|
|
invoke-direct {p0, p1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->isChunked(Lokhttp3/Response;)Z
|
|
|
|
move-result p0
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
const-wide/16 p0, -0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 126
|
|
:cond_1
|
|
invoke-static {p1}, Lokhttp3/internal/Util;->headersContentLength(Lokhttp3/Response;)J
|
|
|
|
move-result-wide p0
|
|
|
|
:goto_0
|
|
return-wide p0
|
|
.end method
|
|
|
|
.method public final skipConnectBody(Lokhttp3/Response;)V
|
|
.locals 4
|
|
|
|
const-string v0, "response"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 254
|
|
invoke-static {p1}, Lokhttp3/internal/Util;->headersContentLength(Lokhttp3/Response;)J
|
|
|
|
move-result-wide v0
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
cmp-long p1, v0, v2
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 256
|
|
:cond_0
|
|
invoke-direct {p0, v0, v1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->newFixedLengthSource(J)Lokio/Source;
|
|
|
|
move-result-object p0
|
|
|
|
const p1, 0x7fffffff
|
|
|
|
.line 257
|
|
sget-object v0, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-static {p0, p1, v0}, Lokhttp3/internal/Util;->skipAll(Lokio/Source;ILjava/util/concurrent/TimeUnit;)Z
|
|
|
|
.line 258
|
|
invoke-interface {p0}, Lokio/Source;->close()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public trailers()Lokhttp3/Headers;
|
|
.locals 2
|
|
|
|
iget v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
const/4 v1, 0x6
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->trailers:Lokhttp3/Headers;
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
goto :goto_1
|
|
|
|
.line 147
|
|
:cond_1
|
|
sget-object p0, Lokhttp3/internal/Util;->EMPTY_HEADERS:Lokhttp3/Headers;
|
|
|
|
:goto_1
|
|
return-object p0
|
|
|
|
.line 146
|
|
:cond_2
|
|
new-instance p0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v0, "too early; can\'t read the trailers yet"
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p0, v0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p0, Ljava/lang/Throwable;
|
|
|
|
throw p0
|
|
.end method
|
|
|
|
.method public final writeRequest(Lokhttp3/Headers;Ljava/lang/String;)V
|
|
.locals 5
|
|
|
|
const-string v0, "headers"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string v0, "requestLine"
|
|
|
|
invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
iget v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
const/4 v1, 0x0
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
move v0, v2
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move v0, v1
|
|
|
|
:goto_0
|
|
if-eqz v0, :cond_2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->sink:Lokio/BufferedSink;
|
|
|
|
.line 161
|
|
invoke-interface {v0, p2}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
move-result-object p2
|
|
|
|
const-string v0, "\r\n"
|
|
|
|
invoke-interface {p2, v0}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
.line 162
|
|
invoke-virtual {p1}, Lokhttp3/Headers;->size()I
|
|
|
|
move-result p2
|
|
|
|
:goto_1
|
|
if-ge v1, p2, :cond_1
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->sink:Lokio/BufferedSink;
|
|
|
|
.line 163
|
|
invoke-virtual {p1, v1}, Lokhttp3/Headers;->name(I)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v3, v4}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
move-result-object v3
|
|
|
|
const-string v4, ": "
|
|
|
|
.line 164
|
|
invoke-interface {v3, v4}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
move-result-object v3
|
|
|
|
.line 165
|
|
invoke-virtual {p1, v1}, Lokhttp3/Headers;->value(I)Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-interface {v3, v4}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
move-result-object v3
|
|
|
|
.line 166
|
|
invoke-interface {v3, v0}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
iget-object p1, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->sink:Lokio/BufferedSink;
|
|
|
|
.line 168
|
|
invoke-interface {p1, v0}, Lokio/BufferedSink;->writeUtf8(Ljava/lang/String;)Lokio/BufferedSink;
|
|
|
|
iput v2, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
return-void
|
|
|
|
.line 160
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
const-string p2, "state: "
|
|
|
|
invoke-direct {p1, p2}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
|
|
|
|
iget p0, p0, Lokhttp3/internal/http1/Http1ExchangeCodec;->state:I
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
new-instance p1, Ljava/lang/IllegalStateException;
|
|
|
|
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {p1, p0}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
check-cast p1, Ljava/lang/Throwable;
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public writeRequestHeaders(Lokhttp3/Request;)V
|
|
.locals 3
|
|
|
|
const-string v0, "request"
|
|
|
|
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
.line 118
|
|
sget-object v0, Lokhttp3/internal/http/RequestLine;->INSTANCE:Lokhttp3/internal/http/RequestLine;
|
|
|
|
invoke-virtual {p0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->getConnection()Lokhttp3/internal/connection/RealConnection;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Route;->proxy()Ljava/net/Proxy;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "connection.route().proxy.type()"
|
|
|
|
invoke-static {v1, v2}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-virtual {v0, p1, v1}, Lokhttp3/internal/http/RequestLine;->get(Lokhttp3/Request;Ljava/net/Proxy$Type;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 119
|
|
invoke-virtual {p1}, Lokhttp3/Request;->headers()Lokhttp3/Headers;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0, p1, v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->writeRequest(Lokhttp3/Headers;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|