.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 system Ldalvik/annotation/SourceDebugExtension; value = "SMAP\nRetryAndFollowUpInterceptor.kt\nKotlin\n*S Kotlin\n*F\n+ 1 RetryAndFollowUpInterceptor.kt\nokhttp3/internal/http/RetryAndFollowUpInterceptor\n*L\n1#1,352:1\n*E\n" .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, 0x1, 0x10 } .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 ()V .registers 2 new-instance v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor$Companion; const/4 v1, 0x0 invoke-direct {v0, v1}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor$Companion;->(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 (Lokhttp3/OkHttpClient;)V .registers 3 const-string v0, "client" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V .line 53 invoke-direct {p0}, Ljava/lang/Object;->()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; .registers 8 .line 296 iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v0}, Lokhttp3/OkHttpClient;->followRedirects()Z move-result v0 const/4 v1, 0x0 if-nez v0, :cond_a return-object v1 .line 298 :cond_a const-string v0, "Location" const/4 v2, 0x2 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_9c .line 300 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_9c .line 303 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_40 .line 304 iget-object v2, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v2}, Lokhttp3/OkHttpClient;->followSslRedirects()Z move-result v2 if-nez v2, :cond_40 return-object v1 .line 307 :cond_40 invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request; move-result-object v2 invoke-virtual {v2}, Lokhttp3/Request;->newBuilder()Lokhttp3/Request$Builder; move-result-object v2 .line 308 invoke-static {p2}, Lokhttp3/internal/http/HttpMethod;->permitsRequestBody(Ljava/lang/String;)Z move-result v3 if-eqz v3, :cond_80 .line 309 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 .line 310 sget-object v4, Lokhttp3/internal/http/HttpMethod;->INSTANCE:Lokhttp3/internal/http/HttpMethod; invoke-virtual {v4, p2}, Lokhttp3/internal/http/HttpMethod;->redirectsToGet(Ljava/lang/String;)Z move-result v4 if-eqz v4, :cond_62 .line 311 const-string p2, "GET" invoke-virtual {v2, p2, v1}, Lokhttp3/Request$Builder;->method(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder; goto :goto_6f :cond_62 if-eqz v3, :cond_6c .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_6c invoke-virtual {v2, p2, v1}, Lokhttp3/Request$Builder;->method(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder; :goto_6f if-nez v3, :cond_80 .line 317 const-string p2, "Transfer-Encoding" invoke-virtual {v2, p2}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder; .line 318 const-string p2, "Content-Length" invoke-virtual {v2, p2}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder; .line 319 const-string p2, "Content-Type" invoke-virtual {v2, p2}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder; .line 326 :cond_80 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_93 .line 327 const-string p1, "Authorization" invoke-virtual {v2, p1}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder; .line 330 :cond_93 invoke-virtual {v2, v0}, Lokhttp3/Request$Builder;->url(Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder; move-result-object p1 invoke-virtual {p1}, Lokhttp3/Request$Builder;->build()Lokhttp3/Request; move-result-object p1 return-object p1 :cond_9c return-object v1 .end method .method private final followUpRequest(Lokhttp3/Response;Lokhttp3/internal/connection/Exchange;)Lokhttp3/Request; .registers 8 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const/4 v0, 0x0 if-eqz p2, :cond_e .line 204 invoke-virtual {p2}, Lokhttp3/internal/connection/Exchange;->getConnection$okhttp()Lokhttp3/internal/connection/RealConnection; move-result-object v1 if-eqz v1, :cond_e invoke-virtual {v1}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route; move-result-object v1 goto :goto_f :cond_e move-object v1, v0 .line 205 :goto_f invoke-virtual {p1}, Lokhttp3/Response;->code()I move-result v2 .line 207 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_e8 const/16 v4, 0x134 if-eq v2, v4, :cond_e8 const/16 v4, 0x191 if-eq v2, v4, :cond_dd const/16 v4, 0x1a5 if-eq v2, v4, :cond_b6 const/16 p2, 0x1f7 if-eq v2, p2, :cond_9a const/16 p2, 0x197 if-eq v2, p2, :cond_74 const/16 p2, 0x198 if-eq v2, p2, :cond_40 packed-switch v2, :pswitch_data_fe return-object v0 .line 229 :pswitch_3b invoke-direct {p0, p1, v3}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->buildRedirectRequest(Lokhttp3/Response;Ljava/lang/String;)Lokhttp3/Request; move-result-object p1 return-object p1 .line 236 :cond_40 iget-object v1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v1}, Lokhttp3/OkHttpClient;->retryOnConnectionFailure()Z move-result v1 if-nez v1, :cond_49 return-object v0 .line 241 :cond_49 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_5a .line 242 invoke-virtual {v1}, Lokhttp3/RequestBody;->isOneShot()Z move-result v1 if-eqz v1, :cond_5a return-object v0 .line 245 :cond_5a invoke-virtual {p1}, Lokhttp3/Response;->priorResponse()Lokhttp3/Response; move-result-object v1 if-eqz v1, :cond_67 .line 246 invoke-virtual {v1}, Lokhttp3/Response;->code()I move-result v1 if-ne v1, p2, :cond_67 return-object v0 :cond_67 const/4 p2, 0x0 .line 251 invoke-direct {p0, p1, p2}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->retryAfter(Lokhttp3/Response;I)I move-result p2 if-lez p2, :cond_6f return-object v0 .line 255 :cond_6f invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request; move-result-object p1 return-object p1 :cond_74 if-nez v1, :cond_79 .line 210 invoke-static {}, Lkotlin/jvm/internal/Intrinsics;->throwNpe()V :cond_79 invoke-virtual {v1}, Lokhttp3/Route;->proxy()Ljava/net/Proxy; move-result-object p2 .line 211 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_90 .line 214 iget-object p2, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {p2}, Lokhttp3/OkHttpClient;->proxyAuthenticator()Lokhttp3/Authenticator; move-result-object p2 invoke-interface {p2, v1, p1}, Lokhttp3/Authenticator;->authenticate(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request; move-result-object p1 return-object p1 .line 212 :cond_90 new-instance p1, Ljava/net/ProtocolException; const-string p2, "Received HTTP_PROXY_AUTH (407) code while not using proxy" invoke-direct {p1, p2}, Ljava/net/ProtocolException;->(Ljava/lang/String;)V check-cast p1, Ljava/lang/Throwable; throw p1 .line 259 :cond_9a invoke-virtual {p1}, Lokhttp3/Response;->priorResponse()Lokhttp3/Response; move-result-object v1 if-eqz v1, :cond_a7 .line 260 invoke-virtual {v1}, Lokhttp3/Response;->code()I move-result v1 if-ne v1, p2, :cond_a7 return-object v0 :cond_a7 const p2, 0x7fffffff .line 265 invoke-direct {p0, p1, p2}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->retryAfter(Lokhttp3/Response;I)I move-result p2 if-nez p2, :cond_b5 .line 267 invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request; move-result-object p1 return-object p1 :cond_b5 return-object v0 .line 277 :cond_b6 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_c7 .line 278 invoke-virtual {v1}, Lokhttp3/RequestBody;->isOneShot()Z move-result v1 if-eqz v1, :cond_c7 return-object v0 :cond_c7 if-eqz p2, :cond_dc .line 282 invoke-virtual {p2}, Lokhttp3/internal/connection/Exchange;->isCoalescedConnection$okhttp()Z move-result v1 if-nez v1, :cond_d0 goto :goto_dc .line 286 :cond_d0 invoke-virtual {p2}, Lokhttp3/internal/connection/Exchange;->getConnection$okhttp()Lokhttp3/internal/connection/RealConnection; move-result-object p2 invoke-virtual {p2}, Lokhttp3/internal/connection/RealConnection;->noCoalescedConnections()V .line 287 invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request; move-result-object p1 return-object p1 :cond_dc :goto_dc return-object v0 .line 217 :cond_dd iget-object p2, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {p2}, Lokhttp3/OkHttpClient;->authenticator()Lokhttp3/Authenticator; move-result-object p2 invoke-interface {p2, v1, p1}, Lokhttp3/Authenticator;->authenticate(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request; move-result-object p1 return-object p1 .line 222 :cond_e8 const-string p2, "GET" invoke-static {v3, p2}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p2 if-nez p2, :cond_f9 const-string p2, "HEAD" invoke-static {v3, p2}, Lkotlin/jvm/internal/Intrinsics;->areEqual(Ljava/lang/Object;Ljava/lang/Object;)Z move-result p2 if-nez p2, :cond_f9 return-object v0 .line 225 :cond_f9 invoke-direct {p0, p1, v3}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->buildRedirectRequest(Lokhttp3/Response;Ljava/lang/String;)Lokhttp3/Request; move-result-object p1 return-object p1 :pswitch_data_fe .packed-switch 0x12c :pswitch_3b :pswitch_3b :pswitch_3b :pswitch_3b .end packed-switch .end method .method private final isRecoverable(Ljava/io/IOException;Z)Z .registers 6 .line 168 instance-of v0, p1, Ljava/net/ProtocolException; const/4 v1, 0x0 if-eqz v0, :cond_6 return v1 .line 174 :cond_6 instance-of v0, p1, Ljava/io/InterruptedIOException; const/4 v2, 0x1 if-eqz v0, :cond_13 .line 175 instance-of p1, p1, Ljava/net/SocketTimeoutException; if-eqz p1, :cond_12 if-nez p2, :cond_12 move v1, v2 :cond_12 return v1 .line 180 :cond_13 instance-of p2, p1, Ljavax/net/ssl/SSLHandshakeException; if-eqz p2, :cond_20 .line 183 invoke-virtual {p1}, Ljava/io/IOException;->getCause()Ljava/lang/Throwable; move-result-object p2 instance-of p2, p2, Ljava/security/cert/CertificateException; if-eqz p2, :cond_20 return v1 .line 187 :cond_20 instance-of p1, p1, Ljavax/net/ssl/SSLPeerUnverifiedException; if-eqz p1, :cond_25 return v1 :cond_25 return v2 .end method .method private final recover(Ljava/io/IOException;Lokhttp3/internal/connection/RealCall;Lokhttp3/Request;Z)Z .registers 7 .line 145 iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v0}, Lokhttp3/OkHttpClient;->retryOnConnectionFailure()Z move-result v0 const/4 v1, 0x0 if-nez v0, :cond_a return v1 :cond_a if-eqz p4, :cond_13 .line 148 invoke-direct {p0, p1, p3}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->requestIsOneShot(Ljava/io/IOException;Lokhttp3/Request;)Z move-result p3 if-eqz p3, :cond_13 return v1 .line 151 :cond_13 invoke-direct {p0, p1, p4}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->isRecoverable(Ljava/io/IOException;Z)Z move-result p1 if-nez p1, :cond_1a return v1 .line 154 :cond_1a invoke-virtual {p2}, Lokhttp3/internal/connection/RealCall;->retryAfterFailure()Z move-result p1 if-nez p1, :cond_21 return v1 :cond_21 const/4 p1, 0x1 return p1 .end method .method private final requestIsOneShot(Ljava/io/IOException;Lokhttp3/Request;)Z .registers 3 .line 161 invoke-virtual {p2}, Lokhttp3/Request;->body()Lokhttp3/RequestBody; move-result-object p2 if-eqz p2, :cond_c .line 162 invoke-virtual {p2}, Lokhttp3/RequestBody;->isOneShot()Z move-result p2 if-nez p2, :cond_10 .line 163 :cond_c instance-of p1, p1, Ljava/io/FileNotFoundException; if-eqz p1, :cond_12 :cond_10 const/4 p1, 0x1 goto :goto_13 :cond_12 const/4 p1, 0x0 :goto_13 return p1 .end method .method private final retryAfter(Lokhttp3/Response;I)I .registers 6 const/4 v0, 0x0 const/4 v1, 0x2 .line 334 const-string v2, "Retry-After" invoke-static {p1, v2, v0, v1, v0}, Lokhttp3/Response;->header$default(Lokhttp3/Response;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Ljava/lang/String; move-result-object p1 if-eqz p1, :cond_2c .line 338 move-object p2, p1 check-cast p2, Ljava/lang/CharSequence; new-instance v0, Lkotlin/text/Regex; const-string v1, "\\d+" invoke-direct {v0, v1}, Lkotlin/text/Regex;->(Ljava/lang/String;)V invoke-virtual {v0, p2}, Lkotlin/text/Regex;->matches(Ljava/lang/CharSequence;)Z move-result p2 if-eqz p2, :cond_28 .line 339 invoke-static {p1}, Ljava/lang/Integer;->valueOf(Ljava/lang/String;)Ljava/lang/Integer; move-result-object p1 const-string p2, "Integer.valueOf(header)" invoke-static {p1, p2}, Lkotlin/jvm/internal/Intrinsics;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I move-result p1 return p1 :cond_28 const p1, 0x7fffffff return p1 :cond_2c return p2 .end method # virtual methods .method public intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response; .registers 11 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation const-string v0, "chain" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V .line 57 check-cast p1, Lokhttp3/internal/http/RealInterceptorChain; .line 58 invoke-virtual {p1}, Lokhttp3/internal/http/RealInterceptorChain;->getRequest$okhttp()Lokhttp3/Request; move-result-object v0 .line 59 invoke-virtual {p1}, Lokhttp3/internal/http/RealInterceptorChain;->getCall$okhttp()Lokhttp3/internal/connection/RealCall; move-result-object v1 const/4 v2, 0x0 .line 61 move-object v3, v2 check-cast v3, Lokhttp3/Response; const/4 v3, 0x0 const/4 v4, 0x1 move-object v6, v2 move v7, v3 :goto_17 move v5, v4 .line 64 :goto_18 invoke-virtual {v1, v0, v5}, Lokhttp3/internal/connection/RealCall;->enterNetworkInterceptorExchange(Lokhttp3/Request;Z)V .line 69 :try_start_1b invoke-virtual {v1}, Lokhttp3/internal/connection/RealCall;->isCanceled()Z move-result v5 :try_end_1f .catchall {:try_start_1b .. :try_end_1f} :catchall_ca if-nez v5, :cond_c0 .line 74 :try_start_21 invoke-virtual {p1, v0}, Lokhttp3/internal/http/RealInterceptorChain;->proceed(Lokhttp3/Request;)Lokhttp3/Response; move-result-object v0 :try_end_25 .catch Lokhttp3/internal/connection/RouteException; {:try_start_21 .. :try_end_25} :catch_a8 .catch Ljava/io/IOException; {:try_start_21 .. :try_end_25} :catch_9a .catchall {:try_start_21 .. :try_end_25} :catchall_ca if-eqz v6, :cond_3f .line 94 :try_start_27 invoke-virtual {v0}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder; move-result-object v0 .line 95 invoke-virtual {v6}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder; move-result-object v5 .line 96 invoke-virtual {v5, v2}, Lokhttp3/Response$Builder;->body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder; move-result-object v5 .line 97 invoke-virtual {v5}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response; move-result-object v5 .line 95 invoke-virtual {v0, v5}, Lokhttp3/Response$Builder;->priorResponse(Lokhttp3/Response;)Lokhttp3/Response$Builder; move-result-object v0 .line 98 invoke-virtual {v0}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response; move-result-object v0 :cond_3f move-object v6, v0 .line 101 invoke-virtual {v1}, Lokhttp3/internal/connection/RealCall;->getInterceptorScopedExchange$okhttp()Lokhttp3/internal/connection/Exchange; move-result-object v0 .line 102 invoke-direct {p0, v6, v0}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->followUpRequest(Lokhttp3/Response;Lokhttp3/internal/connection/Exchange;)Lokhttp3/Request; move-result-object v5 if-nez v5, :cond_59 if-eqz v0, :cond_55 .line 105 invoke-virtual {v0}, Lokhttp3/internal/connection/Exchange;->isDuplex$okhttp()Z move-result p1 if-eqz p1, :cond_55 .line 106 invoke-virtual {v1}, Lokhttp3/internal/connection/RealCall;->timeoutEarlyExit()V :try_end_55 .catchall {:try_start_27 .. :try_end_55} :catchall_ca .line 127 :cond_55 invoke-virtual {v1, v3}, Lokhttp3/internal/connection/RealCall;->exitNetworkInterceptorExchange$okhttp(Z)V return-object v6 .line 112 :cond_59 :try_start_59 invoke-virtual {v5}, Lokhttp3/Request;->body()Lokhttp3/RequestBody; move-result-object v0 if-eqz v0, :cond_69 .line 113 invoke-virtual {v0}, Lokhttp3/RequestBody;->isOneShot()Z move-result v0 :try_end_63 .catchall {:try_start_59 .. :try_end_63} :catchall_ca if-eqz v0, :cond_69 .line 127 invoke-virtual {v1, v3}, Lokhttp3/internal/connection/RealCall;->exitNetworkInterceptorExchange$okhttp(Z)V return-object v6 .line 118 :cond_69 :try_start_69 invoke-virtual {v6}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody; move-result-object v0 if-eqz v0, :cond_74 check-cast v0, Ljava/io/Closeable; invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V :try_end_74 .catchall {:try_start_69 .. :try_end_74} :catchall_ca :cond_74 add-int/lit8 v7, v7, 0x1 const/16 v0, 0x14 if-gt v7, v0, :cond_7f .line 127 invoke-virtual {v1, v4}, Lokhttp3/internal/connection/RealCall;->exitNetworkInterceptorExchange$okhttp(Z)V move-object v0, v5 goto :goto_17 .line 121 :cond_7f :try_start_7f new-instance p1, Ljava/net/ProtocolException; new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V const-string v2, "Too many follow-up requests: " invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0, v7}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v0 invoke-direct {p1, v0}, Ljava/net/ProtocolException;->(Ljava/lang/String;)V check-cast p1, Ljava/lang/Throwable; throw p1 :catch_9a move-exception v5 .line 85 instance-of v8, v5, Lokhttp3/internal/http2/ConnectionShutdownException; xor-int/2addr v8, v4 invoke-direct {p0, v5, v1, v0, v8}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->recover(Ljava/io/IOException;Lokhttp3/internal/connection/RealCall;Lokhttp3/Request;Z)Z move-result v8 if-eqz v8, :cond_a5 goto :goto_b3 .line 86 :cond_a5 check-cast v5, Ljava/lang/Throwable; throw v5 :catch_a8 move-exception v5 .line 78 invoke-virtual {v5}, Lokhttp3/internal/connection/RouteException;->getLastConnectException()Ljava/io/IOException; move-result-object v8 invoke-direct {p0, v8, v1, v0, v3}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->recover(Ljava/io/IOException;Lokhttp3/internal/connection/RealCall;Lokhttp3/Request;Z)Z move-result v8 :try_end_b1 .catchall {:try_start_7f .. :try_end_b1} :catchall_ca if-eqz v8, :cond_b9 .line 127 :goto_b3 invoke-virtual {v1, v4}, Lokhttp3/internal/connection/RealCall;->exitNetworkInterceptorExchange$okhttp(Z)V move v5, v3 goto/16 :goto_18 .line 79 :cond_b9 :try_start_b9 invoke-virtual {v5}, Lokhttp3/internal/connection/RouteException;->getFirstConnectException()Ljava/io/IOException; move-result-object p1 check-cast p1, Ljava/lang/Throwable; throw p1 .line 70 :cond_c0 new-instance p1, Ljava/io/IOException; const-string v0, "Canceled" invoke-direct {p1, v0}, Ljava/io/IOException;->(Ljava/lang/String;)V check-cast p1, Ljava/lang/Throwable; throw p1 :try_end_ca .catchall {:try_start_b9 .. :try_end_ca} :catchall_ca :catchall_ca move-exception p1 .line 127 invoke-virtual {v1, v4}, Lokhttp3/internal/connection/RealCall;->exitNetworkInterceptorExchange$okhttp(Z)V throw p1 .end method