- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3 - APKTool decompilation (Smali bytecode) for modding and rebuilding APK - Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures - Includes full Smali source, resources, and native libraries - Ready to rebuild APK after modifications with apktool b command - Added comprehensive README-apktool.md with modding guide This branch complements the JADX branches: - Use JADX (main/discord-community) to UNDERSTAND code (readable Java) - Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali) Total: 44,417 files, 538.51 MB Smali source code
2572 lines
68 KiB
Smali
2572 lines
68 KiB
Smali
.class public final Lokhttp3/internal/connection/RealConnection;
|
|
.super Lokhttp3/internal/http2/Http2Connection$Listener;
|
|
.source "SourceFile"
|
|
|
|
# interfaces
|
|
.implements Lokhttp3/Connection;
|
|
|
|
|
|
# instance fields
|
|
.field public allocationLimit:I
|
|
|
|
.field public final connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.field public handshake:Lokhttp3/Handshake;
|
|
|
|
.field public http2Connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
.field public idleAtNanos:J
|
|
|
|
.field public noNewExchanges:Z
|
|
|
|
.field public protocol:Lokhttp3/Protocol;
|
|
|
|
.field public rawSocket:Ljava/net/Socket;
|
|
|
|
.field public refusedStreamCount:I
|
|
|
|
.field public final route:Lokhttp3/Route;
|
|
|
|
.field public routeFailureCount:I
|
|
|
|
.field public sink:Lokio/BufferedSink;
|
|
|
|
.field public socket:Ljava/net/Socket;
|
|
|
|
.field public source:Lokio/BufferedSource;
|
|
|
|
.field public successCount:I
|
|
|
|
.field public final transmitters:Ljava/util/List;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 0
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Lokhttp3/internal/connection/RealConnectionPool;Lokhttp3/Route;)V
|
|
.locals 2
|
|
|
|
.line 127
|
|
invoke-direct {p0}, Lokhttp3/internal/http2/Http2Connection$Listener;-><init>()V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
iput v0, p0, Lokhttp3/internal/connection/RealConnection;->allocationLimit:I
|
|
|
|
.line 122
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
iput-object v0, p0, Lokhttp3/internal/connection/RealConnection;->transmitters:Ljava/util/List;
|
|
|
|
const-wide v0, 0x7fffffffffffffffL
|
|
|
|
iput-wide v0, p0, Lokhttp3/internal/connection/RealConnection;->idleAtNanos:J
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/RealConnection;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
iput-object p2, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public cancel()V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
.line 569
|
|
invoke-static {v0}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public connect(IIIIZLokhttp3/Call;Lokhttp3/EventListener;)V
|
|
.locals 16
|
|
|
|
move-object/from16 v7, p0
|
|
|
|
move-object/from16 v8, p6
|
|
|
|
move-object/from16 v9, p7
|
|
|
|
iget-object v0, v7, Lokhttp3/internal/connection/RealConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
if-nez v0, :cond_b
|
|
|
|
iget-object v0, v7, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 154
|
|
invoke-virtual {v0}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Address;->connectionSpecs()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
.line 155
|
|
new-instance v10, Lokhttp3/internal/connection/ConnectionSpecSelector;
|
|
|
|
invoke-direct {v10, v0}, Lokhttp3/internal/connection/ConnectionSpecSelector;-><init>(Ljava/util/List;)V
|
|
|
|
iget-object v1, v7, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 157
|
|
invoke-virtual {v1}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Address;->sslSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
move-result-object v1
|
|
|
|
if-nez v1, :cond_2
|
|
|
|
.line 158
|
|
sget-object v1, Lokhttp3/ConnectionSpec;->CLEARTEXT:Lokhttp3/ConnectionSpec;
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
iget-object v0, v7, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 162
|
|
invoke-virtual {v0}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 163
|
|
invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, v0}, Lokhttp3/internal/platform/Platform;->isCleartextTrafficPermitted(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 164
|
|
:cond_0
|
|
new-instance v1, Lokhttp3/internal/connection/RouteException;
|
|
|
|
new-instance v2, Ljava/net/UnknownServiceException;
|
|
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "CLEARTEXT communication to "
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, " not permitted by network security policy"
|
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {v2, v0}, Ljava/net/UnknownServiceException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-direct {v1, v2}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
|
|
|
|
throw v1
|
|
|
|
.line 159
|
|
:cond_1
|
|
new-instance v0, Lokhttp3/internal/connection/RouteException;
|
|
|
|
new-instance v1, Ljava/net/UnknownServiceException;
|
|
|
|
const-string v2, "CLEARTEXT communication not enabled for client"
|
|
|
|
invoke-direct {v1, v2}, Ljava/net/UnknownServiceException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
|
|
|
|
throw v0
|
|
|
|
:cond_2
|
|
iget-object v0, v7, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 168
|
|
invoke-virtual {v0}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Address;->protocols()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lokhttp3/Protocol;->H2_PRIOR_KNOWLEDGE:Lokhttp3/Protocol;
|
|
|
|
invoke-interface {v0, v1}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_a
|
|
|
|
:goto_0
|
|
const/4 v11, 0x0
|
|
|
|
move-object v12, v11
|
|
|
|
:goto_1
|
|
:try_start_0
|
|
iget-object v0, v7, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 176
|
|
invoke-virtual {v0}, Lokhttp3/Route;->requiresTunnel()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
move/from16 v2, p1
|
|
|
|
move/from16 v3, p2
|
|
|
|
move/from16 v4, p3
|
|
|
|
move-object/from16 v5, p6
|
|
|
|
move-object/from16 v6, p7
|
|
|
|
.line 177
|
|
invoke-virtual/range {v1 .. v6}, Lokhttp3/internal/connection/RealConnection;->connectTunnel(IIILokhttp3/Call;Lokhttp3/EventListener;)V
|
|
|
|
iget-object v0, v7, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
goto :goto_5
|
|
|
|
:cond_3
|
|
move/from16 v13, p1
|
|
|
|
move/from16 v14, p2
|
|
|
|
:goto_2
|
|
move/from16 v15, p4
|
|
|
|
goto :goto_4
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
move/from16 v13, p1
|
|
|
|
move/from16 v14, p2
|
|
|
|
:goto_3
|
|
move/from16 v15, p4
|
|
|
|
goto :goto_8
|
|
|
|
:cond_4
|
|
move/from16 v13, p1
|
|
|
|
move/from16 v14, p2
|
|
|
|
.line 183
|
|
:try_start_1
|
|
invoke-virtual {v7, v13, v14, v8, v9}, Lokhttp3/internal/connection/RealConnection;->connectSocket(IILokhttp3/Call;Lokhttp3/EventListener;)V
|
|
:try_end_1
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_2
|
|
|
|
goto :goto_2
|
|
|
|
.line 185
|
|
:goto_4
|
|
:try_start_2
|
|
invoke-virtual {v7, v10, v15, v8, v9}, Lokhttp3/internal/connection/RealConnection;->establishProtocol(Lokhttp3/internal/connection/ConnectionSpecSelector;ILokhttp3/Call;Lokhttp3/EventListener;)V
|
|
|
|
iget-object v0, v7, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 186
|
|
invoke-virtual {v0}, Lokhttp3/Route;->socketAddress()Ljava/net/InetSocketAddress;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, v7, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Route;->proxy()Ljava/net/Proxy;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, v7, Lokhttp3/internal/connection/RealConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
invoke-virtual {v9, v8, v0, v1, v2}, Lokhttp3/EventListener;->connectEnd(Lokhttp3/Call;Ljava/net/InetSocketAddress;Ljava/net/Proxy;Lokhttp3/Protocol;)V
|
|
:try_end_2
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_1
|
|
|
|
:goto_5
|
|
iget-object v0, v7, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 213
|
|
invoke-virtual {v0}, Lokhttp3/Route;->requiresTunnel()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
iget-object v0, v7, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
goto :goto_6
|
|
|
|
.line 214
|
|
:cond_5
|
|
new-instance v0, Ljava/net/ProtocolException;
|
|
|
|
const-string v1, "Too many tunnel connections attempted: 21"
|
|
|
|
invoke-direct {v0, v1}, Ljava/net/ProtocolException;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 216
|
|
new-instance v1, Lokhttp3/internal/connection/RouteException;
|
|
|
|
invoke-direct {v1, v0}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
|
|
|
|
throw v1
|
|
|
|
:cond_6
|
|
:goto_6
|
|
iget-object v0, v7, Lokhttp3/internal/connection/RealConnection;->http2Connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
iget-object v1, v7, Lokhttp3/internal/connection/RealConnection;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 220
|
|
monitor-enter v1
|
|
|
|
:try_start_3
|
|
iget-object v0, v7, Lokhttp3/internal/connection/RealConnection;->http2Connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
.line 221
|
|
invoke-virtual {v0}, Lokhttp3/internal/http2/Http2Connection;->maxConcurrentStreams()I
|
|
|
|
move-result v0
|
|
|
|
iput v0, v7, Lokhttp3/internal/connection/RealConnection;->allocationLimit:I
|
|
|
|
.line 222
|
|
monitor-exit v1
|
|
|
|
goto :goto_7
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
monitor-exit v1
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_0
|
|
|
|
throw v0
|
|
|
|
:cond_7
|
|
:goto_7
|
|
return-void
|
|
|
|
:catch_1
|
|
move-exception v0
|
|
|
|
goto :goto_8
|
|
|
|
:catch_2
|
|
move-exception v0
|
|
|
|
goto :goto_3
|
|
|
|
:goto_8
|
|
iget-object v1, v7, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
.line 189
|
|
invoke-static {v1}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
|
|
|
|
iget-object v1, v7, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
.line 190
|
|
invoke-static {v1}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
|
|
|
|
iput-object v11, v7, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
iput-object v11, v7, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
iput-object v11, v7, Lokhttp3/internal/connection/RealConnection;->source:Lokio/BufferedSource;
|
|
|
|
iput-object v11, v7, Lokhttp3/internal/connection/RealConnection;->sink:Lokio/BufferedSink;
|
|
|
|
iput-object v11, v7, Lokhttp3/internal/connection/RealConnection;->handshake:Lokhttp3/Handshake;
|
|
|
|
iput-object v11, v7, Lokhttp3/internal/connection/RealConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
iput-object v11, v7, Lokhttp3/internal/connection/RealConnection;->http2Connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
iget-object v1, v7, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 199
|
|
invoke-virtual {v1}, Lokhttp3/Route;->socketAddress()Ljava/net/InetSocketAddress;
|
|
|
|
move-result-object v3
|
|
|
|
iget-object v1, v7, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Route;->proxy()Ljava/net/Proxy;
|
|
|
|
move-result-object v4
|
|
|
|
const/4 v5, 0x0
|
|
|
|
move-object/from16 v1, p7
|
|
|
|
move-object/from16 v2, p6
|
|
|
|
move-object v6, v0
|
|
|
|
invoke-virtual/range {v1 .. v6}, Lokhttp3/EventListener;->connectFailed(Lokhttp3/Call;Ljava/net/InetSocketAddress;Ljava/net/Proxy;Lokhttp3/Protocol;Ljava/io/IOException;)V
|
|
|
|
if-nez v12, :cond_8
|
|
|
|
.line 202
|
|
new-instance v12, Lokhttp3/internal/connection/RouteException;
|
|
|
|
invoke-direct {v12, v0}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
|
|
|
|
goto :goto_9
|
|
|
|
.line 204
|
|
:cond_8
|
|
invoke-virtual {v12, v0}, Lokhttp3/internal/connection/RouteException;->addConnectException(Ljava/io/IOException;)V
|
|
|
|
:goto_9
|
|
if-eqz p5, :cond_9
|
|
|
|
.line 207
|
|
invoke-virtual {v10, v0}, Lokhttp3/internal/connection/ConnectionSpecSelector;->connectionFailed(Ljava/io/IOException;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
goto/16 :goto_1
|
|
|
|
.line 208
|
|
:cond_9
|
|
throw v12
|
|
|
|
.line 169
|
|
:cond_a
|
|
new-instance v0, Lokhttp3/internal/connection/RouteException;
|
|
|
|
new-instance v1, Ljava/net/UnknownServiceException;
|
|
|
|
const-string v2, "H2_PRIOR_KNOWLEDGE cannot be used with HTTPS"
|
|
|
|
invoke-direct {v1, v2}, Ljava/net/UnknownServiceException;-><init>(Ljava/lang/String;)V
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/connection/RouteException;-><init>(Ljava/io/IOException;)V
|
|
|
|
throw v0
|
|
|
|
.line 151
|
|
:cond_b
|
|
new-instance v0, Ljava/lang/IllegalStateException;
|
|
|
|
const-string v1, "already connected"
|
|
|
|
invoke-direct {v0, v1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v0
|
|
.end method
|
|
|
|
.method public final connectSocket(IILokhttp3/Call;Lokhttp3/EventListener;)V
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 253
|
|
invoke-virtual {v0}, Lokhttp3/Route;->proxy()Ljava/net/Proxy;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 254
|
|
invoke-virtual {v1}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v1
|
|
|
|
.line 256
|
|
invoke-virtual {v0}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Ljava/net/Proxy$Type;->DIRECT:Ljava/net/Proxy$Type;
|
|
|
|
if-eq v2, v3, :cond_1
|
|
|
|
invoke-virtual {v0}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Ljava/net/Proxy$Type;->HTTP:Ljava/net/Proxy$Type;
|
|
|
|
if-ne v2, v3, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 258
|
|
:cond_0
|
|
new-instance v1, Ljava/net/Socket;
|
|
|
|
invoke-direct {v1, v0}, Ljava/net/Socket;-><init>(Ljava/net/Proxy;)V
|
|
|
|
goto :goto_1
|
|
|
|
.line 257
|
|
:cond_1
|
|
:goto_0
|
|
invoke-virtual {v1}, Lokhttp3/Address;->socketFactory()Ljavax/net/SocketFactory;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljavax/net/SocketFactory;->createSocket()Ljava/net/Socket;
|
|
|
|
move-result-object v1
|
|
|
|
:goto_1
|
|
iput-object v1, p0, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 260
|
|
invoke-virtual {v1}, Lokhttp3/Route;->socketAddress()Ljava/net/InetSocketAddress;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {p4, p3, v1, v0}, Lokhttp3/EventListener;->connectStart(Lokhttp3/Call;Ljava/net/InetSocketAddress;Ljava/net/Proxy;)V
|
|
|
|
iget-object p3, p0, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
.line 261
|
|
invoke-virtual {p3, p2}, Ljava/net/Socket;->setSoTimeout(I)V
|
|
|
|
.line 263
|
|
:try_start_0
|
|
invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
|
|
|
|
move-result-object p2
|
|
|
|
iget-object p3, p0, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
iget-object p4, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
invoke-virtual {p4}, Lokhttp3/Route;->socketAddress()Ljava/net/InetSocketAddress;
|
|
|
|
move-result-object p4
|
|
|
|
invoke-virtual {p2, p3, p4, p1}, Lokhttp3/internal/platform/Platform;->connectSocket(Ljava/net/Socket;Ljava/net/InetSocketAddress;I)V
|
|
:try_end_0
|
|
.catch Ljava/net/ConnectException; {:try_start_0 .. :try_end_0} :catch_1
|
|
|
|
:try_start_1
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
.line 275
|
|
invoke-static {p1}, Lokio/Okio;->source(Ljava/net/Socket;)Lokio/Source;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/RealConnection;->source:Lokio/BufferedSource;
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
.line 276
|
|
invoke-static {p1}, Lokio/Okio;->sink(Ljava/net/Socket;)Lokio/Sink;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lokio/Okio;->buffer(Lokio/Sink;)Lokio/BufferedSink;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/RealConnection;->sink:Lokio/BufferedSink;
|
|
:try_end_1
|
|
.catch Ljava/lang/NullPointerException; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
goto :goto_2
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
const-string p2, "throw with null exception"
|
|
|
|
.line 278
|
|
invoke-virtual {p1}, Ljava/lang/Throwable;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_2
|
|
|
|
:goto_2
|
|
return-void
|
|
|
|
.line 279
|
|
:cond_2
|
|
new-instance p2, Ljava/io/IOException;
|
|
|
|
invoke-direct {p2, p1}, Ljava/io/IOException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw p2
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
.line 265
|
|
new-instance p2, Ljava/net/ConnectException;
|
|
|
|
new-instance p3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string p4, "Failed to connect to "
|
|
|
|
invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object p4, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
invoke-virtual {p4}, Lokhttp3/Route;->socketAddress()Ljava/net/InetSocketAddress;
|
|
|
|
move-result-object p4
|
|
|
|
invoke-virtual {p3, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
invoke-direct {p2, p3}, Ljava/net/ConnectException;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 266
|
|
invoke-virtual {p2, p1}, Ljava/lang/Throwable;->initCause(Ljava/lang/Throwable;)Ljava/lang/Throwable;
|
|
|
|
.line 267
|
|
throw p2
|
|
.end method
|
|
|
|
.method public final connectTls(Lokhttp3/internal/connection/ConnectionSpecSelector;)V
|
|
.locals 7
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 319
|
|
invoke-virtual {v0}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v0
|
|
|
|
.line 320
|
|
invoke-virtual {v0}, Lokhttp3/Address;->sslSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:try_start_0
|
|
iget-object v3, p0, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
.line 326
|
|
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v5}, Lokhttp3/HttpUrl;->port()I
|
|
|
|
move-result v5
|
|
|
|
const/4 v6, 0x1
|
|
|
|
.line 325
|
|
invoke-virtual {v1, v3, v4, v5, v6}, Ljavax/net/ssl/SSLSocketFactory;->createSocket(Ljava/net/Socket;Ljava/lang/String;IZ)Ljava/net/Socket;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Ljavax/net/ssl/SSLSocket;
|
|
:try_end_0
|
|
.catch Ljava/lang/AssertionError; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
.line 329
|
|
:try_start_1
|
|
invoke-virtual {p1, v1}, Lokhttp3/internal/connection/ConnectionSpecSelector;->configureSecureSocket(Ljavax/net/ssl/SSLSocket;)Lokhttp3/ConnectionSpec;
|
|
|
|
move-result-object p1
|
|
|
|
.line 330
|
|
invoke-virtual {p1}, Lokhttp3/ConnectionSpec;->supportsTlsExtensions()Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
.line 331
|
|
invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
|
|
|
|
move-result-object v3
|
|
|
|
.line 332
|
|
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Address;->protocols()Ljava/util/List;
|
|
|
|
move-result-object v5
|
|
|
|
.line 331
|
|
invoke-virtual {v3, v1, v4, v5}, Lokhttp3/internal/platform/Platform;->configureTlsExtensions(Ljavax/net/ssl/SSLSocket;Ljava/lang/String;Ljava/util/List;)V
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
move-object v2, v1
|
|
|
|
goto/16 :goto_3
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
move-object v2, v1
|
|
|
|
goto/16 :goto_2
|
|
|
|
.line 336
|
|
:cond_0
|
|
:goto_0
|
|
invoke-virtual {v1}, Ljavax/net/ssl/SSLSocket;->startHandshake()V
|
|
|
|
.line 338
|
|
invoke-virtual {v1}, Ljavax/net/ssl/SSLSocket;->getSession()Ljavax/net/ssl/SSLSession;
|
|
|
|
move-result-object v3
|
|
|
|
.line 339
|
|
invoke-static {v3}, Lokhttp3/Handshake;->get(Ljavax/net/ssl/SSLSession;)Lokhttp3/Handshake;
|
|
|
|
move-result-object v4
|
|
|
|
.line 342
|
|
invoke-virtual {v0}, Lokhttp3/Address;->hostnameVerifier()Ljavax/net/ssl/HostnameVerifier;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-virtual {v6}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v6
|
|
|
|
invoke-interface {v5, v6, v3}, Ljavax/net/ssl/HostnameVerifier;->verify(Ljava/lang/String;Ljavax/net/ssl/SSLSession;)Z
|
|
|
|
move-result v3
|
|
|
|
if-nez v3, :cond_2
|
|
|
|
.line 343
|
|
invoke-virtual {v4}, Lokhttp3/Handshake;->peerCertificates()Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
.line 344
|
|
invoke-interface {p1}, Ljava/util/List;->isEmpty()Z
|
|
|
|
move-result v2
|
|
:try_end_1
|
|
.catch Ljava/lang/AssertionError; {:try_start_1 .. :try_end_1} :catch_0
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
const-string v3, "Hostname "
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 345
|
|
:try_start_2
|
|
invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/security/cert/X509Certificate;
|
|
|
|
.line 346
|
|
new-instance v2, Ljavax/net/ssl/SSLPeerUnverifiedException;
|
|
|
|
new-instance v4, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v4}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v4, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 347
|
|
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, " not verified:\n certificate: "
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 348
|
|
invoke-static {p1}, Lokhttp3/CertificatePinner;->pin(Ljava/security/cert/Certificate;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "\n DN: "
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 349
|
|
invoke-virtual {p1}, Ljava/security/cert/X509Certificate;->getSubjectDN()Ljava/security/Principal;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0}, Ljava/security/Principal;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "\n subjectAltNames: "
|
|
|
|
invoke-virtual {v4, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 350
|
|
invoke-static {p1}, Lokhttp3/internal/tls/OkHostnameVerifier;->allSubjectAltNames(Ljava/security/cert/X509Certificate;)Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v4, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-direct {v2, p1}, Ljavax/net/ssl/SSLPeerUnverifiedException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw v2
|
|
|
|
.line 352
|
|
:cond_1
|
|
new-instance p1, Ljavax/net/ssl/SSLPeerUnverifiedException;
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 353
|
|
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, " not verified (no certificates)"
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Ljavax/net/ssl/SSLPeerUnverifiedException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 358
|
|
:cond_2
|
|
invoke-virtual {v0}, Lokhttp3/Address;->certificatePinner()Lokhttp3/CertificatePinner;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 359
|
|
invoke-virtual {v4}, Lokhttp3/Handshake;->peerCertificates()Ljava/util/List;
|
|
|
|
move-result-object v5
|
|
|
|
.line 358
|
|
invoke-virtual {v3, v0, v5}, Lokhttp3/CertificatePinner;->check(Ljava/lang/String;Ljava/util/List;)V
|
|
|
|
.line 362
|
|
invoke-virtual {p1}, Lokhttp3/ConnectionSpec;->supportsTlsExtensions()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
.line 363
|
|
invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v1}, Lokhttp3/internal/platform/Platform;->getSelectedProtocol(Ljavax/net/ssl/SSLSocket;)Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
:cond_3
|
|
iput-object v1, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
.line 366
|
|
invoke-static {v1}, Lokio/Okio;->source(Ljava/net/Socket;)Lokio/Source;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lokio/Okio;->buffer(Lokio/Source;)Lokio/BufferedSource;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/RealConnection;->source:Lokio/BufferedSource;
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
.line 367
|
|
invoke-static {p1}, Lokio/Okio;->sink(Ljava/net/Socket;)Lokio/Sink;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Lokio/Okio;->buffer(Lokio/Sink;)Lokio/BufferedSink;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/RealConnection;->sink:Lokio/BufferedSink;
|
|
|
|
iput-object v4, p0, Lokhttp3/internal/connection/RealConnection;->handshake:Lokhttp3/Handshake;
|
|
|
|
if-eqz v2, :cond_4
|
|
|
|
.line 370
|
|
invoke-static {v2}, Lokhttp3/Protocol;->get(Ljava/lang/String;)Lokhttp3/Protocol;
|
|
|
|
move-result-object p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 371
|
|
:cond_4
|
|
sget-object p1, Lokhttp3/Protocol;->HTTP_1_1:Lokhttp3/Protocol;
|
|
|
|
:goto_1
|
|
iput-object p1, p0, Lokhttp3/internal/connection/RealConnection;->protocol:Lokhttp3/Protocol;
|
|
:try_end_2
|
|
.catch Ljava/lang/AssertionError; {:try_start_2 .. :try_end_2} :catch_0
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
.line 378
|
|
invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v1}, Lokhttp3/internal/platform/Platform;->afterHandshake(Ljavax/net/ssl/SSLSocket;)V
|
|
|
|
return-void
|
|
|
|
:catchall_1
|
|
move-exception p1
|
|
|
|
goto :goto_3
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
.line 374
|
|
:goto_2
|
|
:try_start_3
|
|
invoke-static {p1}, Lokhttp3/internal/Util;->isAndroidGetsocknameError(Ljava/lang/AssertionError;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
new-instance v0, Ljava/io/IOException;
|
|
|
|
invoke-direct {v0, p1}, Ljava/io/IOException;-><init>(Ljava/lang/Throwable;)V
|
|
|
|
throw v0
|
|
|
|
.line 375
|
|
:cond_5
|
|
throw p1
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_1
|
|
|
|
:goto_3
|
|
if-eqz v2, :cond_6
|
|
|
|
.line 378
|
|
invoke-static {}, Lokhttp3/internal/platform/Platform;->get()Lokhttp3/internal/platform/Platform;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, v2}, Lokhttp3/internal/platform/Platform;->afterHandshake(Ljavax/net/ssl/SSLSocket;)V
|
|
|
|
.line 381
|
|
:cond_6
|
|
invoke-static {v2}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final connectTunnel(IIILokhttp3/Call;Lokhttp3/EventListener;)V
|
|
.locals 6
|
|
|
|
.line 232
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/RealConnection;->createTunnelRequest()Lokhttp3/Request;
|
|
|
|
move-result-object v0
|
|
|
|
.line 233
|
|
invoke-virtual {v0}, Lokhttp3/Request;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
:goto_0
|
|
const/16 v3, 0x15
|
|
|
|
if-ge v2, v3, :cond_1
|
|
|
|
.line 235
|
|
invoke-virtual {p0, p1, p2, p4, p5}, Lokhttp3/internal/connection/RealConnection;->connectSocket(IILokhttp3/Call;Lokhttp3/EventListener;)V
|
|
|
|
.line 236
|
|
invoke-virtual {p0, p2, p3, v0, v1}, Lokhttp3/internal/connection/RealConnection;->createTunnel(IILokhttp3/Request;Lokhttp3/HttpUrl;)Lokhttp3/Request;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_0
|
|
iget-object v3, p0, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
.line 242
|
|
invoke-static {v3}, Lokhttp3/internal/Util;->closeQuietly(Ljava/net/Socket;)V
|
|
|
|
const/4 v3, 0x0
|
|
|
|
iput-object v3, p0, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
iput-object v3, p0, Lokhttp3/internal/connection/RealConnection;->sink:Lokio/BufferedSink;
|
|
|
|
iput-object v3, p0, Lokhttp3/internal/connection/RealConnection;->source:Lokio/BufferedSource;
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 246
|
|
invoke-virtual {v4}, Lokhttp3/Route;->socketAddress()Ljava/net/InetSocketAddress;
|
|
|
|
move-result-object v4
|
|
|
|
iget-object v5, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
invoke-virtual {v5}, Lokhttp3/Route;->proxy()Ljava/net/Proxy;
|
|
|
|
move-result-object v5
|
|
|
|
invoke-virtual {p5, p4, v4, v5, v3}, Lokhttp3/EventListener;->connectEnd(Lokhttp3/Call;Ljava/net/InetSocketAddress;Ljava/net/Proxy;Lokhttp3/Protocol;)V
|
|
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
:goto_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public final createTunnel(IILokhttp3/Request;Lokhttp3/HttpUrl;)Lokhttp3/Request;
|
|
.locals 6
|
|
|
|
.line 393
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "CONNECT "
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-static {p4, v1}, Lokhttp3/internal/Util;->hostHeader(Lokhttp3/HttpUrl;Z)Ljava/lang/String;
|
|
|
|
move-result-object p4
|
|
|
|
invoke-virtual {v0, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string p4, " HTTP/1.1"
|
|
|
|
invoke-virtual {v0, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p4
|
|
|
|
.line 395
|
|
:goto_0
|
|
new-instance v0, Lokhttp3/internal/http1/Http1ExchangeCodec;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->source:Lokio/BufferedSource;
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/RealConnection;->sink:Lokio/BufferedSink;
|
|
|
|
const/4 v3, 0x0
|
|
|
|
invoke-direct {v0, v3, v3, v1, v2}, Lokhttp3/internal/http1/Http1ExchangeCodec;-><init>(Lokhttp3/OkHttpClient;Lokhttp3/internal/connection/RealConnection;Lokio/BufferedSource;Lokio/BufferedSink;)V
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->source:Lokio/BufferedSource;
|
|
|
|
.line 396
|
|
invoke-interface {v1}, Lokio/Source;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object v1
|
|
|
|
int-to-long v4, p1
|
|
|
|
sget-object v2, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {v1, v4, v5, v2}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->sink:Lokio/BufferedSink;
|
|
|
|
.line 397
|
|
invoke-interface {v1}, Lokio/Sink;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object v1
|
|
|
|
int-to-long v4, p2
|
|
|
|
invoke-virtual {v1, v4, v5, v2}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
|
|
|
|
.line 398
|
|
invoke-virtual {p3}, Lokhttp3/Request;->headers()Lokhttp3/Headers;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1, p4}, Lokhttp3/internal/http1/Http1ExchangeCodec;->writeRequest(Lokhttp3/Headers;Ljava/lang/String;)V
|
|
|
|
.line 399
|
|
invoke-virtual {v0}, Lokhttp3/internal/http1/Http1ExchangeCodec;->finishRequest()V
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 400
|
|
invoke-virtual {v0, v1}, Lokhttp3/internal/http1/Http1ExchangeCodec;->readResponseHeaders(Z)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v1
|
|
|
|
.line 401
|
|
invoke-virtual {v1, p3}, Lokhttp3/Response$Builder;->request(Lokhttp3/Request;)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object p3
|
|
|
|
.line 402
|
|
invoke-virtual {p3}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
|
|
|
|
move-result-object p3
|
|
|
|
.line 403
|
|
invoke-virtual {v0, p3}, Lokhttp3/internal/http1/Http1ExchangeCodec;->skipConnectBody(Lokhttp3/Response;)V
|
|
|
|
.line 405
|
|
invoke-virtual {p3}, Lokhttp3/Response;->code()I
|
|
|
|
move-result v0
|
|
|
|
const/16 v1, 0xc8
|
|
|
|
if-eq v0, v1, :cond_3
|
|
|
|
const/16 v1, 0x197
|
|
|
|
if-ne v0, v1, :cond_2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 417
|
|
invoke-virtual {v0}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Address;->proxyAuthenticator()Lokhttp3/Authenticator;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
invoke-interface {v0, v1, p3}, Lokhttp3/Authenticator;->authenticate(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;
|
|
|
|
move-result-object v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const-string v1, "Connection"
|
|
|
|
.line 420
|
|
invoke-virtual {p3, v1}, Lokhttp3/Response;->header(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p3
|
|
|
|
const-string v1, "close"
|
|
|
|
invoke-virtual {v1, p3}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result p3
|
|
|
|
if-eqz p3, :cond_0
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
move-object p3, v0
|
|
|
|
goto :goto_0
|
|
|
|
.line 418
|
|
:cond_1
|
|
new-instance p1, Ljava/io/IOException;
|
|
|
|
const-string p2, "Failed to authenticate with proxy"
|
|
|
|
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
.line 426
|
|
:cond_2
|
|
new-instance p1, Ljava/io/IOException;
|
|
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string p4, "Unexpected response code for CONNECT: "
|
|
|
|
invoke-virtual {p2, p4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
.line 427
|
|
invoke-virtual {p3}, Lokhttp3/Response;->code()I
|
|
|
|
move-result p3
|
|
|
|
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:cond_3
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RealConnection;->source:Lokio/BufferedSource;
|
|
|
|
.line 411
|
|
invoke-interface {p1}, Lokio/BufferedSource;->getBuffer()Lokio/Buffer;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lokio/Buffer;->exhausted()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RealConnection;->sink:Lokio/BufferedSink;
|
|
|
|
invoke-interface {p1}, Lokio/BufferedSink;->buffer()Lokio/Buffer;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lokio/Buffer;->exhausted()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_4
|
|
|
|
return-object v3
|
|
|
|
.line 412
|
|
:cond_4
|
|
new-instance p1, Ljava/io/IOException;
|
|
|
|
const-string p2, "TLS tunnel buffered too many bytes!"
|
|
|
|
invoke-direct {p1, p2}, Ljava/io/IOException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public final createTunnelRequest()Lokhttp3/Request;
|
|
.locals 4
|
|
|
|
.line 442
|
|
new-instance v0, Lokhttp3/Request$Builder;
|
|
|
|
invoke-direct {v0}, Lokhttp3/Request$Builder;-><init>()V
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 443
|
|
invoke-virtual {v1}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lokhttp3/Request$Builder;->url(Lokhttp3/HttpUrl;)Lokhttp3/Request$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "CONNECT"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 444
|
|
invoke-virtual {v0, v1, v2}, Lokhttp3/Request$Builder;->method(Ljava/lang/String;Lokhttp3/RequestBody;)Lokhttp3/Request$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 445
|
|
invoke-virtual {v1}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-static {v1, v2}, Lokhttp3/internal/Util;->hostHeader(Lokhttp3/HttpUrl;Z)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Host"
|
|
|
|
invoke-virtual {v0, v2, v1}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "Proxy-Connection"
|
|
|
|
const-string v2, "Keep-Alive"
|
|
|
|
.line 446
|
|
invoke-virtual {v0, v1, v2}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "User-Agent"
|
|
|
|
.line 447
|
|
invoke-static {}, Lokhttp3/internal/Version;->userAgent()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v0, v1, v2}, Lokhttp3/Request$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Request$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
.line 448
|
|
invoke-virtual {v0}, Lokhttp3/Request$Builder;->build()Lokhttp3/Request;
|
|
|
|
move-result-object v0
|
|
|
|
.line 450
|
|
new-instance v1, Lokhttp3/Response$Builder;
|
|
|
|
invoke-direct {v1}, Lokhttp3/Response$Builder;-><init>()V
|
|
|
|
.line 451
|
|
invoke-virtual {v1, v0}, Lokhttp3/Response$Builder;->request(Lokhttp3/Request;)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lokhttp3/Protocol;->HTTP_1_1:Lokhttp3/Protocol;
|
|
|
|
.line 452
|
|
invoke-virtual {v1, v2}, Lokhttp3/Response$Builder;->protocol(Lokhttp3/Protocol;)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v1
|
|
|
|
const/16 v2, 0x197
|
|
|
|
.line 453
|
|
invoke-virtual {v1, v2}, Lokhttp3/Response$Builder;->code(I)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Preemptive Authenticate"
|
|
|
|
.line 454
|
|
invoke-virtual {v1, v2}, Lokhttp3/Response$Builder;->message(Ljava/lang/String;)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v1
|
|
|
|
sget-object v2, Lokhttp3/internal/Util;->EMPTY_RESPONSE:Lokhttp3/ResponseBody;
|
|
|
|
.line 455
|
|
invoke-virtual {v1, v2}, Lokhttp3/Response$Builder;->body(Lokhttp3/ResponseBody;)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v1
|
|
|
|
const-wide/16 v2, -0x1
|
|
|
|
.line 456
|
|
invoke-virtual {v1, v2, v3}, Lokhttp3/Response$Builder;->sentRequestAtMillis(J)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v1
|
|
|
|
.line 457
|
|
invoke-virtual {v1, v2, v3}, Lokhttp3/Response$Builder;->receivedResponseAtMillis(J)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v1
|
|
|
|
const-string v2, "Proxy-Authenticate"
|
|
|
|
const-string v3, "OkHttp-Preemptive"
|
|
|
|
.line 458
|
|
invoke-virtual {v1, v2, v3}, Lokhttp3/Response$Builder;->header(Ljava/lang/String;Ljava/lang/String;)Lokhttp3/Response$Builder;
|
|
|
|
move-result-object v1
|
|
|
|
.line 459
|
|
invoke-virtual {v1}, Lokhttp3/Response$Builder;->build()Lokhttp3/Response;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 461
|
|
invoke-virtual {v2}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lokhttp3/Address;->proxyAuthenticator()Lokhttp3/Authenticator;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 462
|
|
invoke-interface {v2, v3, v1}, Lokhttp3/Authenticator;->authenticate(Lokhttp3/Route;Lokhttp3/Response;)Lokhttp3/Request;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
move-object v0, v1
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final establishProtocol(Lokhttp3/internal/connection/ConnectionSpecSelector;ILokhttp3/Call;Lokhttp3/EventListener;)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 286
|
|
invoke-virtual {v0}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Address;->sslSocketFactory()Ljavax/net/ssl/SSLSocketFactory;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 287
|
|
invoke-virtual {p1}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Address;->protocols()Ljava/util/List;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p3, Lokhttp3/Protocol;->H2_PRIOR_KNOWLEDGE:Lokhttp3/Protocol;
|
|
|
|
invoke-interface {p1, p3}, Ljava/util/List;->contains(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
iput-object p3, p0, Lokhttp3/internal/connection/RealConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
.line 290
|
|
invoke-virtual {p0, p2}, Lokhttp3/internal/connection/RealConnection;->startHttp2(I)V
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RealConnection;->rawSocket:Ljava/net/Socket;
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
.line 295
|
|
sget-object p1, Lokhttp3/Protocol;->HTTP_1_1:Lokhttp3/Protocol;
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/RealConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
return-void
|
|
|
|
.line 299
|
|
:cond_1
|
|
invoke-virtual {p4, p3}, Lokhttp3/EventListener;->secureConnectStart(Lokhttp3/Call;)V
|
|
|
|
.line 300
|
|
invoke-virtual {p0, p1}, Lokhttp3/internal/connection/RealConnection;->connectTls(Lokhttp3/internal/connection/ConnectionSpecSelector;)V
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RealConnection;->handshake:Lokhttp3/Handshake;
|
|
|
|
.line 301
|
|
invoke-virtual {p4, p3, p1}, Lokhttp3/EventListener;->secureConnectEnd(Lokhttp3/Call;Lokhttp3/Handshake;)V
|
|
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RealConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
.line 303
|
|
sget-object p3, Lokhttp3/Protocol;->HTTP_2:Lokhttp3/Protocol;
|
|
|
|
if-ne p1, p3, :cond_2
|
|
|
|
.line 304
|
|
invoke-virtual {p0, p2}, Lokhttp3/internal/connection/RealConnection;->startHttp2(I)V
|
|
|
|
:cond_2
|
|
return-void
|
|
.end method
|
|
|
|
.method public handshake()Lokhttp3/Handshake;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->handshake:Lokhttp3/Handshake;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public isEligible(Lokhttp3/Address;Ljava/util/List;)Z
|
|
.locals 3
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->transmitters:Ljava/util/List;
|
|
|
|
.line 475
|
|
invoke-interface {v0}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
iget v1, p0, Lokhttp3/internal/connection/RealConnection;->allocationLimit:I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-ge v0, v1, :cond_7
|
|
|
|
iget-boolean v0, p0, Lokhttp3/internal/connection/RealConnection;->noNewExchanges:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
sget-object v0, Lokhttp3/internal/Internal;->instance:Lokhttp3/internal/Internal;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 478
|
|
invoke-virtual {v1}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1, p1}, Lokhttp3/internal/Internal;->equalsNonHost(Lokhttp3/Address;Lokhttp3/Address;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
return v2
|
|
|
|
.line 481
|
|
:cond_1
|
|
invoke-virtual {p1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/RealConnection;->route()Lokhttp3/Route;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, 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
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
return v1
|
|
|
|
:cond_2
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->http2Connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
if-nez v0, :cond_3
|
|
|
|
return v2
|
|
|
|
:cond_3
|
|
if-eqz p2, :cond_7
|
|
|
|
.line 494
|
|
invoke-virtual {p0, p2}, Lokhttp3/internal/connection/RealConnection;->routeMatchesAny(Ljava/util/List;)Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_4
|
|
|
|
goto :goto_0
|
|
|
|
.line 497
|
|
:cond_4
|
|
invoke-virtual {p1}, Lokhttp3/Address;->hostnameVerifier()Ljavax/net/ssl/HostnameVerifier;
|
|
|
|
move-result-object p2
|
|
|
|
sget-object v0, Lokhttp3/internal/tls/OkHostnameVerifier;->INSTANCE:Lokhttp3/internal/tls/OkHostnameVerifier;
|
|
|
|
if-eq p2, v0, :cond_5
|
|
|
|
return v2
|
|
|
|
.line 498
|
|
:cond_5
|
|
invoke-virtual {p1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p0, p2}, Lokhttp3/internal/connection/RealConnection;->supportsUrl(Lokhttp3/HttpUrl;)Z
|
|
|
|
move-result p2
|
|
|
|
if-nez p2, :cond_6
|
|
|
|
return v2
|
|
|
|
.line 502
|
|
:cond_6
|
|
:try_start_0
|
|
invoke-virtual {p1}, Lokhttp3/Address;->certificatePinner()Lokhttp3/CertificatePinner;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-virtual {p1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/RealConnection;->handshake()Lokhttp3/Handshake;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lokhttp3/Handshake;->peerCertificates()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p2, p1, v0}, Lokhttp3/CertificatePinner;->check(Ljava/lang/String;Ljava/util/List;)V
|
|
:try_end_0
|
|
.catch Ljavax/net/ssl/SSLPeerUnverifiedException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
return v1
|
|
|
|
:catch_0
|
|
:cond_7
|
|
:goto_0
|
|
return v2
|
|
.end method
|
|
|
|
.method public isHealthy(Z)Z
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
.line 578
|
|
invoke-virtual {v0}, Ljava/net/Socket;->isClosed()Z
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
invoke-virtual {v0}, Ljava/net/Socket;->isInputShutdown()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
invoke-virtual {v0}, Ljava/net/Socket;->isOutputShutdown()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->http2Connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 583
|
|
invoke-static {}, Ljava/lang/System;->nanoTime()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-virtual {v0, v1, v2}, Lokhttp3/internal/http2/Http2Connection;->isHealthy(J)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
const/4 v0, 0x1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
:try_start_0
|
|
iget-object p1, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
.line 588
|
|
invoke-virtual {p1}, Ljava/net/Socket;->getSoTimeout()I
|
|
|
|
move-result p1
|
|
:try_end_0
|
|
.catch Ljava/net/SocketTimeoutException; {:try_start_0 .. :try_end_0} :catch_1
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:try_start_1
|
|
iget-object v2, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
.line 590
|
|
invoke-virtual {v2, v0}, Ljava/net/Socket;->setSoTimeout(I)V
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/RealConnection;->source:Lokio/BufferedSource;
|
|
|
|
.line 591
|
|
invoke-interface {v2}, Lokio/BufferedSource;->exhausted()Z
|
|
|
|
move-result v2
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
if-eqz v2, :cond_2
|
|
|
|
:try_start_2
|
|
iget-object v2, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
.line 596
|
|
invoke-virtual {v2, p1}, Ljava/net/Socket;->setSoTimeout(I)V
|
|
|
|
return v1
|
|
|
|
:cond_2
|
|
iget-object v2, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
invoke-virtual {v2, p1}, Ljava/net/Socket;->setSoTimeout(I)V
|
|
|
|
return v0
|
|
|
|
:catchall_0
|
|
move-exception v2
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
invoke-virtual {v3, p1}, Ljava/net/Socket;->setSoTimeout(I)V
|
|
|
|
throw v2
|
|
:try_end_2
|
|
.catch Ljava/net/SocketTimeoutException; {:try_start_2 .. :try_end_2} :catch_1
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_0
|
|
|
|
:catch_0
|
|
return v1
|
|
|
|
:catch_1
|
|
:cond_3
|
|
return v0
|
|
|
|
:cond_4
|
|
:goto_0
|
|
return v1
|
|
.end method
|
|
|
|
.method public isMultiplexed()Z
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->http2Connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const/4 v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
return v0
|
|
.end method
|
|
|
|
.method public newCodec(Lokhttp3/OkHttpClient;Lokhttp3/Interceptor$Chain;)Lokhttp3/internal/http/ExchangeCodec;
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->http2Connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 544
|
|
new-instance v0, Lokhttp3/internal/http2/Http2ExchangeCodec;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->http2Connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
invoke-direct {v0, p1, p0, p2, v1}, Lokhttp3/internal/http2/Http2ExchangeCodec;-><init>(Lokhttp3/OkHttpClient;Lokhttp3/internal/connection/RealConnection;Lokhttp3/Interceptor$Chain;Lokhttp3/internal/http2/Http2Connection;)V
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
.line 546
|
|
invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->readTimeoutMillis()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/net/Socket;->setSoTimeout(I)V
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->source:Lokio/BufferedSource;
|
|
|
|
.line 547
|
|
invoke-interface {v0}, Lokio/Source;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->readTimeoutMillis()I
|
|
|
|
move-result v1
|
|
|
|
int-to-long v1, v1
|
|
|
|
sget-object v3, Ljava/util/concurrent/TimeUnit;->MILLISECONDS:Ljava/util/concurrent/TimeUnit;
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->sink:Lokio/BufferedSink;
|
|
|
|
.line 548
|
|
invoke-interface {v0}, Lokio/Sink;->timeout()Lokio/Timeout;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {p2}, Lokhttp3/Interceptor$Chain;->writeTimeoutMillis()I
|
|
|
|
move-result p2
|
|
|
|
int-to-long v1, p2
|
|
|
|
invoke-virtual {v0, v1, v2, v3}, Lokio/Timeout;->timeout(JLjava/util/concurrent/TimeUnit;)Lokio/Timeout;
|
|
|
|
.line 549
|
|
new-instance p2, Lokhttp3/internal/http1/Http1ExchangeCodec;
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->source:Lokio/BufferedSource;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->sink:Lokio/BufferedSink;
|
|
|
|
invoke-direct {p2, p1, p0, v0, v1}, Lokhttp3/internal/http1/Http1ExchangeCodec;-><init>(Lokhttp3/OkHttpClient;Lokhttp3/internal/connection/RealConnection;Lokio/BufferedSource;Lokio/BufferedSink;)V
|
|
|
|
return-object p2
|
|
.end method
|
|
|
|
.method public noNewExchanges()V
|
|
.locals 2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 135
|
|
monitor-enter v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
:try_start_0
|
|
iput-boolean v1, p0, Lokhttp3/internal/connection/RealConnection;->noNewExchanges:Z
|
|
|
|
.line 137
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method public onSettings(Lokhttp3/internal/http2/Http2Connection;)V
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 615
|
|
monitor-enter v0
|
|
|
|
.line 616
|
|
:try_start_0
|
|
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Connection;->maxConcurrentStreams()I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lokhttp3/internal/connection/RealConnection;->allocationLimit:I
|
|
|
|
.line 617
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|
|
|
|
.method public onStream(Lokhttp3/internal/http2/Http2Stream;)V
|
|
.locals 2
|
|
|
|
.line 610
|
|
sget-object v0, Lokhttp3/internal/http2/ErrorCode;->REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p1, v0, v1}, Lokhttp3/internal/http2/Http2Stream;->close(Lokhttp3/internal/http2/ErrorCode;Ljava/io/IOException;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public route()Lokhttp3/Route;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final routeMatchesAny(Ljava/util/List;)Z
|
|
.locals 6
|
|
|
|
.line 517
|
|
invoke-interface {p1}, Ljava/util/List;->size()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
move v2, v1
|
|
|
|
:goto_0
|
|
if-ge v2, v0, :cond_1
|
|
|
|
.line 518
|
|
invoke-interface {p1, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Lokhttp3/Route;
|
|
|
|
.line 519
|
|
invoke-virtual {v3}, Lokhttp3/Route;->proxy()Ljava/net/Proxy;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
|
|
|
|
move-result-object v4
|
|
|
|
sget-object v5, Ljava/net/Proxy$Type;->DIRECT:Ljava/net/Proxy$Type;
|
|
|
|
if-ne v4, v5, :cond_0
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 520
|
|
invoke-virtual {v4}, Lokhttp3/Route;->proxy()Ljava/net/Proxy;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Ljava/net/Proxy;->type()Ljava/net/Proxy$Type;
|
|
|
|
move-result-object v4
|
|
|
|
if-ne v4, v5, :cond_0
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 521
|
|
invoke-virtual {v4}, Lokhttp3/Route;->socketAddress()Ljava/net/InetSocketAddress;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v3}, Lokhttp3/Route;->socketAddress()Ljava/net/InetSocketAddress;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v4, v3}, Ljava/net/InetSocketAddress;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_0
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return v1
|
|
.end method
|
|
|
|
.method public socket()Ljava/net/Socket;
|
|
.locals 1
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public final startHttp2(I)V
|
|
.locals 5
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 309
|
|
invoke-virtual {v0, v1}, Ljava/net/Socket;->setSoTimeout(I)V
|
|
|
|
.line 310
|
|
new-instance v0, Lokhttp3/internal/http2/Http2Connection$Builder;
|
|
|
|
const/4 v1, 0x1
|
|
|
|
invoke-direct {v0, v1}, Lokhttp3/internal/http2/Http2Connection$Builder;-><init>(Z)V
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->socket:Ljava/net/Socket;
|
|
|
|
iget-object v2, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 311
|
|
invoke-virtual {v2}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-virtual {v2}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/RealConnection;->source:Lokio/BufferedSource;
|
|
|
|
iget-object v4, p0, Lokhttp3/internal/connection/RealConnection;->sink:Lokio/BufferedSink;
|
|
|
|
invoke-virtual {v0, v1, v2, v3, v4}, Lokhttp3/internal/http2/Http2Connection$Builder;->socket(Ljava/net/Socket;Ljava/lang/String;Lokio/BufferedSource;Lokio/BufferedSink;)Lokhttp3/internal/http2/Http2Connection$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
.line 312
|
|
invoke-virtual {v0, p0}, Lokhttp3/internal/http2/Http2Connection$Builder;->listener(Lokhttp3/internal/http2/Http2Connection$Listener;)Lokhttp3/internal/http2/Http2Connection$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
.line 313
|
|
invoke-virtual {v0, p1}, Lokhttp3/internal/http2/Http2Connection$Builder;->pingIntervalMillis(I)Lokhttp3/internal/http2/Http2Connection$Builder;
|
|
|
|
move-result-object p1
|
|
|
|
.line 314
|
|
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Connection$Builder;->build()Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lokhttp3/internal/connection/RealConnection;->http2Connection:Lokhttp3/internal/http2/Http2Connection;
|
|
|
|
.line 315
|
|
invoke-virtual {p1}, Lokhttp3/internal/http2/Http2Connection;->start()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public supportsUrl(Lokhttp3/HttpUrl;)Z
|
|
.locals 4
|
|
|
|
.line 529
|
|
invoke-virtual {p1}, Lokhttp3/HttpUrl;->port()I
|
|
|
|
move-result v0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/HttpUrl;->port()I
|
|
|
|
move-result v1
|
|
|
|
const/4 v2, 0x0
|
|
|
|
if-eq v0, v1, :cond_0
|
|
|
|
return v2
|
|
|
|
.line 533
|
|
:cond_0
|
|
invoke-virtual {p1}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, 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
|
|
|
|
const/4 v1, 0x1
|
|
|
|
if-nez v0, :cond_2
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->handshake:Lokhttp3/Handshake;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 535
|
|
sget-object v0, Lokhttp3/internal/tls/OkHostnameVerifier;->INSTANCE:Lokhttp3/internal/tls/OkHostnameVerifier;
|
|
|
|
.line 536
|
|
invoke-virtual {p1}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/RealConnection;->handshake:Lokhttp3/Handshake;
|
|
|
|
invoke-virtual {v3}, Lokhttp3/Handshake;->peerCertificates()Ljava/util/List;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-interface {v3, v2}, Ljava/util/List;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v3
|
|
|
|
check-cast v3, Ljava/security/cert/X509Certificate;
|
|
|
|
.line 535
|
|
invoke-virtual {v0, p1, v3}, Lokhttp3/internal/tls/OkHostnameVerifier;->verify(Ljava/lang/String;Ljava/security/cert/X509Certificate;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_1
|
|
|
|
move v2, v1
|
|
|
|
:cond_1
|
|
return v2
|
|
|
|
:cond_2
|
|
return v1
|
|
.end method
|
|
|
|
.method public toString()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 672
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "Connection{"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 673
|
|
invoke-virtual {v1}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/HttpUrl;->host()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ":"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Route;->address()Lokhttp3/Address;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/Address;->url()Lokhttp3/HttpUrl;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lokhttp3/HttpUrl;->port()I
|
|
|
|
move-result v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, ", proxy="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 675
|
|
invoke-virtual {v1}, Lokhttp3/Route;->proxy()Ljava/net/Proxy;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, " hostAddress="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 677
|
|
invoke-virtual {v1}, Lokhttp3/Route;->socketAddress()Ljava/net/InetSocketAddress;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, " cipherSuite="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->handshake:Lokhttp3/Handshake;
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 679
|
|
invoke-virtual {v1}, Lokhttp3/Handshake;->cipherSuite()Lokhttp3/CipherSuite;
|
|
|
|
move-result-object v1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v1, "none"
|
|
|
|
:goto_0
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, " protocol="
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->protocol:Lokhttp3/Protocol;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
const/16 v1, 0x7d
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public trackFailure(Ljava/io/IOException;)V
|
|
.locals 4
|
|
|
|
iget-object v0, p0, Lokhttp3/internal/connection/RealConnection;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
.line 638
|
|
monitor-enter v0
|
|
|
|
.line 639
|
|
:try_start_0
|
|
instance-of v1, p1, Lokhttp3/internal/http2/StreamResetException;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 640
|
|
check-cast p1, Lokhttp3/internal/http2/StreamResetException;
|
|
|
|
iget-object p1, p1, Lokhttp3/internal/http2/StreamResetException;->errorCode:Lokhttp3/internal/http2/ErrorCode;
|
|
|
|
.line 641
|
|
sget-object v1, Lokhttp3/internal/http2/ErrorCode;->REFUSED_STREAM:Lokhttp3/internal/http2/ErrorCode;
|
|
|
|
if-ne p1, v1, :cond_0
|
|
|
|
iget p1, p0, Lokhttp3/internal/connection/RealConnection;->refusedStreamCount:I
|
|
|
|
add-int/2addr p1, v2
|
|
|
|
iput p1, p0, Lokhttp3/internal/connection/RealConnection;->refusedStreamCount:I
|
|
|
|
if-le p1, v2, :cond_4
|
|
|
|
iput-boolean v2, p0, Lokhttp3/internal/connection/RealConnection;->noNewExchanges:Z
|
|
|
|
iget p1, p0, Lokhttp3/internal/connection/RealConnection;->routeFailureCount:I
|
|
|
|
add-int/2addr p1, v2
|
|
|
|
iput p1, p0, Lokhttp3/internal/connection/RealConnection;->routeFailureCount:I
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p1
|
|
|
|
goto :goto_1
|
|
|
|
.line 648
|
|
:cond_0
|
|
sget-object v1, Lokhttp3/internal/http2/ErrorCode;->CANCEL:Lokhttp3/internal/http2/ErrorCode;
|
|
|
|
if-eq p1, v1, :cond_4
|
|
|
|
iput-boolean v2, p0, Lokhttp3/internal/connection/RealConnection;->noNewExchanges:Z
|
|
|
|
iget p1, p0, Lokhttp3/internal/connection/RealConnection;->routeFailureCount:I
|
|
|
|
add-int/2addr p1, v2
|
|
|
|
iput p1, p0, Lokhttp3/internal/connection/RealConnection;->routeFailureCount:I
|
|
|
|
goto :goto_0
|
|
|
|
.line 653
|
|
:cond_1
|
|
invoke-virtual {p0}, Lokhttp3/internal/connection/RealConnection;->isMultiplexed()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
instance-of v1, p1, Lokhttp3/internal/http2/ConnectionShutdownException;
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
:cond_2
|
|
iput-boolean v2, p0, Lokhttp3/internal/connection/RealConnection;->noNewExchanges:Z
|
|
|
|
iget v1, p0, Lokhttp3/internal/connection/RealConnection;->successCount:I
|
|
|
|
if-nez v1, :cond_4
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
iget-object v1, p0, Lokhttp3/internal/connection/RealConnection;->connectionPool:Lokhttp3/internal/connection/RealConnectionPool;
|
|
|
|
iget-object v3, p0, Lokhttp3/internal/connection/RealConnection;->route:Lokhttp3/Route;
|
|
|
|
.line 659
|
|
invoke-virtual {v1, v3, p1}, Lokhttp3/internal/connection/RealConnectionPool;->connectFailed(Lokhttp3/Route;Ljava/io/IOException;)V
|
|
|
|
:cond_3
|
|
iget p1, p0, Lokhttp3/internal/connection/RealConnection;->routeFailureCount:I
|
|
|
|
add-int/2addr p1, v2
|
|
|
|
iput p1, p0, Lokhttp3/internal/connection/RealConnection;->routeFailureCount:I
|
|
|
|
.line 664
|
|
:cond_4
|
|
:goto_0
|
|
monitor-exit v0
|
|
|
|
return-void
|
|
|
|
:goto_1
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw p1
|
|
.end method
|