.class public Lorg/apache/http/client/protocol/RequestDefaultHeaders; .super Ljava/lang/Object; .source "RequestDefaultHeaders.java" # interfaces .implements Lorg/apache/http/HttpRequestInterceptor; # annotations .annotation build Lorg/apache/http/annotation/Immutable; .end annotation # direct methods .method public constructor ()V .locals 0 .line 1 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method # virtual methods .method public process(Lorg/apache/http/HttpRequest;Lorg/apache/http/protocol/HttpContext;)V .locals 1 .annotation system Ldalvik/annotation/Throws; value = { Lorg/apache/http/HttpException;, Ljava/io/IOException; } .end annotation if-eqz p1, :cond_2 .line 1 invoke-interface {p1}, Lorg/apache/http/HttpRequest;->getRequestLine()Lorg/apache/http/RequestLine; move-result-object p2 invoke-interface {p2}, Lorg/apache/http/RequestLine;->getMethod()Ljava/lang/String; move-result-object p2 const-string v0, "CONNECT" .line 2 invoke-virtual {p2, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z move-result p2 if-eqz p2, :cond_0 return-void .line 3 :cond_0 invoke-interface {p1}, Lorg/apache/http/HttpMessage;->getParams()Lorg/apache/http/params/HttpParams; move-result-object p2 const-string v0, "http.default-headers" invoke-interface {p2, v0}, Lorg/apache/http/params/HttpParams;->getParameter(Ljava/lang/String;)Ljava/lang/Object; move-result-object p2 check-cast p2, Ljava/util/Collection; if-eqz p2, :cond_1 .line 4 invoke-interface {p2}, Ljava/util/Collection;->iterator()Ljava/util/Iterator; move-result-object p2 :goto_0 invoke-interface {p2}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_1 invoke-interface {p2}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Lorg/apache/http/Header; .line 5 invoke-interface {p1, v0}, Lorg/apache/http/HttpMessage;->addHeader(Lorg/apache/http/Header;)V goto :goto_0 :cond_1 return-void .line 6 :cond_2 new-instance p1, Ljava/lang/IllegalArgumentException; const-string p2, "HTTP request may not be null" invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw p1 .end method