- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
35 lines
1.0 KiB
Java
35 lines
1.0 KiB
Java
package okhttp3.internal.http;
|
|
|
|
import java.net.Proxy;
|
|
import okhttp3.HttpUrl;
|
|
import okhttp3.Request;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class RequestLine {
|
|
public static String get(Request request, Proxy.Type type) {
|
|
StringBuilder sb = new StringBuilder();
|
|
sb.append(request.method());
|
|
sb.append(' ');
|
|
if (includeAuthorityInRequestLine(request, type)) {
|
|
sb.append(request.url());
|
|
} else {
|
|
sb.append(requestPath(request.url()));
|
|
}
|
|
sb.append(" HTTP/1.1");
|
|
return sb.toString();
|
|
}
|
|
|
|
public static boolean includeAuthorityInRequestLine(Request request, Proxy.Type type) {
|
|
return !request.isHttps() && type == Proxy.Type.HTTP;
|
|
}
|
|
|
|
public static String requestPath(HttpUrl httpUrl) {
|
|
String encodedPath = httpUrl.encodedPath();
|
|
String encodedQuery = httpUrl.encodedQuery();
|
|
if (encodedQuery == null) {
|
|
return encodedPath;
|
|
}
|
|
return encodedPath + '?' + encodedQuery;
|
|
}
|
|
}
|