.class public final Lokhttp3/internal/http/RetryAndFollowUpInterceptor; .super Ljava/lang/Object; .source "RetryAndFollowUpInterceptor.java" # interfaces .implements Lokhttp3/Interceptor; # static fields .field private static final MAX_FOLLOW_UPS:I = 0x14 # instance fields .field private callStackTrace:Ljava/lang/Object; .field private volatile canceled:Z .field private final client:Lokhttp3/OkHttpClient; .field private final forWebSocket:Z .field private streamAllocation:Lokhttp3/internal/connection/StreamAllocation; # direct methods .method public constructor (Lokhttp3/OkHttpClient;Z)V .locals 0 .line 71 invoke-direct {p0}, Ljava/lang/Object;->()V .line 72 iput-object p1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; .line 73 iput-boolean p2, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->forWebSocket:Z return-void .end method .method private createAddress(Lokhttp3/HttpUrl;)Lokhttp3/Address; .locals 17 move-object/from16 v0, p0 .line 191 invoke-virtual/range {p1 .. p1}, Lokhttp3/HttpUrl;->isHttps()Z move-result v1 const/4 v2, 0x0 if-eqz v1, :cond_0 .line 192 iget-object v1, v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v1}, Lokhttp3/OkHttpClient;->sslSocketFactory()Ljavax/net/ssl/SSLSocketFactory; move-result-object v2 .line 193 iget-object v1, v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v1}, Lokhttp3/OkHttpClient;->hostnameVerifier()Ljavax/net/ssl/HostnameVerifier; move-result-object v1 .line 194 iget-object v3, v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v3}, Lokhttp3/OkHttpClient;->certificatePinner()Lokhttp3/CertificatePinner; move-result-object v3 move-object v10, v1 move-object v9, v2 move-object v11, v3 goto :goto_0 :cond_0 move-object v9, v2 move-object v10, v9 move-object v11, v10 .line 197 :goto_0 new-instance v1, Lokhttp3/Address; invoke-virtual/range {p1 .. p1}, Lokhttp3/HttpUrl;->host()Ljava/lang/String; move-result-object v5 invoke-virtual/range {p1 .. p1}, Lokhttp3/HttpUrl;->port()I move-result v6 iget-object v2, v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v2}, Lokhttp3/OkHttpClient;->dns()Lokhttp3/Dns; move-result-object v7 iget-object v2, v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v2}, Lokhttp3/OkHttpClient;->socketFactory()Ljavax/net/SocketFactory; move-result-object v8 iget-object v2, v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; .line 198 invoke-virtual {v2}, Lokhttp3/OkHttpClient;->proxyAuthenticator()Lokhttp3/Authenticator; move-result-object v12 iget-object v2, v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; .line 199 invoke-virtual {v2}, Lokhttp3/OkHttpClient;->proxy()Ljava/net/Proxy; move-result-object v13 iget-object v2, v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v2}, Lokhttp3/OkHttpClient;->protocols()Ljava/util/List; move-result-object v14 iget-object v2, v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v2}, Lokhttp3/OkHttpClient;->connectionSpecs()Ljava/util/List; move-result-object v15 iget-object v2, v0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v2}, Lokhttp3/OkHttpClient;->proxySelector()Ljava/net/ProxySelector; move-result-object v16 move-object v4, v1 invoke-direct/range {v4 .. v16}, Lokhttp3/Address;->(Ljava/lang/String;ILokhttp3/Dns;Ljavax/net/SocketFactory;Ljavax/net/ssl/SSLSocketFactory;Ljavax/net/ssl/HostnameVerifier;Lokhttp3/CertificatePinner;Lokhttp3/Authenticator;Ljava/net/Proxy;Ljava/util/List;Ljava/util/List;Ljava/net/ProxySelector;)V return-object v1 .end method .method private followUpRequest(Lokhttp3/Response;)Lokhttp3/Request; .locals 7 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation if-eqz p1, :cond_11 .line 266 iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; invoke-virtual {v0}, Lokhttp3/internal/connection/StreamAllocation;->connection()Lokhttp3/internal/connection/RealConnection; move-result-object v0 const/4 v1, 0x0 if-eqz v0, :cond_0 .line 268 invoke-interface {v0}, Lokhttp3/Connection;->route()Lokhttp3/Route; move-result-object v0 goto :goto_0 :cond_0 move-object v0, v1 .line 270 :goto_0 invoke-virtual {p1}, Lokhttp3/Response;->code()I move-result v2 .line 272 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 const-string v5, "GET" if-eq v2, v4, :cond_7 const/16 v4, 0x134 if-eq v2, v4, :cond_7 const/16 v4, 0x191 if-eq v2, v4, :cond_6 const/16 v4, 0x197 if-eq v2, v4, :cond_3 const/16 v0, 0x198 if-eq v2, v0, :cond_1 packed-switch v2, :pswitch_data_0 return-object v1 .line 342 :cond_1 invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request; move-result-object v0 invoke-virtual {v0}, Lokhttp3/Request;->body()Lokhttp3/RequestBody; move-result-object v0 instance-of v0, v0, Lokhttp3/internal/http/UnrepeatableRequestBody; if-eqz v0, :cond_2 return-object v1 .line 346 :cond_2 invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request; move-result-object p1 return-object p1 :cond_3 if-eqz v0, :cond_4 .line 276 invoke-virtual {v0}, Lokhttp3/Route;->proxy()Ljava/net/Proxy; move-result-object v1 goto :goto_1 .line 277 :cond_4 iget-object v1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v1}, Lokhttp3/OkHttpClient;->proxy()Ljava/net/Proxy; move-result-object v1 .line 278 :goto_1 invoke-virtual {v1}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type; move-result-object v1 sget-object v2, Ljava/net/Proxy$Type;->HTTP:Ljava/net/Proxy$Type; if-ne v1, v2, :cond_5 .line 281 iget-object v1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v1}, Lokhttp3/OkHttpClient;->proxyAuthenticator()Lokhttp3/Authenticator; move-result-object v1 invoke-interface {v1, v0, p1}, Lokhttp3/Authenticator;->authenticate(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request; move-result-object p1 return-object p1 .line 279 :cond_5 new-instance p1, Ljava/net/ProtocolException; const-string v0, "Received HTTP_PROXY_AUTH (407) code while not using proxy" invoke-direct {p1, v0}, Ljava/net/ProtocolException;->(Ljava/lang/String;)V throw p1 .line 284 :cond_6 iget-object v1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v1}, Lokhttp3/OkHttpClient;->authenticator()Lokhttp3/Authenticator; move-result-object v1 invoke-interface {v1, v0, p1}, Lokhttp3/Authenticator;->authenticate(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request; move-result-object p1 return-object p1 .line 290 :cond_7 invoke-virtual {v3, v5}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 if-nez v0, :cond_8 const-string v0, "HEAD" invoke-virtual {v3, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 if-nez v0, :cond_8 return-object v1 .line 299 :cond_8 :pswitch_0 iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; invoke-virtual {v0}, Lokhttp3/OkHttpClient;->followRedirects()Z move-result v0 if-nez v0, :cond_9 return-object v1 :cond_9 const-string v0, "Location" .line 301 invoke-virtual {p1, v0}, Lokhttp3/Response;->header(Ljava/lang/String;)Ljava/lang/String; move-result-object v0 if-nez v0, :cond_a return-object v1 .line 303 :cond_a 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-nez v0, :cond_b return-object v1 .line 309 :cond_b invoke-virtual {v0}, Lokhttp3/HttpUrl;->scheme()Ljava/lang/String; move-result-object v2 invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request; move-result-object v4 invoke-virtual {v4}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl; move-result-object v4 invoke-virtual {v4}, Lokhttp3/HttpUrl;->scheme()Ljava/lang/String; move-result-object v4 invoke-virtual {v2, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v2 if-nez v2, :cond_c .line 310 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_c return-object v1 .line 313 :cond_c 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 314 invoke-static {v3}, Lokhttp3/internal/http/HttpMethod;->permitsRequestBody(Ljava/lang/String;)Z move-result v4 if-eqz v4, :cond_f .line 315 invoke-static {v3}, Lokhttp3/internal/http/HttpMethod;->redirectsWithBody(Ljava/lang/String;)Z move-result v4 .line 316 invoke-static {v3}, Lokhttp3/internal/http/HttpMethod;->redirectsToGet(Ljava/lang/String;)Z move-result v6 if-eqz v6, :cond_d .line 317 invoke-virtual {v2, v5, v1}, Lokhttp3/Request$Builder;->method(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder; goto :goto_2 :cond_d if-eqz v4, :cond_e .line 319 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 320 :cond_e invoke-virtual {v2, v3, v1}, Lokhttp3/Request$Builder;->method(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder; :goto_2 if-nez v4, :cond_f const-string v1, "Transfer-Encoding" .line 323 invoke-virtual {v2, v1}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder; const-string v1, "Content-Length" .line 324 invoke-virtual {v2, v1}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder; const-string v1, "Content-Type" .line 325 invoke-virtual {v2, v1}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder; .line 332 :cond_f invoke-direct {p0, p1, v0}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->sameConnection(Lokhttp3/Response;Lokhttp3/HttpUrl;)Z move-result p1 if-nez p1, :cond_10 const-string p1, "Authorization" .line 333 invoke-virtual {v2, p1}, Lokhttp3/Request$Builder;->removeHeader(Ljava/lang/String;)Lokhttp3/Request$Builder; .line 336 :cond_10 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 .line 265 :cond_11 new-instance p1, Ljava/lang/IllegalStateException; invoke-direct {p1}, Ljava/lang/IllegalStateException;->()V throw p1 nop :pswitch_data_0 .packed-switch 0x12c :pswitch_0 :pswitch_0 :pswitch_0 :pswitch_0 .end packed-switch .end method .method private isRecoverable(Ljava/io/IOException;Z)Z .locals 3 .line 229 instance-of v0, p1, Ljava/net/ProtocolException; const/4 v1, 0x0 if-eqz v0, :cond_0 return v1 .line 235 :cond_0 instance-of v0, p1, Ljava/io/InterruptedIOException; const/4 v2, 0x1 if-eqz v0, :cond_2 .line 236 instance-of p1, p1, Ljava/net/SocketTimeoutException; if-eqz p1, :cond_1 if-nez p2, :cond_1 move v1, v2 :cond_1 return v1 .line 241 :cond_2 instance-of p2, p1, Ljavax/net/ssl/SSLHandshakeException; if-eqz p2, :cond_3 .line 244 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_3 return v1 .line 248 :cond_3 instance-of p1, p1, Ljavax/net/ssl/SSLPeerUnverifiedException; if-eqz p1, :cond_4 return v1 :cond_4 return v2 .end method .method private recover(Ljava/io/IOException;ZLokhttp3/Request;)Z .locals 2 .line 209 iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; invoke-virtual {v0, p1}, Lokhttp3/internal/connection/StreamAllocation;->streamFailed(Ljava/io/IOException;)V .line 212 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_0 return v1 :cond_0 if-eqz p2, :cond_1 .line 215 invoke-virtual {p3}, Lokhttp3/Request;->body()Lokhttp3/RequestBody; move-result-object p3 instance-of p3, p3, Lokhttp3/internal/http/UnrepeatableRequestBody; if-eqz p3, :cond_1 return v1 .line 218 :cond_1 invoke-direct {p0, p1, p2}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->isRecoverable(Ljava/io/IOException;Z)Z move-result p1 if-nez p1, :cond_2 return v1 .line 221 :cond_2 iget-object p1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; invoke-virtual {p1}, Lokhttp3/internal/connection/StreamAllocation;->hasMoreRoutes()Z move-result p1 if-nez p1, :cond_3 return v1 :cond_3 const/4 p1, 0x1 return p1 .end method .method private sameConnection(Lokhttp3/Response;Lokhttp3/HttpUrl;)Z .locals 2 .line 358 invoke-virtual {p1}, Lokhttp3/Response;->request()Lokhttp3/Request; move-result-object p1 invoke-virtual {p1}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl; move-result-object p1 .line 359 invoke-virtual {p1}, Lokhttp3/HttpUrl;->host()Ljava/lang/String; move-result-object v0 invoke-virtual {p2}, Lokhttp3/HttpUrl;->host()Ljava/lang/String; move-result-object v1 invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result v0 if-eqz v0, :cond_0 .line 360 invoke-virtual {p1}, Lokhttp3/HttpUrl;->port()I move-result v0 invoke-virtual {p2}, Lokhttp3/HttpUrl;->port()I move-result v1 if-ne v0, v1, :cond_0 .line 361 invoke-virtual {p1}, Lokhttp3/HttpUrl;->scheme()Ljava/lang/String; move-result-object p1 invoke-virtual {p2}, Lokhttp3/HttpUrl;->scheme()Ljava/lang/String; move-result-object p2 invoke-virtual {p1, p2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z move-result p1 if-eqz p1, :cond_0 const/4 p1, 0x1 goto :goto_0 :cond_0 const/4 p1, 0x0 :goto_0 return p1 .end method # virtual methods .method public cancel()V .locals 1 const/4 v0, 0x1 .line 86 iput-boolean v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->canceled:Z .line 87 iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; if-eqz v0, :cond_0 .line 88 invoke-virtual {v0}, Lokhttp3/internal/connection/StreamAllocation;->cancel()V :cond_0 return-void .end method .method public intercept(Lokhttp3/Interceptor$Chain;)Lokhttp3/Response; .locals 9 .annotation system Ldalvik/annotation/Throws; value = { Ljava/io/IOException; } .end annotation .line 104 invoke-interface {p1}, Lokhttp3/Interceptor$Chain;->request()Lokhttp3/Request; move-result-object v0 .line 106 new-instance v1, Lokhttp3/internal/connection/StreamAllocation; iget-object v2, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; .line 107 invoke-virtual {v2}, Lokhttp3/OkHttpClient;->connectionPool()Lokhttp3/ConnectionPool; move-result-object v2 invoke-virtual {v0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl; move-result-object v3 invoke-direct {p0, v3}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->createAddress(Lokhttp3/HttpUrl;)Lokhttp3/Address; move-result-object v3 iget-object v4, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->callStackTrace:Ljava/lang/Object; invoke-direct {v1, v2, v3, v4}, Lokhttp3/internal/connection/StreamAllocation;->(Lokhttp3/ConnectionPool;Lokhttp3/Address;Ljava/lang/Object;)V iput-object v1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; const/4 v1, 0x0 const/4 v2, 0x0 move v4, v1 move-object v3, v2 .line 112 :goto_0 iget-boolean v5, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->canceled:Z if-nez v5, :cond_a .line 120 :try_start_0 move-object v5, p1 check-cast v5, Lokhttp3/internal/http/RealInterceptorChain; iget-object v6, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; invoke-virtual {v5, v0, v6, v2, v2}, Lokhttp3/internal/http/RealInterceptorChain;->proceed(Lokhttp3/Request;Lokhttp3/internal/connection/StreamAllocation;Lokhttp3/internal/http/HttpCodec;Lokhttp3/internal/connection/RealConnection;)Lokhttp3/Response; move-result-object v0 :try_end_0 .catch Lokhttp3/internal/connection/RouteException; {:try_start_0 .. :try_end_0} :catch_1 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 if-eqz v3, :cond_0 .line 145 invoke-virtual {v0}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder; move-result-object v0 .line 146 invoke-virtual {v3}, Lokhttp3/Response;->newBuilder()Lokhttp3/Response$Builder; move-result-object v3 .line 147 invoke-virtual {v3, v2}, Lokhttp3/Response$Builder;->body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder; move-result-object v3 .line 148 invoke-virtual {v3}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response; move-result-object v3 .line 146 invoke-virtual {v0, v3}, Lokhttp3/Response$Builder;->priorResponse(Lokhttp3/Response;)Lokhttp3/Response$Builder; move-result-object v0 .line 149 invoke-virtual {v0}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response; move-result-object v0 :cond_0 move-object v3, v0 .line 152 invoke-direct {p0, v3}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->followUpRequest(Lokhttp3/Response;)Lokhttp3/Request; move-result-object v0 if-nez v0, :cond_2 .line 155 iget-boolean p1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->forWebSocket:Z if-nez p1, :cond_1 .line 156 iget-object p1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; invoke-virtual {p1}, Lokhttp3/internal/connection/StreamAllocation;->release()V :cond_1 return-object v3 .line 161 :cond_2 invoke-virtual {v3}, Lokhttp3/Response;->body()Lokhttp3/ResponseBody; move-result-object v5 invoke-static {v5}, Lokhttp3/internal/Util;->closeQuietly(Ljava/io/Closeable;)V add-int/lit8 v4, v4, 0x1 const/16 v5, 0x14 if-gt v4, v5, :cond_6 .line 168 invoke-virtual {v0}, Lokhttp3/Request;->body()Lokhttp3/RequestBody; move-result-object v5 instance-of v5, v5, Lokhttp3/internal/http/UnrepeatableRequestBody; if-nez v5, :cond_5 .line 173 invoke-virtual {v0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl; move-result-object v5 invoke-direct {p0, v3, v5}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->sameConnection(Lokhttp3/Response;Lokhttp3/HttpUrl;)Z move-result v5 if-nez v5, :cond_3 .line 174 iget-object v5, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; invoke-virtual {v5}, Lokhttp3/internal/connection/StreamAllocation;->release()V .line 175 new-instance v5, Lokhttp3/internal/connection/StreamAllocation; iget-object v6, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->client:Lokhttp3/OkHttpClient; .line 176 invoke-virtual {v6}, Lokhttp3/OkHttpClient;->connectionPool()Lokhttp3/ConnectionPool; move-result-object v6 invoke-virtual {v0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl; move-result-object v7 invoke-direct {p0, v7}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->createAddress(Lokhttp3/HttpUrl;)Lokhttp3/Address; move-result-object v7 iget-object v8, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->callStackTrace:Ljava/lang/Object; invoke-direct {v5, v6, v7, v8}, Lokhttp3/internal/connection/StreamAllocation;->(Lokhttp3/ConnectionPool;Lokhttp3/Address;Ljava/lang/Object;)V iput-object v5, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; goto :goto_0 .line 177 :cond_3 iget-object v5, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; invoke-virtual {v5}, Lokhttp3/internal/connection/StreamAllocation;->codec()Lokhttp3/internal/http/HttpCodec; move-result-object v5 if-nez v5, :cond_4 goto :goto_0 .line 178 :cond_4 new-instance p1, Ljava/lang/IllegalStateException; new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V const-string v1, "Closing the body of " invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; move-result-object v0 const-string v1, " didn\'t close its backing stream. Bad interceptor?" invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)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/lang/IllegalStateException;->(Ljava/lang/String;)V throw p1 .line 169 :cond_5 iget-object p1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; invoke-virtual {p1}, Lokhttp3/internal/connection/StreamAllocation;->release()V .line 170 new-instance p1, Ljava/net/HttpRetryException; invoke-virtual {v3}, Lokhttp3/Response;->code()I move-result v0 const-string v1, "Cannot retry streamed HTTP body" invoke-direct {p1, v1, v0}, Ljava/net/HttpRetryException;->(Ljava/lang/String;I)V throw p1 .line 164 :cond_6 iget-object p1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; invoke-virtual {p1}, Lokhttp3/internal/connection/StreamAllocation;->release()V .line 165 new-instance p1, Ljava/net/ProtocolException; new-instance v0, Ljava/lang/StringBuilder; invoke-direct {v0}, Ljava/lang/StringBuilder;->()V const-string v1, "Too many follow-up requests: " invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v0 invoke-virtual {v0, v4}, 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 throw p1 :catchall_0 move-exception p1 goto :goto_2 :catch_0 move-exception v5 .line 131 :try_start_1 instance-of v6, v5, Lokhttp3/internal/http2/ConnectionShutdownException; if-nez v6, :cond_7 const/4 v6, 0x1 goto :goto_1 :cond_7 move v6, v1 .line 132 :goto_1 invoke-direct {p0, v5, v6, v0}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->recover(Ljava/io/IOException;ZLokhttp3/Request;)Z move-result v6 if-eqz v6, :cond_8 goto/16 :goto_0 :cond_8 throw v5 :catch_1 move-exception v5 .line 124 invoke-virtual {v5}, Lokhttp3/internal/connection/RouteException;->getLastConnectException()Ljava/io/IOException; move-result-object v6 invoke-direct {p0, v6, v1, v0}, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->recover(Ljava/io/IOException;ZLokhttp3/Request;)Z move-result v6 if-eqz v6, :cond_9 goto/16 :goto_0 .line 125 :cond_9 invoke-virtual {v5}, Lokhttp3/internal/connection/RouteException;->getLastConnectException()Ljava/io/IOException; move-result-object p1 throw p1 :try_end_1 .catchall {:try_start_1 .. :try_end_1} :catchall_0 .line 138 :goto_2 iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; invoke-virtual {v0, v2}, Lokhttp3/internal/connection/StreamAllocation;->streamFailed(Ljava/io/IOException;)V .line 139 iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; invoke-virtual {v0}, Lokhttp3/internal/connection/StreamAllocation;->release()V throw p1 .line 113 :cond_a iget-object p1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; invoke-virtual {p1}, Lokhttp3/internal/connection/StreamAllocation;->release()V .line 114 new-instance p1, Ljava/io/IOException; const-string v0, "Canceled" invoke-direct {p1, v0}, Ljava/io/IOException;->(Ljava/lang/String;)V throw p1 .end method .method public isCanceled()Z .locals 1 .line 92 iget-boolean v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->canceled:Z return v0 .end method .method public setCallStackTrace(Ljava/lang/Object;)V .locals 0 .line 96 iput-object p1, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->callStackTrace:Ljava/lang/Object; return-void .end method .method public streamAllocation()Lokhttp3/internal/connection/StreamAllocation; .locals 1 .line 100 iget-object v0, p0, Lokhttp3/internal/http/RetryAndFollowUpInterceptor;->streamAllocation:Lokhttp3/internal/connection/StreamAllocation; return-object v0 .end method