You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2020/03/07 09:44:27 UTC

svn commit: r1874931 [36/39] - in /httpcomponents/site: ./ httpcomponents-client-4.5.x/ httpcomponents-client-4.5.x/fluent-hc/ httpcomponents-client-4.5.x/fluent-hc/apidocs/ httpcomponents-client-4.5.x/fluent-hc/apidocs/org/apache/http/client/fluent/ h...

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/conn/util/PublicSuffixMatcher.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/conn/util/PublicSuffixMatcher.html?rev=1874931&r1=1874930&r2=1874931&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/conn/util/PublicSuffixMatcher.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/conn/util/PublicSuffixMatcher.html Sat Mar  7 09:44:14 2020
@@ -105,60 +105,60 @@
 <a class="jxr_linenumber" name="L97" href="#L97">97</a>          }
 <a class="jxr_linenumber" name="L98" href="#L98">98</a>      }
 <a class="jxr_linenumber" name="L99" href="#L99">99</a>  
-<a class="jxr_linenumber" name="L100" href="#L100">100</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">boolean</strong> hasEntry(<strong class="jxr_keyword">final</strong> Map&lt;String, DomainType&gt; map, <strong class="jxr_keyword">final</strong> String rule, <strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> expectedType) {
+<a class="jxr_linenumber" name="L100" href="#L100">100</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> findEntry(<strong class="jxr_keyword">final</strong> Map&lt;String, DomainType&gt; map, <strong class="jxr_keyword">final</strong> String rule) {
 <a class="jxr_linenumber" name="L101" href="#L101">101</a>         <strong class="jxr_keyword">if</strong> (map == <strong class="jxr_keyword">null</strong>) {
-<a class="jxr_linenumber" name="L102" href="#L102">102</a>             <strong class="jxr_keyword">return</strong> false;
+<a class="jxr_linenumber" name="L102" href="#L102">102</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
 <a class="jxr_linenumber" name="L103" href="#L103">103</a>         }
-<a class="jxr_linenumber" name="L104" href="#L104">104</a>         <strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> domainType = map.get(rule);
-<a class="jxr_linenumber" name="L105" href="#L105">105</a>         <strong class="jxr_keyword">return</strong> domainType == <strong class="jxr_keyword">null</strong> ? false : expectedType == <strong class="jxr_keyword">null</strong> || domainType.equals(expectedType);
-<a class="jxr_linenumber" name="L106" href="#L106">106</a>     }
-<a class="jxr_linenumber" name="L107" href="#L107">107</a> 
-<a class="jxr_linenumber" name="L108" href="#L108">108</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> hasRule(<strong class="jxr_keyword">final</strong> String rule, <strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> expectedType) {
-<a class="jxr_linenumber" name="L109" href="#L109">109</a>         <strong class="jxr_keyword">return</strong> hasEntry(<strong class="jxr_keyword">this</strong>.rules, rule, expectedType);
-<a class="jxr_linenumber" name="L110" href="#L110">110</a>     }
-<a class="jxr_linenumber" name="L111" href="#L111">111</a> 
-<a class="jxr_linenumber" name="L112" href="#L112">112</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">boolean</strong> hasException(<strong class="jxr_keyword">final</strong> String exception, <strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> expectedType) {
-<a class="jxr_linenumber" name="L113" href="#L113">113</a>         <strong class="jxr_keyword">return</strong> hasEntry(<strong class="jxr_keyword">this</strong>.exceptions, exception, expectedType);
-<a class="jxr_linenumber" name="L114" href="#L114">114</a>     }
-<a class="jxr_linenumber" name="L115" href="#L115">115</a> 
-<a class="jxr_linenumber" name="L116" href="#L116">116</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L117" href="#L117">117</a> <em class="jxr_javadoccomment">     * Returns registrable part of the domain for the given domain name or {@code null}</em>
-<a class="jxr_linenumber" name="L118" href="#L118">118</a> <em class="jxr_javadoccomment">     * if given domain represents a public suffix.</em>
-<a class="jxr_linenumber" name="L119" href="#L119">119</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L120" href="#L120">120</a> <em class="jxr_javadoccomment">     * @param domain</em>
-<a class="jxr_linenumber" name="L121" href="#L121">121</a> <em class="jxr_javadoccomment">     * @return domain root</em>
-<a class="jxr_linenumber" name="L122" href="#L122">122</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L123" href="#L123">123</a>     <strong class="jxr_keyword">public</strong> String getDomainRoot(<strong class="jxr_keyword">final</strong> String domain) {
-<a class="jxr_linenumber" name="L124" href="#L124">124</a>         <strong class="jxr_keyword">return</strong> getDomainRoot(domain, <strong class="jxr_keyword">null</strong>);
-<a class="jxr_linenumber" name="L125" href="#L125">125</a>     }
-<a class="jxr_linenumber" name="L126" href="#L126">126</a> 
-<a class="jxr_linenumber" name="L127" href="#L127">127</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L128" href="#L128">128</a> <em class="jxr_javadoccomment">     * Returns registrable part of the domain for the given domain name or {@code null}</em>
-<a class="jxr_linenumber" name="L129" href="#L129">129</a> <em class="jxr_javadoccomment">     * if given domain represents a public suffix.</em>
-<a class="jxr_linenumber" name="L130" href="#L130">130</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L131" href="#L131">131</a> <em class="jxr_javadoccomment">     * @param domain</em>
-<a class="jxr_linenumber" name="L132" href="#L132">132</a> <em class="jxr_javadoccomment">     * @param expectedType expected domain type or {@code null} if any.</em>
-<a class="jxr_linenumber" name="L133" href="#L133">133</a> <em class="jxr_javadoccomment">     * @return domain root</em>
-<a class="jxr_linenumber" name="L134" href="#L134">134</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L135" href="#L135">135</a> <em class="jxr_javadoccomment">     * @since 4.5</em>
-<a class="jxr_linenumber" name="L136" href="#L136">136</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L137" href="#L137">137</a>     <strong class="jxr_keyword">public</strong> String getDomainRoot(<strong class="jxr_keyword">final</strong> String domain, <strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> expectedType) {
-<a class="jxr_linenumber" name="L138" href="#L138">138</a>         <strong class="jxr_keyword">if</strong> (domain == <strong class="jxr_keyword">null</strong>) {
-<a class="jxr_linenumber" name="L139" href="#L139">139</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="L140" href="#L140">140</a>         }
-<a class="jxr_linenumber" name="L141" href="#L141">141</a>         <strong class="jxr_keyword">if</strong> (domain.startsWith(<span class="jxr_string">"."</span>)) {
-<a class="jxr_linenumber" name="L142" href="#L142">142</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="L143" href="#L143">143</a>         }
-<a class="jxr_linenumber" name="L144" href="#L144">144</a>         <strong class="jxr_keyword">final</strong> String normalized = DnsUtils.normalize(domain);
-<a class="jxr_linenumber" name="L145" href="#L145">145</a>         String segment = normalized;
-<a class="jxr_linenumber" name="L146" href="#L146">146</a>         String result = <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="L147" href="#L147">147</a>         <strong class="jxr_keyword">while</strong> (segment != <strong class="jxr_keyword">null</strong>) {
-<a class="jxr_linenumber" name="L148" href="#L148">148</a>             <em class="jxr_comment">// An exception rule takes priority over any other matching rule.</em>
-<a class="jxr_linenumber" name="L149" href="#L149">149</a>             <strong class="jxr_keyword">final</strong> String key = IDN.toUnicode(segment);
-<a class="jxr_linenumber" name="L150" href="#L150">150</a>             <strong class="jxr_keyword">if</strong> (hasException(key, expectedType)) {
-<a class="jxr_linenumber" name="L151" href="#L151">151</a>                 <strong class="jxr_keyword">return</strong> segment;
-<a class="jxr_linenumber" name="L152" href="#L152">152</a>             }
-<a class="jxr_linenumber" name="L153" href="#L153">153</a>             <strong class="jxr_keyword">if</strong> (hasRule(key, expectedType)) {
+<a class="jxr_linenumber" name="L104" href="#L104">104</a>         <strong class="jxr_keyword">return</strong> map.get(rule);
+<a class="jxr_linenumber" name="L105" href="#L105">105</a>     }
+<a class="jxr_linenumber" name="L106" href="#L106">106</a> 
+<a class="jxr_linenumber" name="L107" href="#L107">107</a>     <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">boolean</strong> match(<strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/uti<a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a>pe.html#DomainType">DomainType</a> domainType, <strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> expectedType) {
+<a class="jxr_linenumber" name="L108" href="#L108">108</a>         <strong class="jxr_keyword">return</strong> domainType != <strong class="jxr_keyword">null</strong> &amp;&amp; (expectedType == <strong class="jxr_keyword">null</strong> || domainType.equals(expectedType));
+<a class="jxr_linenumber" name="L109" href="#L109">109</a>     }
+<a class="jxr_linenumber" name="L110" href="#L110">110</a> 
+<a class="jxr_linenumber" name="L111" href="#L111">111</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L112" href="#L112">112</a> <em class="jxr_javadoccomment">     * Returns registrable part of the domain for the given domain name or {@code null}</em>
+<a class="jxr_linenumber" name="L113" href="#L113">113</a> <em class="jxr_javadoccomment">     * if given domain represents a public suffix.</em>
+<a class="jxr_linenumber" name="L114" href="#L114">114</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L115" href="#L115">115</a> <em class="jxr_javadoccomment">     * @param domain</em>
+<a class="jxr_linenumber" name="L116" href="#L116">116</a> <em class="jxr_javadoccomment">     * @return domain root</em>
+<a class="jxr_linenumber" name="L117" href="#L117">117</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L118" href="#L118">118</a>     <strong class="jxr_keyword">public</strong> String getDomainRoot(<strong class="jxr_keyword">final</strong> String domain) {
+<a class="jxr_linenumber" name="L119" href="#L119">119</a>         <strong class="jxr_keyword">return</strong> getDomainRoot(domain, <strong class="jxr_keyword">null</strong>);
+<a class="jxr_linenumber" name="L120" href="#L120">120</a>     }
+<a class="jxr_linenumber" name="L121" href="#L121">121</a> 
+<a class="jxr_linenumber" name="L122" href="#L122">122</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L123" href="#L123">123</a> <em class="jxr_javadoccomment">     * Returns registrable part of the domain for the given domain name or {@code null}</em>
+<a class="jxr_linenumber" name="L124" href="#L124">124</a> <em class="jxr_javadoccomment">     * if given domain represents a public suffix.</em>
+<a class="jxr_linenumber" name="L125" href="#L125">125</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L126" href="#L126">126</a> <em class="jxr_javadoccomment">     * @param domain</em>
+<a class="jxr_linenumber" name="L127" href="#L127">127</a> <em class="jxr_javadoccomment">     * @param expectedType expected domain type or {@code null} if any.</em>
+<a class="jxr_linenumber" name="L128" href="#L128">128</a> <em class="jxr_javadoccomment">     * @return domain root</em>
+<a class="jxr_linenumber" name="L129" href="#L129">129</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L130" href="#L130">130</a> <em class="jxr_javadoccomment">     * @since 4.5</em>
+<a class="jxr_linenumber" name="L131" href="#L131">131</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L132" href="#L132">132</a>     <strong class="jxr_keyword">public</strong> String getDomainRoot(<strong class="jxr_keyword">final</strong> String domain, <strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> expectedType) {
+<a class="jxr_linenumber" name="L133" href="#L133">133</a>         <strong class="jxr_keyword">if</strong> (domain == <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="L134" href="#L134">134</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="L135" href="#L135">135</a>         }
+<a class="jxr_linenumber" name="L136" href="#L136">136</a>         <strong class="jxr_keyword">if</strong> (domain.startsWith(<span class="jxr_string">"."</span>)) {
+<a class="jxr_linenumber" name="L137" href="#L137">137</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="L138" href="#L138">138</a>         }
+<a class="jxr_linenumber" name="L139" href="#L139">139</a>         <strong class="jxr_keyword">final</strong> String normalized = DnsUtils.normalize(domain);
+<a class="jxr_linenumber" name="L140" href="#L140">140</a>         String segment = normalized;
+<a class="jxr_linenumber" name="L141" href="#L141">141</a>         String result = <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="L142" href="#L142">142</a>         <strong class="jxr_keyword">while</strong> (segment != <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="L143" href="#L143">143</a>             <em class="jxr_comment">// An exception rule takes priority over any other matching rule.</em>
+<a class="jxr_linenumber" name="L144" href="#L144">144</a>             <strong class="jxr_keyword">final</strong> String key = IDN.toUnicode(segment);
+<a class="jxr_linenumber" name="L145" href="#L145">145</a>             <strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> exceptionRule = findEntry(exceptions, key);
+<a class="jxr_linenumber" name="L146" href="#L146">146</a>             <strong class="jxr_keyword">if</strong> (match(exceptionRule, expectedType)) {
+<a class="jxr_linenumber" name="L147" href="#L147">147</a>                 <strong class="jxr_keyword">return</strong> segment;
+<a class="jxr_linenumber" name="L148" href="#L148">148</a>             }
+<a class="jxr_linenumber" name="L149" href="#L149">149</a>             <strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> domainRule = findEntry(rules, key);
+<a class="jxr_linenumber" name="L150" href="#L150">150</a>             <strong class="jxr_keyword">if</strong> (match(domainRule, expectedType)) {
+<a class="jxr_linenumber" name="L151" href="#L151">151</a>                 <strong class="jxr_keyword">if</strong> (domainRule == DomainType.PRIVATE) {
+<a class="jxr_linenumber" name="L152" href="#L152">152</a>                     <strong class="jxr_keyword">return</strong> segment;
+<a class="jxr_linenumber" name="L153" href="#L153">153</a>                 }
 <a class="jxr_linenumber" name="L154" href="#L154">154</a>                 <strong class="jxr_keyword">return</strong> result;
 <a class="jxr_linenumber" name="L155" href="#L155">155</a>             }
 <a class="jxr_linenumber" name="L156" href="#L156">156</a> 
@@ -166,48 +166,53 @@
 <a class="jxr_linenumber" name="L158" href="#L158">158</a>             <strong class="jxr_keyword">final</strong> String nextSegment = nextdot != -1 ? segment.substring(nextdot + 1) : <strong class="jxr_keyword">null</strong>;
 <a class="jxr_linenumber" name="L159" href="#L159">159</a> 
 <a class="jxr_linenumber" name="L160" href="#L160">160</a>             <strong class="jxr_keyword">if</strong> (nextSegment != <strong class="jxr_keyword">null</strong>) {
-<a class="jxr_linenumber" name="L161" href="#L161">161</a>                 <strong class="jxr_keyword">if</strong> (hasRule(<span class="jxr_string">"*."</span> + IDN.toUnicode(nextSegment), expectedType)) {
-<a class="jxr_linenumber" name="L162" href="#L162">162</a>                     <strong class="jxr_keyword">return</strong> result;
-<a class="jxr_linenumber" name="L163" href="#L163">163</a>                 }
-<a class="jxr_linenumber" name="L164" href="#L164">164</a>             }
-<a class="jxr_linenumber" name="L165" href="#L165">165</a>             result = segment;
-<a class="jxr_linenumber" name="L166" href="#L166">166</a>             segment = nextSegment;
-<a class="jxr_linenumber" name="L167" href="#L167">167</a>         }
-<a class="jxr_linenumber" name="L168" href="#L168">168</a> 
-<a class="jxr_linenumber" name="L169" href="#L169">169</a>         <em class="jxr_comment">// If no expectations then this result is good.</em>
-<a class="jxr_linenumber" name="L170" href="#L170">170</a>         <strong class="jxr_keyword">if</strong> (expectedType == <strong class="jxr_keyword">null</strong> || expectedType == DomainType.UNKNOWN) {
-<a class="jxr_linenumber" name="L171" href="#L171">171</a>             <strong class="jxr_keyword">return</strong> result;
-<a class="jxr_linenumber" name="L172" href="#L172">172</a>         }
-<a class="jxr_linenumber" name="L173" href="#L173">173</a> 
-<a class="jxr_linenumber" name="L174" href="#L174">174</a>         <em class="jxr_comment">// If we did have expectations apparently there was no match</em>
-<a class="jxr_linenumber" name="L175" href="#L175">175</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="L176" href="#L176">176</a>     }
-<a class="jxr_linenumber" name="L177" href="#L177">177</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L178" href="#L178">178</a> <em class="jxr_javadoccomment">     * Tests whether the given domain matches any of entry from the public suffix list.</em>
-<a class="jxr_linenumber" name="L179" href="#L179">179</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L180" href="#L180">180</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> matches(<strong class="jxr_keyword">final</strong> String domain) {
-<a class="jxr_linenumber" name="L181" href="#L181">181</a>         <strong class="jxr_keyword">return</strong> matches(domain, <strong class="jxr_keyword">null</strong>);
-<a class="jxr_linenumber" name="L182" href="#L182">182</a>     }
-<a class="jxr_linenumber" name="L183" href="#L183">183</a> 
-<a class="jxr_linenumber" name="L184" href="#L184">184</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L185" href="#L185">185</a> <em class="jxr_javadoccomment">     * Tests whether the given domain matches any of entry from the public suffix list.</em>
-<a class="jxr_linenumber" name="L186" href="#L186">186</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L187" href="#L187">187</a> <em class="jxr_javadoccomment">     * @param domain</em>
-<a class="jxr_linenumber" name="L188" href="#L188">188</a> <em class="jxr_javadoccomment">     * @param expectedType expected domain type or {@code null} if any.</em>
-<a class="jxr_linenumber" name="L189" href="#L189">189</a> <em class="jxr_javadoccomment">     * @return {@code true} if the given domain matches any of the public suffixes.</em>
-<a class="jxr_linenumber" name="L190" href="#L190">190</a> <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L191" href="#L191">191</a> <em class="jxr_javadoccomment">     * @since 4.5</em>
-<a class="jxr_linenumber" name="L192" href="#L192">192</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L193" href="#L193">193</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> matches(<strong class="jxr_keyword">final</strong> String domain, <strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> expectedType) {
-<a class="jxr_linenumber" name="L194" href="#L194">194</a>         <strong class="jxr_keyword">if</strong> (domain == <strong class="jxr_keyword">null</strong>) {
-<a class="jxr_linenumber" name="L195" href="#L195">195</a>             <strong class="jxr_keyword">return</strong> false;
-<a class="jxr_linenumber" name="L196" href="#L196">196</a>         }
-<a class="jxr_linenumber" name="L197" href="#L197">197</a>         <strong class="jxr_keyword">final</strong> String domainRoot = getDomainRoot(
-<a class="jxr_linenumber" name="L198" href="#L198">198</a>                 domain.startsWith(<span class="jxr_string">"."</span>) ? domain.substring(1) : domain, expectedType);
-<a class="jxr_linenumber" name="L199" href="#L199">199</a>         <strong class="jxr_keyword">return</strong> domainRoot == <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="L200" href="#L200">200</a>     }
-<a class="jxr_linenumber" name="L201" href="#L201">201</a> 
-<a class="jxr_linenumber" name="L202" href="#L202">202</a> }
+<a class="jxr_linenumber" name="L161" href="#L161">161</a>                 <strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> wildcardDomainRule = findEntry(rules, <span class="jxr_string">"*."</span> + IDN.toUnicode(nextSegment));
+<a class="jxr_linenumber" name="L162" href="#L162">162</a>                 <strong class="jxr_keyword">if</strong> (match(wildcardDomainRule, expectedType)) {
+<a class="jxr_linenumber" name="L163" href="#L163">163</a>                     <strong class="jxr_keyword">if</strong> (wildcardDomainRule == DomainType.PRIVATE) {
+<a class="jxr_linenumber" name="L164" href="#L164">164</a>                         <strong class="jxr_keyword">return</strong> segment;
+<a class="jxr_linenumber" name="L165" href="#L165">165</a>                     }
+<a class="jxr_linenumber" name="L166" href="#L166">166</a>                     <strong class="jxr_keyword">return</strong> result;
+<a class="jxr_linenumber" name="L167" href="#L167">167</a>                 }
+<a class="jxr_linenumber" name="L168" href="#L168">168</a>             }
+<a class="jxr_linenumber" name="L169" href="#L169">169</a>             result = segment;
+<a class="jxr_linenumber" name="L170" href="#L170">170</a>             segment = nextSegment;
+<a class="jxr_linenumber" name="L171" href="#L171">171</a>         }
+<a class="jxr_linenumber" name="L172" href="#L172">172</a> 
+<a class="jxr_linenumber" name="L173" href="#L173">173</a>         <em class="jxr_comment">// If no expectations then this result is good.</em>
+<a class="jxr_linenumber" name="L174" href="#L174">174</a>         <strong class="jxr_keyword">if</strong> (expectedType == <strong class="jxr_keyword">null</strong> || expectedType == DomainType.UNKNOWN) {
+<a class="jxr_linenumber" name="L175" href="#L175">175</a>             <strong class="jxr_keyword">return</strong> result;
+<a class="jxr_linenumber" name="L176" href="#L176">176</a>         }
+<a class="jxr_linenumber" name="L177" href="#L177">177</a> 
+<a class="jxr_linenumber" name="L178" href="#L178">178</a>         <em class="jxr_comment">// If we did have expectations apparently there was no match</em>
+<a class="jxr_linenumber" name="L179" href="#L179">179</a>         <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="L180" href="#L180">180</a>     }
+<a class="jxr_linenumber" name="L181" href="#L181">181</a> 
+<a class="jxr_linenumber" name="L182" href="#L182">182</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L183" href="#L183">183</a> <em class="jxr_javadoccomment">     * Tests whether the given domain matches any of entry from the public suffix list.</em>
+<a class="jxr_linenumber" name="L184" href="#L184">184</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L185" href="#L185">185</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> matches(<strong class="jxr_keyword">final</strong> String domain) {
+<a class="jxr_linenumber" name="L186" href="#L186">186</a>         <strong class="jxr_keyword">return</strong> matches(domain, <strong class="jxr_keyword">null</strong>);
+<a class="jxr_linenumber" name="L187" href="#L187">187</a>     }
+<a class="jxr_linenumber" name="L188" href="#L188">188</a> 
+<a class="jxr_linenumber" name="L189" href="#L189">189</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L190" href="#L190">190</a> <em class="jxr_javadoccomment">     * Tests whether the given domain matches any of entry from the public suffix list.</em>
+<a class="jxr_linenumber" name="L191" href="#L191">191</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L192" href="#L192">192</a> <em class="jxr_javadoccomment">     * @param domain</em>
+<a class="jxr_linenumber" name="L193" href="#L193">193</a> <em class="jxr_javadoccomment">     * @param expectedType expected domain type or {@code null} if any.</em>
+<a class="jxr_linenumber" name="L194" href="#L194">194</a> <em class="jxr_javadoccomment">     * @return {@code true} if the given domain matches any of the public suffixes.</em>
+<a class="jxr_linenumber" name="L195" href="#L195">195</a> <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L196" href="#L196">196</a> <em class="jxr_javadoccomment">     * @since 4.5</em>
+<a class="jxr_linenumber" name="L197" href="#L197">197</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L198" href="#L198">198</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> matches(<strong class="jxr_keyword">final</strong> String domain, <strong class="jxr_keyword">final</strong> <a name="DomainType" href="../../../../../org/apache/http/conn/util/DomainType.html#DomainType">DomainType</a> expectedType) {
+<a class="jxr_linenumber" name="L199" href="#L199">199</a>         <strong class="jxr_keyword">if</strong> (domain == <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="L200" href="#L200">200</a>             <strong class="jxr_keyword">return</strong> false;
+<a class="jxr_linenumber" name="L201" href="#L201">201</a>         }
+<a class="jxr_linenumber" name="L202" href="#L202">202</a>         <strong class="jxr_keyword">final</strong> String domainRoot = getDomainRoot(
+<a class="jxr_linenumber" name="L203" href="#L203">203</a>                 domain.startsWith(<span class="jxr_string">"."</span>) ? domain.substring(1) : domain, expectedType);
+<a class="jxr_linenumber" name="L204" href="#L204">204</a>         <strong class="jxr_keyword">return</strong> domainRoot == <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="L205" href="#L205">205</a>     }
+<a class="jxr_linenumber" name="L206" href="#L206">206</a> 
+<a class="jxr_linenumber" name="L207" href="#L207">207</a> }
 </pre>
 <hr/>
 <div id="footer">Copyright &#169; 1999&#x2013;2020 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/conn/util/package-frame.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/conn/util/package-frame.html?rev=1874931&r1=1874930&r2=1874931&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/conn/util/package-frame.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/conn/util/package-frame.html Sat Mar  7 09:44:14 2020
@@ -4,7 +4,7 @@
     <!-- generated by Apache Maven JXR (jdk8) -->
     <head>
         <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-        <title>Apache HttpClient 4.5.11 Reference Package org.apache.http.conn.util</title>
+        <title>Apache HttpClient 4.5.12 Reference Package org.apache.http.conn.util</title>
         <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
     </head>
     <body>

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/conn/util/package-summary.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/conn/util/package-summary.html?rev=1874931&r1=1874930&r2=1874931&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/conn/util/package-summary.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/conn/util/package-summary.html Sat Mar  7 09:44:14 2020
@@ -4,7 +4,7 @@
     <!-- generated by Apache Maven JXR (jdk8) -->
     <head>
         <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-        <title>Apache HttpClient 4.5.11 Reference Package org.apache.http.conn.util</title>
+        <title>Apache HttpClient 4.5.12 Reference Package org.apache.http.conn.util</title>
         <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
     </head>
 
@@ -23,7 +23,7 @@
                 <li>Index</li>
                 <li>Help</li>
             </ul>
-            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.11 Reference</strong></em></div>
+            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.12 Reference</strong></em></div>
         </div>
         <div class="subNav">
             <ul class="navList">
@@ -111,7 +111,7 @@
                 <li>Index</li>
                 <li>Help</li>
             </ul>
-            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.11 Reference</strong></em></div>
+            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.12 Reference</strong></em></div>
         </div>
         <div class="subNav">
             <ul class="navList">

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/package-frame.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/package-frame.html?rev=1874931&r1=1874930&r2=1874931&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/package-frame.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/package-frame.html Sat Mar  7 09:44:14 2020
@@ -4,7 +4,7 @@
     <!-- generated by Apache Maven JXR (jdk8) -->
     <head>
         <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-        <title>Apache HttpClient 4.5.11 Reference Package org.apache.http.cookie</title>
+        <title>Apache HttpClient 4.5.12 Reference Package org.apache.http.cookie</title>
         <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" />
     </head>
     <body>

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/package-summary.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/package-summary.html?rev=1874931&r1=1874930&r2=1874931&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/package-summary.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/package-summary.html Sat Mar  7 09:44:14 2020
@@ -4,7 +4,7 @@
     <!-- generated by Apache Maven JXR (jdk8) -->
     <head>
         <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-        <title>Apache HttpClient 4.5.11 Reference Package org.apache.http.cookie</title>
+        <title>Apache HttpClient 4.5.12 Reference Package org.apache.http.cookie</title>
         <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="style" />
     </head>
 
@@ -23,7 +23,7 @@
                 <li>Index</li>
                 <li>Help</li>
             </ul>
-            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.11 Reference</strong></em></div>
+            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.12 Reference</strong></em></div>
         </div>
         <div class="subNav">
             <ul class="navList">
@@ -161,7 +161,7 @@
                 <li>Index</li>
                 <li>Help</li>
             </ul>
-            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.11 Reference</strong></em></div>
+            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.12 Reference</strong></em></div>
         </div>
         <div class="subNav">
             <ul class="navList">

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/params/package-frame.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/params/package-frame.html?rev=1874931&r1=1874930&r2=1874931&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/params/package-frame.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/params/package-frame.html Sat Mar  7 09:44:14 2020
@@ -4,7 +4,7 @@
     <!-- generated by Apache Maven JXR (jdk8) -->
     <head>
         <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-        <title>Apache HttpClient 4.5.11 Reference Package org.apache.http.cookie.params</title>
+        <title>Apache HttpClient 4.5.12 Reference Package org.apache.http.cookie.params</title>
         <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
     </head>
     <body>

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/params/package-summary.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/params/package-summary.html?rev=1874931&r1=1874930&r2=1874931&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/params/package-summary.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/cookie/params/package-summary.html Sat Mar  7 09:44:14 2020
@@ -4,7 +4,7 @@
     <!-- generated by Apache Maven JXR (jdk8) -->
     <head>
         <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-        <title>Apache HttpClient 4.5.11 Reference Package org.apache.http.cookie.params</title>
+        <title>Apache HttpClient 4.5.12 Reference Package org.apache.http.cookie.params</title>
         <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
     </head>
 
@@ -23,7 +23,7 @@
                 <li>Index</li>
                 <li>Help</li>
             </ul>
-            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.11 Reference</strong></em></div>
+            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.12 Reference</strong></em></div>
         </div>
         <div class="subNav">
             <ul class="navList">
@@ -86,7 +86,7 @@
                 <li>Index</li>
                 <li>Help</li>
             </ul>
-            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.11 Reference</strong></em></div>
+            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.12 Reference</strong></em></div>
         </div>
         <div class="subNav">
             <ul class="navList">

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/auth/package-frame.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/auth/package-frame.html?rev=1874931&r1=1874930&r2=1874931&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/auth/package-frame.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/auth/package-frame.html Sat Mar  7 09:44:14 2020
@@ -4,7 +4,7 @@
     <!-- generated by Apache Maven JXR (jdk8) -->
     <head>
         <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-        <title>Apache HttpClient 4.5.11 Reference Package org.apache.http.impl.auth</title>
+        <title>Apache HttpClient 4.5.12 Reference Package org.apache.http.impl.auth</title>
         <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
     </head>
     <body>

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/auth/package-summary.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/auth/package-summary.html?rev=1874931&r1=1874930&r2=1874931&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/auth/package-summary.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/auth/package-summary.html Sat Mar  7 09:44:14 2020
@@ -4,7 +4,7 @@
     <!-- generated by Apache Maven JXR (jdk8) -->
     <head>
         <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-        <title>Apache HttpClient 4.5.11 Reference Package org.apache.http.impl.auth</title>
+        <title>Apache HttpClient 4.5.12 Reference Package org.apache.http.impl.auth</title>
         <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
     </head>
 
@@ -23,7 +23,7 @@
                 <li>Index</li>
                 <li>Help</li>
             </ul>
-            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.11 Reference</strong></em></div>
+            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.12 Reference</strong></em></div>
         </div>
         <div class="subNav">
             <ul class="navList">
@@ -241,7 +241,7 @@
                 <li>Index</li>
                 <li>Help</li>
             </ul>
-            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.11 Reference</strong></em></div>
+            <div class="aboutLanguage"><em><strong>Apache HttpClient 4.5.12 Reference</strong></em></div>
         </div>
         <div class="subNav">
             <ul class="navList">

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/client/DefaultRedirectStrategy.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/client/DefaultRedirectStrategy.html?rev=1874931&r1=1874930&r2=1874931&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/client/DefaultRedirectStrategy.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/client/DefaultRedirectStrategy.html Sat Mar  7 09:44:14 2020
@@ -82,164 +82,167 @@
 <a class="jxr_linenumber" name="L74" href="#L74">74</a>  
 <a class="jxr_linenumber" name="L75" href="#L75">75</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> Log log = LogFactory.getLog(getClass());
 <a class="jxr_linenumber" name="L76" href="#L76">76</a>  
-<a class="jxr_linenumber" name="L77" href="#L77">77</a>      <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L78" href="#L78">78</a>  <em class="jxr_javadoccomment">     * @deprecated (4.3) use {@link org.apache.http.client.protocol.HttpClientContext#REDIRECT_LOCATIONS}.</em>
-<a class="jxr_linenumber" name="L79" href="#L79">79</a>  <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L80" href="#L80">80</a>      @Deprecated
-<a class="jxr_linenumber" name="L81" href="#L81">81</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String REDIRECT_LOCATIONS = <span class="jxr_string">"http.protocol.redirect-locations"</span>;
-<a class="jxr_linenumber" name="L82" href="#L82">82</a>  
-<a class="jxr_linenumber" name="L83" href="#L83">83</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <a name="DefaultRedirectStrategy" href="../../../../../org/apache/http/impl/<a name="DefaultRedirectStrategy" href="../../../../../org/apache/http/impl/client/DefaultRedirectStrategy.html#DefaultRedirectStrategy">DefaultRedirectStrategy</a>trategy.html#DefaultRedirectStrategy">DefaultRedirectStrategy</a> INSTANCE = <strong class="jxr_keyword">new</strong> <a name="DefaultRedirectStrategy" href="../../../../../org/apache/http/impl/client/DefaultRedirectStrategy.html#DefaultRedirectStrategy">DefaultRedirectStrategy</a>();
+<a class="jxr_linenumber" name="L77" href="#L77">77</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> SC_PERMANENT_REDIRECT = 308;
+<a class="jxr_linenumber" name="L78" href="#L78">78</a>  
+<a class="jxr_linenumber" name="L79" href="#L79">79</a>      <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L80" href="#L80">80</a>  <em class="jxr_javadoccomment">     * @deprecated (4.3) use {@link org.apache.http.client.protocol.HttpClientContext#REDIRECT_LOCATIONS}.</em>
+<a class="jxr_linenumber" name="L81" href="#L81">81</a>  <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L82" href="#L82">82</a>      @Deprecated
+<a class="jxr_linenumber" name="L83" href="#L83">83</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> String REDIRECT_LOCATIONS = <span class="jxr_string">"http.protocol.redirect-locations"</span>;
 <a class="jxr_linenumber" name="L84" href="#L84">84</a>  
-<a class="jxr_linenumber" name="L85" href="#L85">85</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> String[] redirectMethods;
+<a class="jxr_linenumber" name="L85" href="#L85">85</a>      <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">static</strong> <strong class="jxr_keyword">final</strong> <a name="DefaultRedirectStrategy" href="../../../../../org/apache/http/impl/<a name="DefaultRedirectStrategy" href="../../../../../org/apache/http/impl/client/DefaultRedirectStrategy.html#DefaultRedirectStrategy">DefaultRedirectStrategy</a>trategy.html#DefaultRedirectStrategy">DefaultRedirectStrategy</a> INSTANCE = <strong class="jxr_keyword">new</strong> <a name="DefaultRedirectStrategy" href="../../../../../org/apache/http/impl/client/DefaultRedirectStrategy.html#DefaultRedirectStrategy">DefaultRedirectStrategy</a>();
 <a class="jxr_linenumber" name="L86" href="#L86">86</a>  
-<a class="jxr_linenumber" name="L87" href="#L87">87</a>      <strong class="jxr_keyword">public</strong> <a name="DefaultRedirectStrategy" href="../../../../../org/apache/http/impl/client/DefaultRedirectStrategy.html#DefaultRedirectStrategy">DefaultRedirectStrategy</a>() {
-<a class="jxr_linenumber" name="L88" href="#L88">88</a>          <strong class="jxr_keyword">this</strong>(<strong class="jxr_keyword">new</strong> String[] {
-<a class="jxr_linenumber" name="L89" href="#L89">89</a>              HttpGet.METHOD_NAME,
-<a class="jxr_linenumber" name="L90" href="#L90">90</a>              HttpHead.METHOD_NAME
-<a class="jxr_linenumber" name="L91" href="#L91">91</a>          });
-<a class="jxr_linenumber" name="L92" href="#L92">92</a>      }
-<a class="jxr_linenumber" name="L93" href="#L93">93</a>  
-<a class="jxr_linenumber" name="L94" href="#L94">94</a>      <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L95" href="#L95">95</a>  <em class="jxr_javadoccomment">     * Constructs a new instance to redirect the given HTTP methods.</em>
-<a class="jxr_linenumber" name="L96" href="#L96">96</a>  <em class="jxr_javadoccomment">     *</em>
-<a class="jxr_linenumber" name="L97" href="#L97">97</a>  <em class="jxr_javadoccomment">     * @param redirectMethods The methods to redirect.</em>
-<a class="jxr_linenumber" name="L98" href="#L98">98</a>  <em class="jxr_javadoccomment">     * @since 4.5.10</em>
-<a class="jxr_linenumber" name="L99" href="#L99">99</a>  <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L100" href="#L100">100</a>     <strong class="jxr_keyword">public</strong> <a name="DefaultRedirectStrategy" href="../../../../../org/apache/http/impl/client/DefaultRedirectStrategy.html#DefaultRedirectStrategy">DefaultRedirectStrategy</a>(<strong class="jxr_keyword">final</strong> String[] redirectMethods) {
-<a class="jxr_linenumber" name="L101" href="#L101">101</a>         <strong class="jxr_keyword">super</strong>();
-<a class="jxr_linenumber" name="L102" href="#L102">102</a>         <strong class="jxr_keyword">final</strong> String[] tmp = redirectMethods.clone();
-<a class="jxr_linenumber" name="L103" href="#L103">103</a>         Arrays.sort(tmp);
-<a class="jxr_linenumber" name="L104" href="#L104">104</a>         <strong class="jxr_keyword">this</strong>.redirectMethods = tmp;
-<a class="jxr_linenumber" name="L105" href="#L105">105</a>     }
-<a class="jxr_linenumber" name="L106" href="#L106">106</a> 
-<a class="jxr_linenumber" name="L107" href="#L107">107</a>     @Override
-<a class="jxr_linenumber" name="L108" href="#L108">108</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isRedirected(
-<a class="jxr_linenumber" name="L109" href="#L109">109</a>             <strong class="jxr_keyword">final</strong> HttpRequest request,
-<a class="jxr_linenumber" name="L110" href="#L110">110</a>             <strong class="jxr_keyword">final</strong> HttpResponse response,
-<a class="jxr_linenumber" name="L111" href="#L111">111</a>             <strong class="jxr_keyword">final</strong> HttpContext context) <strong class="jxr_keyword">throws</strong> ProtocolException {
-<a class="jxr_linenumber" name="L112" href="#L112">112</a>         Args.notNull(request, <span class="jxr_string">"HTTP request"</span>);
-<a class="jxr_linenumber" name="L113" href="#L113">113</a>         Args.notNull(response, <span class="jxr_string">"HTTP response"</span>);
-<a class="jxr_linenumber" name="L114" href="#L114">114</a> 
-<a class="jxr_linenumber" name="L115" href="#L115">115</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> statusCode = response.getStatusLine().getStatusCode();
-<a class="jxr_linenumber" name="L116" href="#L116">116</a>         <strong class="jxr_keyword">final</strong> String method = request.getRequestLine().getMethod();
-<a class="jxr_linenumber" name="L117" href="#L117">117</a>         <strong class="jxr_keyword">final</strong> Header locationHeader = response.getFirstHeader(<span class="jxr_string">"location"</span>);
-<a class="jxr_linenumber" name="L118" href="#L118">118</a>         <strong class="jxr_keyword">switch</strong> (statusCode) {
-<a class="jxr_linenumber" name="L119" href="#L119">119</a>         <strong class="jxr_keyword">case</strong> HttpStatus.SC_MOVED_TEMPORARILY:
-<a class="jxr_linenumber" name="L120" href="#L120">120</a>             <strong class="jxr_keyword">return</strong> isRedirectable(method) &amp;&amp; locationHeader != <strong class="jxr_keyword">null</strong>;
-<a class="jxr_linenumber" name="L121" href="#L121">121</a>         <strong class="jxr_keyword">case</strong> HttpStatus.SC_MOVED_PERMANENTLY:
-<a class="jxr_linenumber" name="L122" href="#L122">122</a>         <strong class="jxr_keyword">case</strong> HttpStatus.SC_TEMPORARY_REDIRECT:
-<a class="jxr_linenumber" name="L123" href="#L123">123</a>             <strong class="jxr_keyword">return</strong> isRedirectable(method);
-<a class="jxr_linenumber" name="L124" href="#L124">124</a>         <strong class="jxr_keyword">case</strong> HttpStatus.SC_SEE_OTHER:
-<a class="jxr_linenumber" name="L125" href="#L125">125</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
-<a class="jxr_linenumber" name="L126" href="#L126">126</a>         <strong class="jxr_keyword">default</strong>:
-<a class="jxr_linenumber" name="L127" href="#L127">127</a>             <strong class="jxr_keyword">return</strong> false;
-<a class="jxr_linenumber" name="L128" href="#L128">128</a>         } <em class="jxr_comment">//end of switch</em>
-<a class="jxr_linenumber" name="L129" href="#L129">129</a>     }
-<a class="jxr_linenumber" name="L130" href="#L130">130</a> 
-<a class="jxr_linenumber" name="L131" href="#L131">131</a>     <strong class="jxr_keyword">public</strong> URI getLocationURI(
-<a class="jxr_linenumber" name="L132" href="#L132">132</a>             <strong class="jxr_keyword">final</strong> HttpRequest request,
-<a class="jxr_linenumber" name="L133" href="#L133">133</a>             <strong class="jxr_keyword">final</strong> HttpResponse response,
-<a class="jxr_linenumber" name="L134" href="#L134">134</a>             <strong class="jxr_keyword">final</strong> HttpContext context) <strong class="jxr_keyword">throws</strong> ProtocolException {
-<a class="jxr_linenumber" name="L135" href="#L135">135</a>         Args.notNull(request, <span class="jxr_string">"HTTP request"</span>);
-<a class="jxr_linenumber" name="L136" href="#L136">136</a>         Args.notNull(response, <span class="jxr_string">"HTTP response"</span>);
-<a class="jxr_linenumber" name="L137" href="#L137">137</a>         Args.notNull(context, <span class="jxr_string">"HTTP context"</span>);
-<a class="jxr_linenumber" name="L138" href="#L138">138</a> 
-<a class="jxr_linenumber" name="L139" href="#L139">139</a>         <strong class="jxr_keyword">final</strong> <a name="HttpClientContext" href="../../../../../org/apache/http/client/protocol/HttpClientContext.html#HttpClientContext">HttpClientContext</a> clientContext = HttpClientContext.adapt(context);
-<a class="jxr_linenumber" name="L140" href="#L140">140</a> 
-<a class="jxr_linenumber" name="L141" href="#L141">141</a>         <em class="jxr_comment">//get the location header to find out where to redirect to</em>
-<a class="jxr_linenumber" name="L142" href="#L142">142</a>         <strong class="jxr_keyword">final</strong> Header locationHeader = response.getFirstHeader(<span class="jxr_string">"location"</span>);
-<a class="jxr_linenumber" name="L143" href="#L143">143</a>         <strong class="jxr_keyword">if</strong> (locationHeader == <strong class="jxr_keyword">null</strong>) {
-<a class="jxr_linenumber" name="L144" href="#L144">144</a>             <em class="jxr_comment">// got a redirect response, but no location header</em>
-<a class="jxr_linenumber" name="L145" href="#L145">145</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> ProtocolException(
-<a class="jxr_linenumber" name="L146" href="#L146">146</a>                     <span class="jxr_string">"Received redirect response "</span> + response.getStatusLine()
-<a class="jxr_linenumber" name="L147" href="#L147">147</a>                     + <span class="jxr_string">" but no location header"</span>);
-<a class="jxr_linenumber" name="L148" href="#L148">148</a>         }
-<a class="jxr_linenumber" name="L149" href="#L149">149</a>         <strong class="jxr_keyword">final</strong> String location = locationHeader.getValue();
-<a class="jxr_linenumber" name="L150" href="#L150">150</a>         <strong class="jxr_keyword">if</strong> (<strong class="jxr_keyword">this</strong>.log.isDebugEnabled()) {
-<a class="jxr_linenumber" name="L151" href="#L151">151</a>             <strong class="jxr_keyword">this</strong>.log.debug(<span class="jxr_string">"Redirect requested to location '"</span> + location + <span class="jxr_string">"'"</span>);
-<a class="jxr_linenumber" name="L152" href="#L152">152</a>         }
-<a class="jxr_linenumber" name="L153" href="#L153">153</a> 
-<a class="jxr_linenumber" name="L154" href="#L154">154</a>         <strong class="jxr_keyword">final</strong> <a name="RequestConfig" href="../../../../../org/apache/http/client/config/RequestConfig.html#RequestConfig">RequestConfig</a> config = clientContext.getRequestConfig();
-<a class="jxr_linenumber" name="L155" href="#L155">155</a> 
-<a class="jxr_linenumber" name="L156" href="#L156">156</a>         URI uri = createLocationURI(location);
-<a class="jxr_linenumber" name="L157" href="#L157">157</a> 
-<a class="jxr_linenumber" name="L158" href="#L158">158</a>         <strong class="jxr_keyword">try</strong> {
-<a class="jxr_linenumber" name="L159" href="#L159">159</a>             <strong class="jxr_keyword">if</strong> (config.isNormalizeUri()) {
-<a class="jxr_linenumber" name="L160" href="#L160">160</a>                 uri = URIUtils.normalizeSyntax(uri);
-<a class="jxr_linenumber" name="L161" href="#L161">161</a>             }
-<a class="jxr_linenumber" name="L162" href="#L162">162</a> 
-<a class="jxr_linenumber" name="L163" href="#L163">163</a>             <em class="jxr_comment">// rfc2616 demands the location value be a complete URI</em>
-<a class="jxr_linenumber" name="L164" href="#L164">164</a>             <em class="jxr_comment">// Location       = "Location" ":" absoluteURI</em>
-<a class="jxr_linenumber" name="L165" href="#L165">165</a>             <strong class="jxr_keyword">if</strong> (!uri.isAbsolute()) {
-<a class="jxr_linenumber" name="L166" href="#L166">166</a>                 <strong class="jxr_keyword">if</strong> (!config.isRelativeRedirectsAllowed()) {
-<a class="jxr_linenumber" name="L167" href="#L167">167</a>                     <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> ProtocolException(<span class="jxr_string">"Relative redirect location '"</span>
-<a class="jxr_linenumber" name="L168" href="#L168">168</a>                             + uri + <span class="jxr_string">"' not allowed"</span>);
-<a class="jxr_linenumber" name="L169" href="#L169">169</a>                 }
-<a class="jxr_linenumber" name="L170" href="#L170">170</a>                 <em class="jxr_comment">// Adjust location URI</em>
-<a class="jxr_linenumber" name="L171" href="#L171">171</a>                 <strong class="jxr_keyword">final</strong> HttpHost target = clientContext.getTargetHost();
-<a class="jxr_linenumber" name="L172" href="#L172">172</a>                 Asserts.notNull(target, <span class="jxr_string">"Target host"</span>);
-<a class="jxr_linenumber" name="L173" href="#L173">173</a>                 <strong class="jxr_keyword">final</strong> URI requestURI = <strong class="jxr_keyword">new</strong> URI(request.getRequestLine().getUri());
-<a class="jxr_linenumber" name="L174" href="#L174">174</a>                 <strong class="jxr_keyword">final</strong> URI absoluteRequestURI = URIUtils.rewriteURI(requestURI, target,
-<a class="jxr_linenumber" name="L175" href="#L175">175</a>                     config.isNormalizeUri() ? URIUtils.NORMALIZE : URIUtils.NO_FLAGS);
-<a class="jxr_linenumber" name="L176" href="#L176">176</a>                 uri = URIUtils.resolve(absoluteRequestURI, uri);
-<a class="jxr_linenumber" name="L177" href="#L177">177</a>             }
-<a class="jxr_linenumber" name="L178" href="#L178">178</a>         } <strong class="jxr_keyword">catch</strong> (<strong class="jxr_keyword">final</strong> URISyntaxException ex) {
-<a class="jxr_linenumber" name="L179" href="#L179">179</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> ProtocolException(ex.getMessage(), ex);
-<a class="jxr_linenumber" name="L180" href="#L180">180</a>         }
-<a class="jxr_linenumber" name="L181" href="#L181">181</a> 
-<a class="jxr_linenumber" name="L182" href="#L182">182</a>         <a name="RedirectLocations" href="../..<a name="RedirectLocations" href="../../../../../org/apache/http/impl/client/RedirectLocations.html#RedirectLocations">RedirectLocations</a>che/http/impl/client/RedirectLocations.html#RedirectLocations">RedirectLocations</a> redirectLocations = (<a name="RedirectLocations" href="../../../../../org/apache/http/impl/client/RedirectLocations.html#RedirectLocations">RedirectLocations</a>) clientContext.getAttribute(
-<a class="jxr_linenumber" name="L183" href="#L183">183</a>                 HttpClientContext.REDIRECT_LOCATIONS);
-<a class="jxr_linenumber" name="L184" href="#L184">184</a>         <strong class="jxr_keyword">if</strong> (redirectLocations == <strong class="jxr_keyword">null</strong>) {
-<a class="jxr_linenumber" name="L185" href="#L185">185</a>             redirectLocations = <strong class="jxr_keyword">new</strong> <a name="RedirectLocations" href="../../../../../org/apache/http/impl/client/RedirectLocations.html#RedirectLocations">RedirectLocations</a>();
-<a class="jxr_linenumber" name="L186" href="#L186">186</a>             context.setAttribute(HttpClientContext.REDIRECT_LOCATIONS, redirectLocations);
-<a class="jxr_linenumber" name="L187" href="#L187">187</a>         }
-<a class="jxr_linenumber" name="L188" href="#L188">188</a>         <strong class="jxr_keyword">if</strong> (!config.isCircularRedirectsAllowed()) {
-<a class="jxr_linenumber" name="L189" href="#L189">189</a>             <strong class="jxr_keyword">if</strong> (redirectLocations.contains(uri)) {
-<a class="jxr_linenumber" name="L190" href="#L190">190</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a name="CircularRedirectException" href="../../../../../org/apache/http/client/CircularRedirectException.html#CircularRedirectException">CircularRedirectException</a>(<span class="jxr_string">"Circular redirect to '"</span> + uri + <span class="jxr_string">"'"</span>);
-<a class="jxr_linenumber" name="L191" href="#L191">191</a>             }
-<a class="jxr_linenumber" name="L192" href="#L192">192</a>         }
-<a class="jxr_linenumber" name="L193" href="#L193">193</a>         redirectLocations.add(uri);
-<a class="jxr_linenumber" name="L194" href="#L194">194</a>         <strong class="jxr_keyword">return</strong> uri;
-<a class="jxr_linenumber" name="L195" href="#L195">195</a>     }
-<a class="jxr_linenumber" name="L196" href="#L196">196</a> 
-<a class="jxr_linenumber" name="L197" href="#L197">197</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L198" href="#L198">198</a> <em class="jxr_javadoccomment">     * @since 4.1</em>
-<a class="jxr_linenumber" name="L199" href="#L199">199</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L200" href="#L200">200</a>     <strong class="jxr_keyword">protected</strong> URI createLocationURI(<strong class="jxr_keyword">final</strong> String location) <strong class="jxr_keyword">throws</strong> ProtocolException {
-<a class="jxr_linenumber" name="L201" href="#L201">201</a>         <strong class="jxr_keyword">try</strong> {
-<a class="jxr_linenumber" name="L202" href="#L202">202</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> URI(location);
-<a class="jxr_linenumber" name="L203" href="#L203">203</a>         } <strong class="jxr_keyword">catch</strong> (<strong class="jxr_keyword">final</strong> URISyntaxException ex) {
-<a class="jxr_linenumber" name="L204" href="#L204">204</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> ProtocolException(<span class="jxr_string">"Invalid redirect URI: "</span> + location, ex);
-<a class="jxr_linenumber" name="L205" href="#L205">205</a>         }
-<a class="jxr_linenumber" name="L206" href="#L206">206</a>     }
-<a class="jxr_linenumber" name="L207" href="#L207">207</a> 
-<a class="jxr_linenumber" name="L208" href="#L208">208</a>     <em class="jxr_javadoccomment">/**</em>
-<a class="jxr_linenumber" name="L209" href="#L209">209</a> <em class="jxr_javadoccomment">     * @since 4.2</em>
-<a class="jxr_linenumber" name="L210" href="#L210">210</a> <em class="jxr_javadoccomment">     */</em>
-<a class="jxr_linenumber" name="L211" href="#L211">211</a>     <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">boolean</strong> isRedirectable(<strong class="jxr_keyword">final</strong> String method) {
-<a class="jxr_linenumber" name="L212" href="#L212">212</a>         <strong class="jxr_keyword">return</strong> Arrays.binarySearch(redirectMethods, method) &gt;= 0;
-<a class="jxr_linenumber" name="L213" href="#L213">213</a>     }
-<a class="jxr_linenumber" name="L214" href="#L214">214</a> 
-<a class="jxr_linenumber" name="L215" href="#L215">215</a>     @Override
-<a class="jxr_linenumber" name="L216" href="#L216">216</a>     <strong class="jxr_keyword">public</strong> <a name="HttpUriRequest" href="../../../../../org/apache/http/client/methods/HttpUriRequest.html#HttpUriRequest">HttpUriRequest</a> getRedirect(
-<a class="jxr_linenumber" name="L217" href="#L217">217</a>             <strong class="jxr_keyword">final</strong> HttpRequest request,
-<a class="jxr_linenumber" name="L218" href="#L218">218</a>             <strong class="jxr_keyword">final</strong> HttpResponse response,
-<a class="jxr_linenumber" name="L219" href="#L219">219</a>             <strong class="jxr_keyword">final</strong> HttpContext context) <strong class="jxr_keyword">throws</strong> ProtocolException {
-<a class="jxr_linenumber" name="L220" href="#L220">220</a>         <strong class="jxr_keyword">final</strong> URI uri = getLocationURI(request, response, context);
-<a class="jxr_linenumber" name="L221" href="#L221">221</a>         <strong class="jxr_keyword">final</strong> String method = request.getRequestLine().getMethod();
-<a class="jxr_linenumber" name="L222" href="#L222">222</a>         <strong class="jxr_keyword">if</strong> (method.equalsIgnoreCase(HttpHead.METHOD_NAME)) {
-<a class="jxr_linenumber" name="L223" href="#L223">223</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> <a name="HttpHead" href="../../../../../org/apache/http/client/methods/HttpHead.html#HttpHead">HttpHead</a>(uri);
-<a class="jxr_linenumber" name="L224" href="#L224">224</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (method.equalsIgnoreCase(HttpGet.METHOD_NAME)) {
-<a class="jxr_linenumber" name="L225" href="#L225">225</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> <a name="HttpGet" href="../../../../../org/apache/http/client/methods/HttpGet.html#HttpGet">HttpGet</a>(uri);
-<a class="jxr_linenumber" name="L226" href="#L226">226</a>         } <strong class="jxr_keyword">else</strong> {
-<a class="jxr_linenumber" name="L227" href="#L227">227</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> status = response.getStatusLine().getStatusCode();
-<a class="jxr_linenumber" name="L228" href="#L228">228</a>             <strong class="jxr_keyword">return</strong> status == HttpStatus.SC_TEMPORARY_REDIRECT
-<a class="jxr_linenumber" name="L229" href="#L229">229</a>                             ? RequestBuilder.copy(request).setUri(uri).build()
-<a class="jxr_linenumber" name="L230" href="#L230">230</a>                             : <strong class="jxr_keyword">new</strong> <a name="HttpGet" href="../../../../../org/apache/http/client/methods/HttpGet.html#HttpGet">HttpGet</a>(uri);
-<a class="jxr_linenumber" name="L231" href="#L231">231</a>         }
-<a class="jxr_linenumber" name="L232" href="#L232">232</a>     }
-<a class="jxr_linenumber" name="L233" href="#L233">233</a> 
-<a class="jxr_linenumber" name="L234" href="#L234">234</a> }
+<a class="jxr_linenumber" name="L87" href="#L87">87</a>      <strong class="jxr_keyword">private</strong> <strong class="jxr_keyword">final</strong> String[] redirectMethods;
+<a class="jxr_linenumber" name="L88" href="#L88">88</a>  
+<a class="jxr_linenumber" name="L89" href="#L89">89</a>      <strong class="jxr_keyword">public</strong> <a name="DefaultRedirectStrategy" href="../../../../../org/apache/http/impl/client/DefaultRedirectStrategy.html#DefaultRedirectStrategy">DefaultRedirectStrategy</a>() {
+<a class="jxr_linenumber" name="L90" href="#L90">90</a>          <strong class="jxr_keyword">this</strong>(<strong class="jxr_keyword">new</strong> String[] {
+<a class="jxr_linenumber" name="L91" href="#L91">91</a>              HttpGet.METHOD_NAME,
+<a class="jxr_linenumber" name="L92" href="#L92">92</a>              HttpHead.METHOD_NAME
+<a class="jxr_linenumber" name="L93" href="#L93">93</a>          });
+<a class="jxr_linenumber" name="L94" href="#L94">94</a>      }
+<a class="jxr_linenumber" name="L95" href="#L95">95</a>  
+<a class="jxr_linenumber" name="L96" href="#L96">96</a>      <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L97" href="#L97">97</a>  <em class="jxr_javadoccomment">     * Constructs a new instance to redirect the given HTTP methods.</em>
+<a class="jxr_linenumber" name="L98" href="#L98">98</a>  <em class="jxr_javadoccomment">     *</em>
+<a class="jxr_linenumber" name="L99" href="#L99">99</a>  <em class="jxr_javadoccomment">     * @param redirectMethods The methods to redirect.</em>
+<a class="jxr_linenumber" name="L100" href="#L100">100</a> <em class="jxr_javadoccomment">     * @since 4.5.10</em>
+<a class="jxr_linenumber" name="L101" href="#L101">101</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L102" href="#L102">102</a>     <strong class="jxr_keyword">public</strong> <a name="DefaultRedirectStrategy" href="../../../../../org/apache/http/impl/client/DefaultRedirectStrategy.html#DefaultRedirectStrategy">DefaultRedirectStrategy</a>(<strong class="jxr_keyword">final</strong> String[] redirectMethods) {
+<a class="jxr_linenumber" name="L103" href="#L103">103</a>         <strong class="jxr_keyword">super</strong>();
+<a class="jxr_linenumber" name="L104" href="#L104">104</a>         <strong class="jxr_keyword">final</strong> String[] tmp = redirectMethods.clone();
+<a class="jxr_linenumber" name="L105" href="#L105">105</a>         Arrays.sort(tmp);
+<a class="jxr_linenumber" name="L106" href="#L106">106</a>         <strong class="jxr_keyword">this</strong>.redirectMethods = tmp;
+<a class="jxr_linenumber" name="L107" href="#L107">107</a>     }
+<a class="jxr_linenumber" name="L108" href="#L108">108</a> 
+<a class="jxr_linenumber" name="L109" href="#L109">109</a>     @Override
+<a class="jxr_linenumber" name="L110" href="#L110">110</a>     <strong class="jxr_keyword">public</strong> <strong class="jxr_keyword">boolean</strong> isRedirected(
+<a class="jxr_linenumber" name="L111" href="#L111">111</a>             <strong class="jxr_keyword">final</strong> HttpRequest request,
+<a class="jxr_linenumber" name="L112" href="#L112">112</a>             <strong class="jxr_keyword">final</strong> HttpResponse response,
+<a class="jxr_linenumber" name="L113" href="#L113">113</a>             <strong class="jxr_keyword">final</strong> HttpContext context) <strong class="jxr_keyword">throws</strong> ProtocolException {
+<a class="jxr_linenumber" name="L114" href="#L114">114</a>         Args.notNull(request, <span class="jxr_string">"HTTP request"</span>);
+<a class="jxr_linenumber" name="L115" href="#L115">115</a>         Args.notNull(response, <span class="jxr_string">"HTTP response"</span>);
+<a class="jxr_linenumber" name="L116" href="#L116">116</a> 
+<a class="jxr_linenumber" name="L117" href="#L117">117</a>         <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> statusCode = response.getStatusLine().getStatusCode();
+<a class="jxr_linenumber" name="L118" href="#L118">118</a>         <strong class="jxr_keyword">final</strong> String method = request.getRequestLine().getMethod();
+<a class="jxr_linenumber" name="L119" href="#L119">119</a>         <strong class="jxr_keyword">final</strong> Header locationHeader = response.getFirstHeader(<span class="jxr_string">"location"</span>);
+<a class="jxr_linenumber" name="L120" href="#L120">120</a>         <strong class="jxr_keyword">switch</strong> (statusCode) {
+<a class="jxr_linenumber" name="L121" href="#L121">121</a>         <strong class="jxr_keyword">case</strong> HttpStatus.SC_MOVED_TEMPORARILY:
+<a class="jxr_linenumber" name="L122" href="#L122">122</a>             <strong class="jxr_keyword">return</strong> isRedirectable(method) &amp;&amp; locationHeader != <strong class="jxr_keyword">null</strong>;
+<a class="jxr_linenumber" name="L123" href="#L123">123</a>         <strong class="jxr_keyword">case</strong> HttpStatus.SC_MOVED_PERMANENTLY:
+<a class="jxr_linenumber" name="L124" href="#L124">124</a>         <strong class="jxr_keyword">case</strong> HttpStatus.SC_TEMPORARY_REDIRECT:
+<a class="jxr_linenumber" name="L125" href="#L125">125</a>         <strong class="jxr_keyword">case</strong> SC_PERMANENT_REDIRECT:
+<a class="jxr_linenumber" name="L126" href="#L126">126</a>             <strong class="jxr_keyword">return</strong> isRedirectable(method);
+<a class="jxr_linenumber" name="L127" href="#L127">127</a>         <strong class="jxr_keyword">case</strong> HttpStatus.SC_SEE_OTHER:
+<a class="jxr_linenumber" name="L128" href="#L128">128</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">true</strong>;
+<a class="jxr_linenumber" name="L129" href="#L129">129</a>         <strong class="jxr_keyword">default</strong>:
+<a class="jxr_linenumber" name="L130" href="#L130">130</a>             <strong class="jxr_keyword">return</strong> false;
+<a class="jxr_linenumber" name="L131" href="#L131">131</a>         } <em class="jxr_comment">//end of switch</em>
+<a class="jxr_linenumber" name="L132" href="#L132">132</a>     }
+<a class="jxr_linenumber" name="L133" href="#L133">133</a> 
+<a class="jxr_linenumber" name="L134" href="#L134">134</a>     <strong class="jxr_keyword">public</strong> URI getLocationURI(
+<a class="jxr_linenumber" name="L135" href="#L135">135</a>             <strong class="jxr_keyword">final</strong> HttpRequest request,
+<a class="jxr_linenumber" name="L136" href="#L136">136</a>             <strong class="jxr_keyword">final</strong> HttpResponse response,
+<a class="jxr_linenumber" name="L137" href="#L137">137</a>             <strong class="jxr_keyword">final</strong> HttpContext context) <strong class="jxr_keyword">throws</strong> ProtocolException {
+<a class="jxr_linenumber" name="L138" href="#L138">138</a>         Args.notNull(request, <span class="jxr_string">"HTTP request"</span>);
+<a class="jxr_linenumber" name="L139" href="#L139">139</a>         Args.notNull(response, <span class="jxr_string">"HTTP response"</span>);
+<a class="jxr_linenumber" name="L140" href="#L140">140</a>         Args.notNull(context, <span class="jxr_string">"HTTP context"</span>);
+<a class="jxr_linenumber" name="L141" href="#L141">141</a> 
+<a class="jxr_linenumber" name="L142" href="#L142">142</a>         <strong class="jxr_keyword">final</strong> <a name="HttpClientContext" href="../../../../../org/apache/http/client/protocol/HttpClientContext.html#HttpClientContext">HttpClientContext</a> clientContext = HttpClientContext.adapt(context);
+<a class="jxr_linenumber" name="L143" href="#L143">143</a> 
+<a class="jxr_linenumber" name="L144" href="#L144">144</a>         <em class="jxr_comment">//get the location header to find out where to redirect to</em>
+<a class="jxr_linenumber" name="L145" href="#L145">145</a>         <strong class="jxr_keyword">final</strong> Header locationHeader = response.getFirstHeader(<span class="jxr_string">"location"</span>);
+<a class="jxr_linenumber" name="L146" href="#L146">146</a>         <strong class="jxr_keyword">if</strong> (locationHeader == <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="L147" href="#L147">147</a>             <em class="jxr_comment">// got a redirect response, but no location header</em>
+<a class="jxr_linenumber" name="L148" href="#L148">148</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> ProtocolException(
+<a class="jxr_linenumber" name="L149" href="#L149">149</a>                     <span class="jxr_string">"Received redirect response "</span> + response.getStatusLine()
+<a class="jxr_linenumber" name="L150" href="#L150">150</a>                     + <span class="jxr_string">" but no location header"</span>);
+<a class="jxr_linenumber" name="L151" href="#L151">151</a>         }
+<a class="jxr_linenumber" name="L152" href="#L152">152</a>         <strong class="jxr_keyword">final</strong> String location = locationHeader.getValue();
+<a class="jxr_linenumber" name="L153" href="#L153">153</a>         <strong class="jxr_keyword">if</strong> (<strong class="jxr_keyword">this</strong>.log.isDebugEnabled()) {
+<a class="jxr_linenumber" name="L154" href="#L154">154</a>             <strong class="jxr_keyword">this</strong>.log.debug(<span class="jxr_string">"Redirect requested to location '"</span> + location + <span class="jxr_string">"'"</span>);
+<a class="jxr_linenumber" name="L155" href="#L155">155</a>         }
+<a class="jxr_linenumber" name="L156" href="#L156">156</a> 
+<a class="jxr_linenumber" name="L157" href="#L157">157</a>         <strong class="jxr_keyword">final</strong> <a name="RequestConfig" href="../../../../../org/apache/http/client/config/RequestConfig.html#RequestConfig">RequestConfig</a> config = clientContext.getRequestConfig();
+<a class="jxr_linenumber" name="L158" href="#L158">158</a> 
+<a class="jxr_linenumber" name="L159" href="#L159">159</a>         URI uri = createLocationURI(location);
+<a class="jxr_linenumber" name="L160" href="#L160">160</a> 
+<a class="jxr_linenumber" name="L161" href="#L161">161</a>         <strong class="jxr_keyword">try</strong> {
+<a class="jxr_linenumber" name="L162" href="#L162">162</a>             <strong class="jxr_keyword">if</strong> (config.isNormalizeUri()) {
+<a class="jxr_linenumber" name="L163" href="#L163">163</a>                 uri = URIUtils.normalizeSyntax(uri);
+<a class="jxr_linenumber" name="L164" href="#L164">164</a>             }
+<a class="jxr_linenumber" name="L165" href="#L165">165</a> 
+<a class="jxr_linenumber" name="L166" href="#L166">166</a>             <em class="jxr_comment">// rfc2616 demands the location value be a complete URI</em>
+<a class="jxr_linenumber" name="L167" href="#L167">167</a>             <em class="jxr_comment">// Location       = "Location" ":" absoluteURI</em>
+<a class="jxr_linenumber" name="L168" href="#L168">168</a>             <strong class="jxr_keyword">if</strong> (!uri.isAbsolute()) {
+<a class="jxr_linenumber" name="L169" href="#L169">169</a>                 <strong class="jxr_keyword">if</strong> (!config.isRelativeRedirectsAllowed()) {
+<a class="jxr_linenumber" name="L170" href="#L170">170</a>                     <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> ProtocolException(<span class="jxr_string">"Relative redirect location '"</span>
+<a class="jxr_linenumber" name="L171" href="#L171">171</a>                             + uri + <span class="jxr_string">"' not allowed"</span>);
+<a class="jxr_linenumber" name="L172" href="#L172">172</a>                 }
+<a class="jxr_linenumber" name="L173" href="#L173">173</a>                 <em class="jxr_comment">// Adjust location URI</em>
+<a class="jxr_linenumber" name="L174" href="#L174">174</a>                 <strong class="jxr_keyword">final</strong> HttpHost target = clientContext.getTargetHost();
+<a class="jxr_linenumber" name="L175" href="#L175">175</a>                 Asserts.notNull(target, <span class="jxr_string">"Target host"</span>);
+<a class="jxr_linenumber" name="L176" href="#L176">176</a>                 <strong class="jxr_keyword">final</strong> URI requestURI = <strong class="jxr_keyword">new</strong> URI(request.getRequestLine().getUri());
+<a class="jxr_linenumber" name="L177" href="#L177">177</a>                 <strong class="jxr_keyword">final</strong> URI absoluteRequestURI = URIUtils.rewriteURI(requestURI, target,
+<a class="jxr_linenumber" name="L178" href="#L178">178</a>                     config.isNormalizeUri() ? URIUtils.NORMALIZE : URIUtils.NO_FLAGS);
+<a class="jxr_linenumber" name="L179" href="#L179">179</a>                 uri = URIUtils.resolve(absoluteRequestURI, uri);
+<a class="jxr_linenumber" name="L180" href="#L180">180</a>             }
+<a class="jxr_linenumber" name="L181" href="#L181">181</a>         } <strong class="jxr_keyword">catch</strong> (<strong class="jxr_keyword">final</strong> URISyntaxException ex) {
+<a class="jxr_linenumber" name="L182" href="#L182">182</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> ProtocolException(ex.getMessage(), ex);
+<a class="jxr_linenumber" name="L183" href="#L183">183</a>         }
+<a class="jxr_linenumber" name="L184" href="#L184">184</a> 
+<a class="jxr_linenumber" name="L185" href="#L185">185</a>         <a name="RedirectLocations" href="../..<a name="RedirectLocations" href="../../../../../org/apache/http/impl/client/RedirectLocations.html#RedirectLocations">RedirectLocations</a>che/http/impl/client/RedirectLocations.html#RedirectLocations">RedirectLocations</a> redirectLocations = (<a name="RedirectLocations" href="../../../../../org/apache/http/impl/client/RedirectLocations.html#RedirectLocations">RedirectLocations</a>) clientContext.getAttribute(
+<a class="jxr_linenumber" name="L186" href="#L186">186</a>                 HttpClientContext.REDIRECT_LOCATIONS);
+<a class="jxr_linenumber" name="L187" href="#L187">187</a>         <strong class="jxr_keyword">if</strong> (redirectLocations == <strong class="jxr_keyword">null</strong>) {
+<a class="jxr_linenumber" name="L188" href="#L188">188</a>             redirectLocations = <strong class="jxr_keyword">new</strong> <a name="RedirectLocations" href="../../../../../org/apache/http/impl/client/RedirectLocations.html#RedirectLocations">RedirectLocations</a>();
+<a class="jxr_linenumber" name="L189" href="#L189">189</a>             context.setAttribute(HttpClientContext.REDIRECT_LOCATIONS, redirectLocations);
+<a class="jxr_linenumber" name="L190" href="#L190">190</a>         }
+<a class="jxr_linenumber" name="L191" href="#L191">191</a>         <strong class="jxr_keyword">if</strong> (!config.isCircularRedirectsAllowed()) {
+<a class="jxr_linenumber" name="L192" href="#L192">192</a>             <strong class="jxr_keyword">if</strong> (redirectLocations.contains(uri)) {
+<a class="jxr_linenumber" name="L193" href="#L193">193</a>                 <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> <a name="CircularRedirectException" href="../../../../../org/apache/http/client/CircularRedirectException.html#CircularRedirectException">CircularRedirectException</a>(<span class="jxr_string">"Circular redirect to '"</span> + uri + <span class="jxr_string">"'"</span>);
+<a class="jxr_linenumber" name="L194" href="#L194">194</a>             }
+<a class="jxr_linenumber" name="L195" href="#L195">195</a>         }
+<a class="jxr_linenumber" name="L196" href="#L196">196</a>         redirectLocations.add(uri);
+<a class="jxr_linenumber" name="L197" href="#L197">197</a>         <strong class="jxr_keyword">return</strong> uri;
+<a class="jxr_linenumber" name="L198" href="#L198">198</a>     }
+<a class="jxr_linenumber" name="L199" href="#L199">199</a> 
+<a class="jxr_linenumber" name="L200" href="#L200">200</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L201" href="#L201">201</a> <em class="jxr_javadoccomment">     * @since 4.1</em>
+<a class="jxr_linenumber" name="L202" href="#L202">202</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L203" href="#L203">203</a>     <strong class="jxr_keyword">protected</strong> URI createLocationURI(<strong class="jxr_keyword">final</strong> String location) <strong class="jxr_keyword">throws</strong> ProtocolException {
+<a class="jxr_linenumber" name="L204" href="#L204">204</a>         <strong class="jxr_keyword">try</strong> {
+<a class="jxr_linenumber" name="L205" href="#L205">205</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> URI(location);
+<a class="jxr_linenumber" name="L206" href="#L206">206</a>         } <strong class="jxr_keyword">catch</strong> (<strong class="jxr_keyword">final</strong> URISyntaxException ex) {
+<a class="jxr_linenumber" name="L207" href="#L207">207</a>             <strong class="jxr_keyword">throw</strong> <strong class="jxr_keyword">new</strong> ProtocolException(<span class="jxr_string">"Invalid redirect URI: "</span> + location, ex);
+<a class="jxr_linenumber" name="L208" href="#L208">208</a>         }
+<a class="jxr_linenumber" name="L209" href="#L209">209</a>     }
+<a class="jxr_linenumber" name="L210" href="#L210">210</a> 
+<a class="jxr_linenumber" name="L211" href="#L211">211</a>     <em class="jxr_javadoccomment">/**</em>
+<a class="jxr_linenumber" name="L212" href="#L212">212</a> <em class="jxr_javadoccomment">     * @since 4.2</em>
+<a class="jxr_linenumber" name="L213" href="#L213">213</a> <em class="jxr_javadoccomment">     */</em>
+<a class="jxr_linenumber" name="L214" href="#L214">214</a>     <strong class="jxr_keyword">protected</strong> <strong class="jxr_keyword">boolean</strong> isRedirectable(<strong class="jxr_keyword">final</strong> String method) {
+<a class="jxr_linenumber" name="L215" href="#L215">215</a>         <strong class="jxr_keyword">return</strong> Arrays.binarySearch(redirectMethods, method) &gt;= 0;
+<a class="jxr_linenumber" name="L216" href="#L216">216</a>     }
+<a class="jxr_linenumber" name="L217" href="#L217">217</a> 
+<a class="jxr_linenumber" name="L218" href="#L218">218</a>     @Override
+<a class="jxr_linenumber" name="L219" href="#L219">219</a>     <strong class="jxr_keyword">public</strong> <a name="HttpUriRequest" href="../../../../../org/apache/http/client/methods/HttpUriRequest.html#HttpUriRequest">HttpUriRequest</a> getRedirect(
+<a class="jxr_linenumber" name="L220" href="#L220">220</a>             <strong class="jxr_keyword">final</strong> HttpRequest request,
+<a class="jxr_linenumber" name="L221" href="#L221">221</a>             <strong class="jxr_keyword">final</strong> HttpResponse response,
+<a class="jxr_linenumber" name="L222" href="#L222">222</a>             <strong class="jxr_keyword">final</strong> HttpContext context) <strong class="jxr_keyword">throws</strong> ProtocolException {
+<a class="jxr_linenumber" name="L223" href="#L223">223</a>         <strong class="jxr_keyword">final</strong> URI uri = getLocationURI(request, response, context);
+<a class="jxr_linenumber" name="L224" href="#L224">224</a>         <strong class="jxr_keyword">final</strong> String method = request.getRequestLine().getMethod();
+<a class="jxr_linenumber" name="L225" href="#L225">225</a>         <strong class="jxr_keyword">if</strong> (method.equalsIgnoreCase(HttpHead.METHOD_NAME)) {
+<a class="jxr_linenumber" name="L226" href="#L226">226</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> <a name="HttpHead" href="../../../../../org/apache/http/client/methods/HttpHead.html#HttpHead">HttpHead</a>(uri);
+<a class="jxr_linenumber" name="L227" href="#L227">227</a>         } <strong class="jxr_keyword">else</strong> <strong class="jxr_keyword">if</strong> (method.equalsIgnoreCase(HttpGet.METHOD_NAME)) {
+<a class="jxr_linenumber" name="L228" href="#L228">228</a>             <strong class="jxr_keyword">return</strong> <strong class="jxr_keyword">new</strong> <a name="HttpGet" href="../../../../../org/apache/http/client/methods/HttpGet.html#HttpGet">HttpGet</a>(uri);
+<a class="jxr_linenumber" name="L229" href="#L229">229</a>         } <strong class="jxr_keyword">else</strong> {
+<a class="jxr_linenumber" name="L230" href="#L230">230</a>             <strong class="jxr_keyword">final</strong> <strong class="jxr_keyword">int</strong> status = response.getStatusLine().getStatusCode();
+<a class="jxr_linenumber" name="L231" href="#L231">231</a>             <strong class="jxr_keyword">return</strong> (status == HttpStatus.SC_TEMPORARY_REDIRECT || status == SC_PERMANENT_REDIRECT)
+<a class="jxr_linenumber" name="L232" href="#L232">232</a>                             ? RequestBuilder.copy(request).setUri(uri).build()
+<a class="jxr_linenumber" name="L233" href="#L233">233</a>                             : <strong class="jxr_keyword">new</strong> <a name="HttpGet" href="../../../../../org/apache/http/client/methods/HttpGet.html#HttpGet">HttpGet</a>(uri);
+<a class="jxr_linenumber" name="L234" href="#L234">234</a>         }
+<a class="jxr_linenumber" name="L235" href="#L235">235</a>     }
+<a class="jxr_linenumber" name="L236" href="#L236">236</a> 
+<a class="jxr_linenumber" name="L237" href="#L237">237</a> }
 </pre>
 <hr/>
 <div id="footer">Copyright &#169; 1999&#x2013;2020 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</div>

Modified: httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/client/package-frame.html
URL: http://svn.apache.org/viewvc/httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/client/package-frame.html?rev=1874931&r1=1874930&r2=1874931&view=diff
==============================================================================
--- httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/client/package-frame.html (original)
+++ httpcomponents/site/httpcomponents-client-4.5.x/httpclient/xref/org/apache/http/impl/client/package-frame.html Sat Mar  7 09:44:14 2020
@@ -4,7 +4,7 @@
     <!-- generated by Apache Maven JXR (jdk8) -->
     <head>
         <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
-        <title>Apache HttpClient 4.5.11 Reference Package org.apache.http.impl.client</title>
+        <title>Apache HttpClient 4.5.12 Reference Package org.apache.http.impl.client</title>
         <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="style" />
     </head>
     <body>