tmap/smali_classes5/org/apache/http/protocol/ResponseServer.smali
2022-06-10 21:38:30 +09:00

72 lines
1.6 KiB
Smali

.class public Lorg/apache/http/protocol/ResponseServer;
.super Ljava/lang/Object;
.source "ResponseServer.java"
# interfaces
.implements Lorg/apache/http/HttpResponseInterceptor;
# direct methods
.method public constructor <init>()V
.locals 0
.line 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public process(Lorg/apache/http/HttpResponse;Lorg/apache/http/protocol/HttpContext;)V
.locals 2
.annotation system Ldalvik/annotation/Throws;
value = {
Lorg/apache/http/HttpException;,
Ljava/io/IOException;
}
.end annotation
if-eqz p1, :cond_1
const-string p2, "Server"
.line 1
invoke-interface {p1, p2}, Lorg/apache/http/HttpMessage;->containsHeader(Ljava/lang/String;)Z
move-result v0
if-nez v0, :cond_0
.line 2
invoke-interface {p1}, Lorg/apache/http/HttpMessage;->getParams()Lorg/apache/http/params/HttpParams;
move-result-object v0
const-string v1, "http.origin-server"
invoke-interface {v0, v1}, Lorg/apache/http/params/HttpParams;->getParameter(Ljava/lang/String;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/lang/String;
if-eqz v0, :cond_0
.line 3
invoke-interface {p1, p2, v0}, Lorg/apache/http/HttpMessage;->addHeader(Ljava/lang/String;Ljava/lang/String;)V
:cond_0
return-void
.line 4
:cond_1
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "HTTP request may not be null"
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method