Rabbit-R1/android (non root)/smali/smali_classes3/okhttp3/internal/http/RetryAndFollowUpInterceptor.smali

1170 lines
28 KiB
Smali
Raw Normal View History

2024-05-21 21:08:36 +00:00
.class public final Lokhttp3/internal/http/RetryAndFollowUpInterceptor;
.super Ljava/lang/Object;
.source "RetryAndFollowUpInterceptor.kt"
# interfaces
.implements Lokhttp3/Interceptor;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lokhttp3/internal/http/RetryAndFollowUpInterceptor$Companion;
}
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000R\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0018\u0002\n\u0002\u0008\u0003\n\u0002\u0010\u0008\n\u0002\u0008\u0003\u0018\u0000 \u001e2\u00020\u0001:\u0001\u001eB\r\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u00a2\u0006\u0002\u0010\u0004J\u001a\u0010\u0005\u001a\u0004\u0018\u00010\u00062\u0006\u0010\u0007\u001a\u00020\u00082\u0006\u0010\t\u001a\u00020\nH\u0002J\u001c\u0010\u000b\u001a\u0004\u0018\u00010\u00062\u0006\u0010\u0007\u001a\u00020\u00082\u0008\u0010\u000c\u001a\u0004\u0018\u00010\rH\u0002J\u0010\u0010\u000e\u001a\u00020\u00082\u0006\u0010\u000f\u001a\u00020\u0010H\u0016J\u0018\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u00142\u0006\u0010\u0015\u001a\u00020\u0012H\u0002J(\u0010\u0016\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u00142\u0006\u0010\u0017\u001a\u00020\u00182\u0006\u0010\u0019\u001a\u00020\u00062\u0006\u0010\u0015\u001a\u00020\u0012H\u0002J\u0018\u0010\u001a\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u00142\u0006\u0010\u0019\u001a\u00020\u0006H\u0002J\u0018\u0010\u001b\u001a\u00020\u001c2\u0006\u0010\u0007\u001a\u00020\u00082\u0006\u0010\u001d\u001a\u00020\u001cH\u0002R\u000e\u0010\u0002\u001a\u00020\u0003X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u001f"
}
d2 = {
"Lokhttp3/internal/http/RetryAndFollowUpInterceptor;",
"Lokhttp3/Interceptor;",
"client",
"Lokhttp3/OkHttpClient;",
"(Lokhttp3/OkHttpClient;)V",
"buildRedirectRequest",
"Lokhttp3/Request;",
"userResponse",
"Lokhttp3/Response;",
"method",
"",
"followUpRequest",
"exchange",
"Lokhttp3/internal/connection/Exchange;",
"intercept",
"chain",
"Lokhttp3/Interceptor$Chain;",
"isRecoverable",
"",
"e",
"Ljava/io/IOException;",
"requestSendStarted",
"recover",
"call",
"Lokhttp3/internal/connection/RealCall;",
"userRequest",
"requestIsOneShot",
"retryAfter",
"",
"defaultDelay",
"Companion",
"okhttp"
}
k = 0x1
mv = {
0x1,
0x4,
0x0
}
.end annotation
# static fields
.field public static final Companion:Lokhttp3/internal/http/RetryAndFollowUpInterceptor$Companion;
.field private static final MAX_FOLLOW_UPS:I = 0x14
# instance fields
.field private final client:Lokhttp3/OkHttpClient;
# direct methods
.method static constructor <clinit>()V
.locals 2
new-instance v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor$Companion;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor$Companion;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
sput-object v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->Companion:Lokhttp3/internal/http/RetryAndFollowUpInterceptor$Companion;
return-void
.end method
.method public constructor <init>(Lokhttp3/OkHttpClient;)V
.locals 1
const-string v0, "client"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 54
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
return-void
.end method
.method private final buildRedirectRequest(Lokhttp3/Response;Ljava/lang/String;)Lokhttp3/Request;
.locals 7
iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 293
invoke-virtual {v0}, Lokhttp3/OkHttpClient;->followRedirects()Z
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_0
return-object v1
:cond_0
const-string v0, "Location"
const/4 v2, 0x2
.line 295
invoke-static {p1, v0, v1, v2, v1}, Lokhttp3/Response;->header$default(Lokhttp3/Response;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String;
move-result-object v0
if-eqz v0, :cond_8
.line 297
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v2
invoke-virtual {v2}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object v2
invoke-virtual {v2, v0}, Lokhttp3/HttpUrl;->resolve(Ljava/lang/String;)Lokhttp3/HttpUrl;
move-result-object v0
if-eqz v0, :cond_8
.line 300
invoke-virtual {v0}, Lokhttp3/HttpUrl;->scheme()Ljava/lang/String;
move-result-object v2
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v3
invoke-virtual {v3}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
move-result-object v3
invoke-virtual {v3}, Lokhttp3/HttpUrl;->scheme()Ljava/lang/String;
move-result-object v3
invoke-static {v2, v3}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z
move-result v2
if-nez v2, :cond_1
iget-object p0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 301
invoke-virtual {p0}, Lokhttp3/OkHttpClient;->followSslRedirects()Z
move-result p0
if-nez p0, :cond_1
return-object v1
.line 304
:cond_1
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object p0
invoke-virtual {p0}, Lokhttp3/Request;->newBuilder()Lokhttp3/Request$Builder;
move-result-object p0
.line 305
invoke-static {p2}, Lokhttp3/internal/http/HttpMethod;->permitsRequestBody(Ljava/lang/String;)Z
move-result v2
if-eqz v2, :cond_6
.line 306
invoke-virtual {p1}, Lokhttp3/Response;->code()I
move-result v2
.line 307
sget-object v3, Lokhttp3/internal/http/HttpMethod;->INSTANCE:Lokhttp3/internal/http/HttpMethod;
invoke-virtual {v3, p2}, Lokhttp3/internal/http/HttpMethod;->redirectsWithBody(Ljava/lang/String;)Z
move-result v3
const/16 v4, 0x133
const/16 v5, 0x134
if-nez v3, :cond_3
if-eq v2, v5, :cond_3
if-ne v2, v4, :cond_2
goto :goto_0
:cond_2
const/4 v3, 0x0
goto :goto_1
:cond_3
:goto_0
const/4 v3, 0x1
.line 310
:goto_1
sget-object v6, Lokhttp3/internal/http/HttpMethod;->INSTANCE:Lokhttp3/internal/http/HttpMethod;
invoke-virtual {v6, p2}, Lokhttp3/internal/http/HttpMethod;->redirectsToGet(Ljava/lang/String;)Z
move-result v6
if-eqz v6, :cond_4
if-eq v2, v5, :cond_4
if-eq v2, v4, :cond_4
const-string p2, "GET"
.line 311
invoke-virtual {p0, p2, v1}, Lokhttp3/Request$Builder;->method(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
goto :goto_2
:cond_4
if-eqz v3, :cond_5
.line 313
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v1
invoke-virtual {v1}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v1
.line 314
:cond_5
invoke-virtual {p0, p2, v1}, Lokhttp3/Request$Builder;->method(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
:goto_2
if-nez v3, :cond_6
const-string p2, "Transfer-Encoding"
.line 317
invoke-virtual {p0, p2}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder;
const-string p2, "Content-Length"
.line 318
invoke-virtual {p0, p2}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder;
const-string p2, "Content-Type"
.line 319
invoke-virtual {p0, p2}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder;
.line 326
:cond_6
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-static {p1, v0}, Lokhttp3/internal/Util;->canReuseConnectionFor(Lokhttp3/HttpUrl;Lokhttp3/HttpUrl;)Z
move-result p1
if-nez p1, :cond_7
const-string p1, "Authorization"
.line 327
invoke-virtual {p0, p1}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder;
.line 330
:cond_7
invoke-virtual {p0, v0}, Lokhttp3/Request$Builder;->url(Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder;
move-result-object p0
invoke-virtual {p0}, Lokhttp3/Request$Builder;->build()Lokhttp3/Request;
move-result-object p0
return-object p0
:cond_8
return-object v1
.end method
.method private final followUpRequest(Lokhttp3/Response;Lokhttp3/internal/connection/Exchange;)Lokhttp3/Request;
.locals 5
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const/4 v0, 0x0
if-eqz p2, :cond_0
.line 210
invoke-virtual {p2}, Lokhttp3/internal/connection/Exchange;->getConnection$okhttp()Lokhttp3/internal/connection/RealConnection;
move-result-object v1
if-eqz v1, :cond_0
invoke-virtual {v1}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
move-result-object v1
goto :goto_0
:cond_0
move-object v1, v0
.line 211
:goto_0
invoke-virtual {p1}, Lokhttp3/Response;->code()I
move-result v2
.line 213
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v3
invoke-virtual {v3}, Lokhttp3/Request;->method()Ljava/lang/String;
move-result-object v3
const/16 v4, 0x133
if-eq v2, v4, :cond_10
const/16 v4, 0x134
if-eq v2, v4, :cond_10
const/16 v4, 0x191
if-eq v2, v4, :cond_f
const/16 v4, 0x1a5
if-eq v2, v4, :cond_b
const/16 p2, 0x1f7
if-eq v2, p2, :cond_8
const/16 p2, 0x197
if-eq v2, p2, :cond_6
const/16 p2, 0x198
if-eq v2, p2, :cond_1
packed-switch v2, :pswitch_data_0
return-object v0
:cond_1
iget-object v1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 233
invoke-virtual {v1}, Lokhttp3/OkHttpClient;->retryOnConnectionFailure()Z
move-result v1
if-nez v1, :cond_2
return-object v0
.line 238
:cond_2
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object v1
invoke-virtual {v1}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v1
if-eqz v1, :cond_3
.line 239
invoke-virtual {v1}, Lokhttp3/RequestBody;->isOneShot()Z
move-result v1
if-eqz v1, :cond_3
return-object v0
.line 242
:cond_3
invoke-virtual {p1}, Lokhttp3/Response;->priorResponse()Lokhttp3/Response;
move-result-object v1
if-eqz v1, :cond_4
.line 243
invoke-virtual {v1}, Lokhttp3/Response;->code()I
move-result v1
if-ne v1, p2, :cond_4
return-object v0
:cond_4
const/4 p2, 0x0
.line 248
invoke-direct {p0, p1, p2}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->retryAfter(Lokhttp3/Response;I)I
move-result p0
if-lez p0, :cond_5
return-object v0
.line 252
:cond_5
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object p0
return-object p0
.line 216
:cond_6
invoke-static {v1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V
invoke-virtual {v1}, Lokhttp3/Route;->proxy()Ljava/net/Proxy;
move-result-object p2
.line 217
invoke-virtual {p2}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
move-result-object p2
sget-object v0, Ljava/net/Proxy$Type;->HTTP:Ljava/net/Proxy$Type;
if-ne p2, v0, :cond_7
iget-object p0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 220
invoke-virtual {p0}, Lokhttp3/OkHttpClient;->proxyAuthenticator()Lokhttp3/Authenticator;
move-result-object p0
invoke-interface {p0, v1, p1}, Lokhttp3/Authenticator;->authenticate(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;
move-result-object p0
return-object p0
.line 218
:cond_7
new-instance p0, Ljava/net/ProtocolException;
const-string p1, "Received HTTP_PROXY_AUTH (407) code while not using proxy"
invoke-direct {p0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
.line 256
:cond_8
invoke-virtual {p1}, Lokhttp3/Response;->priorResponse()Lokhttp3/Response;
move-result-object v1
if-eqz v1, :cond_9
.line 257
invoke-virtual {v1}, Lokhttp3/Response;->code()I
move-result v1
if-ne v1, p2, :cond_9
return-object v0
:cond_9
const p2, 0x7fffffff
.line 262
invoke-direct {p0, p1, p2}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->retryAfter(Lokhttp3/Response;I)I
move-result p0
if-nez p0, :cond_a
.line 264
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object p0
return-object p0
:cond_a
return-object v0
.line 274
:cond_b
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object p0
invoke-virtual {p0}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object p0
if-eqz p0, :cond_c
.line 275
invoke-virtual {p0}, Lokhttp3/RequestBody;->isOneShot()Z
move-result p0
if-eqz p0, :cond_c
return-object v0
:cond_c
if-eqz p2, :cond_e
.line 279
invoke-virtual {p2}, Lokhttp3/internal/connection/Exchange;->isCoalescedConnection$okhttp()Z
move-result p0
if-nez p0, :cond_d
goto :goto_1
.line 283
:cond_d
invoke-virtual {p2}, Lokhttp3/internal/connection/Exchange;->getConnection$okhttp()Lokhttp3/internal/connection/RealConnection;
move-result-object p0
invoke-virtual {p0}, Lokhttp3/internal/connection/RealConnection;->noCoalescedConnections$okhttp()V
.line 284
invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request;
move-result-object p0
return-object p0
:cond_e
:goto_1
return-object v0
:cond_f
iget-object p0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 223
invoke-virtual {p0}, Lokhttp3/OkHttpClient;->authenticator()Lokhttp3/Authenticator;
move-result-object p0
invoke-interface {p0, v1, p1}, Lokhttp3/Authenticator;->authenticate(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;
move-result-object p0
return-object p0
.line 226
:cond_10
:pswitch_0
invoke-direct {p0, p1, v3}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->buildRedirectRequest(Lokhttp3/Response;Ljava/lang/String;)Lokhttp3/Request;
move-result-object p0
return-object p0
:pswitch_data_0
.packed-switch 0x12c
:pswitch_0
:pswitch_0
:pswitch_0
:pswitch_0
.end packed-switch
.end method
.method private final isRecoverable(Ljava/io/IOException;Z)Z
.locals 2
.line 174
instance-of p0, p1, Ljava/net/ProtocolException;
const/4 v0, 0x0
if-eqz p0, :cond_0
return v0
.line 180
:cond_0
instance-of p0, p1, Ljava/io/InterruptedIOException;
const/4 v1, 0x1
if-eqz p0, :cond_2
.line 181
instance-of p0, p1, Ljava/net/SocketTimeoutException;
if-eqz p0, :cond_1
if-nez p2, :cond_1
move v0, v1
:cond_1
return v0
.line 186
:cond_2
instance-of p0, p1, Ljavax/net/ssl/SSLHandshakeException;
if-eqz p0, :cond_3
.line 189
invoke-virtual {p1}, Ljava/io/IOException;->getCause()Ljava/lang/Throwable;
move-result-object p0
instance-of p0, p0, Ljava/security/cert/CertificateException;
if-eqz p0, :cond_3
return v0
.line 193
:cond_3
instance-of p0, p1, Ljavax/net/ssl/SSLPeerUnverifiedException;
if-eqz p0, :cond_4
return v0
:cond_4
return v1
.end method
.method private final recover(Ljava/io/IOException;Lokhttp3/internal/connection/RealCall;Lokhttp3/Request;Z)Z
.locals 2
iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient;
.line 151
invoke-virtual {v0}, Lokhttp3/OkHttpClient;->retryOnConnectionFailure()Z
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_0
return v1
:cond_0
if-eqz p4, :cond_1
.line 154
invoke-direct {p0, p1, p3}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->requestIsOneShot(Ljava/io/IOException;Lokhttp3/Request;)Z
move-result p3
if-eqz p3, :cond_1
return v1
.line 157
:cond_1
invoke-direct {p0, p1, p4}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->isRecoverable(Ljava/io/IOException;Z)Z
move-result p0
if-nez p0, :cond_2
return v1
.line 160
:cond_2
invoke-virtual {p2}, Lokhttp3/internal/connection/RealCall;->retryAfterFailure()Z
move-result p0
if-nez p0, :cond_3
return v1
:cond_3
const/4 p0, 0x1
return p0
.end method
.method private final requestIsOneShot(Ljava/io/IOException;Lokhttp3/Request;)Z
.locals 0
.line 167
invoke-virtual {p2}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object p0
if-eqz p0, :cond_0
.line 168
invoke-virtual {p0}, Lokhttp3/RequestBody;->isOneShot()Z
move-result p0
if-nez p0, :cond_1
.line 169
:cond_0
instance-of p0, p1, Ljava/io/FileNotFoundException;
if-eqz p0, :cond_2
:cond_1
const/4 p0, 0x1
goto :goto_0
:cond_2
const/4 p0, 0x0
:goto_0
return p0
.end method
.method private final retryAfter(Lokhttp3/Response;I)I
.locals 2
const/4 p0, 0x0
const/4 v0, 0x2
const-string v1, "Retry-After"
.line 334
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
if-eqz p0, :cond_1
.line 338
move-object p1, p0
check-cast p1, Ljava/lang/CharSequence;
new-instance p2, Lkotlin/text/Regex;
const-string v0, "\\d+"
invoke-direct {p2, v0}, Lkotlin/text/Regex;-><init>(Ljava/lang/String;)V
invoke-virtual {p2, p1}, Lkotlin/text/Regex;->matches(Ljava/lang/CharSequence;)Z
move-result p1
if-eqz p1, :cond_0
.line 339
invoke-static {p0}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer;
move-result-object p0
const-string p1, "Integer.valueOf(header)"
invoke-static {p0, p1}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
invoke-virtual {p0}, Ljava/lang/Integer;->intValue()I
move-result p0
return p0
:cond_0
const p0, 0x7fffffff
return p0
:cond_1
return p2
.end method
# virtual methods
.method public intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response;
.locals 10
.annotation system Ldalvik/annotation/Throws;
value = {
Ljava/io/IOException;
}
.end annotation
const-string v0, "chain"
invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
.line 58
check-cast p1, Lokhttp3/internal/http/RealInterceptorChain;
.line 59
invoke-virtual {p1}, Lokhttp3/internal/http/RealInterceptorChain;->getRequest$okhttp()Lokhttp3/Request;
move-result-object v0
.line 60
invoke-virtual {p1}, Lokhttp3/internal/http/RealInterceptorChain;->getCall$okhttp()Lokhttp3/internal/connection/RealCall;
move-result-object v1
const/4 v2, 0x0
.line 62
move-object v3, v2
check-cast v3, Lokhttp3/Response;
.line 64
invoke-static {}, Lkotlin/collections/CollectionsKt;->emptyList()Ljava/util/List;
move-result-object v3
const/4 v4, 0x0
const/4 v5, 0x1
move-object v7, v2
move v8, v4
:goto_0
move v6, v5
.line 66
:goto_1
invoke-virtual {v1, v0, v6}, Lokhttp3/internal/connection/RealCall;->enterNetworkInterceptorExchange(Lokhttp3/Request;Z)V
.line 71
:try_start_0
invoke-virtual {v1}, Lokhttp3/internal/connection/RealCall;->isCanceled()Z
move-result v6
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
if-nez v6, :cond_8
.line 76
:try_start_1
invoke-virtual {p1, v0}, Lokhttp3/internal/http/RealInterceptorChain;->proceed(Lokhttp3/Request;)Lokhttp3/Response;
move-result-object v0
:try_end_1
.catch Lokhttp3/internal/connection/RouteException; {:try_start_1 .. :try_end_1} :catch_1
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
.catchall {:try_start_1 .. :try_end_1} :catchall_0
if-eqz v7, :cond_0
.line 100
:try_start_2
invoke-virtual {v0}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object v0
.line 101
invoke-virtual {v7}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder;
move-result-object v6
.line 102
invoke-virtual {v6, v2}, Lokhttp3/Response$Builder;->body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;
move-result-object v6
.line 103
invoke-virtual {v6}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object v6
.line 101
invoke-virtual {v0, v6}, Lokhttp3/Response$Builder;->priorResponse(Lokhttp3/Response;)Lokhttp3/Response$Builder;
move-result-object v0
.line 104
invoke-virtual {v0}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
move-result-object v0
:cond_0
move-object v7, v0
.line 107
invoke-virtual {v1}, Lokhttp3/internal/connection/RealCall;->getInterceptorScopedExchange$okhttp()Lokhttp3/internal/connection/Exchange;
move-result-object v0
.line 108
invoke-direct {p0, v7, v0}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->followUpRequest(Lokhttp3/Response;Lokhttp3/internal/connection/Exchange;)Lokhttp3/Request;
move-result-object v6
if-nez v6, :cond_2
if-eqz v0, :cond_1
.line 111
invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->isDuplex$okhttp()Z
move-result p0
if-eqz p0, :cond_1
.line 112
invoke-virtual {v1}, Lokhttp3/internal/connection/RealCall;->timeoutEarlyExit()V
:try_end_2
.catchall {:try_start_2 .. :try_end_2} :catchall_0
.line 133
:cond_1
invoke-virtual {v1, v4}, Lokhttp3/internal/connection/RealCall;->exitNetworkInterceptorExchange$okhttp(Z)V
return-object v7
.line 118
:cond_2
:try_start_3
invoke-virtual {v6}, Lokhttp3/Request;->body()Lokhttp3/RequestBody;
move-result-object v0
if-eqz v0, :cond_3
.line 119
invoke-virtual {v0}, Lokhttp3/RequestBody;->isOneShot()Z
move-result v0
:try_end_3
.catchall {:try_start_3 .. :try_end_3} :catchall_0
if-eqz v0, :cond_3
.line 133
invoke-virtual {v1, v4}, Lokhttp3/internal/connection/RealCall;->exitNetworkInterceptorExchange$okhttp(Z)V
return-object v7
.line 124
:cond_3
:try_start_4
invoke-virtual {v7}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody;
move-result-object v0
if-eqz v0, :cond_4
check-cast v0, Ljava/io/Closeable;
invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V
:try_end_4
.catchall {:try_start_4 .. :try_end_4} :catchall_0
:cond_4
add-int/lit8 v8, v8, 0x1
const/16 v0, 0x14
if-gt v8, v0, :cond_5
.line 133
invoke-virtual {v1, v5}, Lokhttp3/internal/connection/RealCall;->exitNetworkInterceptorExchange$okhttp(Z)V
move-object v0, v6
goto :goto_0
.line 127
:cond_5
:try_start_5
new-instance p0, Ljava/net/ProtocolException;
new-instance p1, Ljava/lang/StringBuilder;
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
const-string v0, "Too many follow-up requests: "
invoke-virtual {p1, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1, v8}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
move-result-object p1
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
:catch_0
move-exception v6
.line 89
instance-of v9, v6, Lokhttp3/internal/http2/ConnectionShutdownException;
xor-int/2addr v9, v5
invoke-direct {p0, v6, v1, v0, v9}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->recover(Ljava/io/IOException;Lokhttp3/internal/connection/RealCall;Lokhttp3/Request;Z)Z
move-result v9
if-eqz v9, :cond_6
.line 92
check-cast v3, Ljava/util/Collection;
invoke-static {v3, v6}, Lkotlin/collections/CollectionsKt;->plus(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
move-result-object v3
goto :goto_2
.line 90
:cond_6
check-cast v6, Ljava/lang/Exception;
invoke-static {v6, v3}, Lokhttp3/internal/Util;->withSuppressed(Ljava/lang/Exception;Ljava/util/List;)Ljava/lang/Throwable;
move-result-object p0
throw p0
:catch_1
move-exception v6
.line 80
invoke-virtual {v6}, Lokhttp3/internal/connection/RouteException;->getLastConnectException()Ljava/io/IOException;
move-result-object v9
invoke-direct {p0, v9, v1, v0, v4}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->recover(Ljava/io/IOException;Lokhttp3/internal/connection/RealCall;Lokhttp3/Request;Z)Z
move-result v9
if-eqz v9, :cond_7
.line 83
check-cast v3, Ljava/util/Collection;
invoke-virtual {v6}, Lokhttp3/internal/connection/RouteException;->getFirstConnectException()Ljava/io/IOException;
move-result-object v6
invoke-static {v3, v6}, Lkotlin/collections/CollectionsKt;->plus(Ljava/util/Collection;Ljava/lang/Object;)Ljava/util/List;
move-result-object v3
:try_end_5
.catchall {:try_start_5 .. :try_end_5} :catchall_0
.line 133
:goto_2
invoke-virtual {v1, v5}, Lokhttp3/internal/connection/RealCall;->exitNetworkInterceptorExchange$okhttp(Z)V
move v6, v4
goto/16 :goto_1
.line 81
:cond_7
:try_start_6
invoke-virtual {v6}, Lokhttp3/internal/connection/RouteException;->getFirstConnectException()Ljava/io/IOException;
move-result-object p0
check-cast p0, Ljava/lang/Exception;
invoke-static {p0, v3}, Lokhttp3/internal/Util;->withSuppressed(Ljava/lang/Exception;Ljava/util/List;)Ljava/lang/Throwable;
move-result-object p0
throw p0
.line 72
:cond_8
new-instance p0, Ljava/io/IOException;
const-string p1, "Canceled"
invoke-direct {p0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
throw p0
:try_end_6
.catchall {:try_start_6 .. :try_end_6} :catchall_0
:catchall_0
move-exception p0
.line 133
invoke-virtual {v1, v5}, Lokhttp3/internal/connection/RealCall;->exitNetworkInterceptorExchange$okhttp(Z)V
throw p0
.end method