[Git][java-team/httpcomponents-client][upstream] New upstream version 4.5.10
Emmanuel Bourg
gitlab at salsa.debian.org
Sat Oct 5 09:28:08 BST 2019
Emmanuel Bourg pushed to branch upstream at Debian Java Maintainers / httpcomponents-client
Commits:
158314aa by Emmanuel Bourg at 2019-10-05T08:08:27Z
New upstream version 4.5.10
- - - - -
20 changed files:
- RELEASE_NOTES.txt
- fluent-hc/pom.xml
- httpclient-cache/pom.xml
- httpclient-osgi/pom.xml
- httpclient-win/pom.xml
- httpclient/pom.xml
- httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java
- httpclient/src/main/java/org/apache/http/client/methods/AbstractExecutionAwareRequest.java
- httpclient/src/main/java/org/apache/http/client/utils/URIUtils.java
- httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcher.java
- httpclient/src/main/java/org/apache/http/impl/client/DefaultBackoffStrategy.java
- httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java
- httpclient/src/main/java/org/apache/http/impl/client/LaxRedirectStrategy.java
- httpclient/src/main/resources/mozilla/public-suffix-list.txt
- httpclient/src/test/java/org/apache/http/client/utils/TestURIUtils.java
- httpclient/src/test/java/org/apache/http/conn/ssl/TestDefaultHostnameVerifier.java
- httpclient/src/test/java/org/apache/http/conn/util/TestPublicSuffixMatcher.java
- httpclient/src/test/java/org/apache/http/impl/client/integration/TestIdleConnectionEviction.java
- httpmime/pom.xml
- pom.xml
Changes:
=====================================
RELEASE_NOTES.txt
=====================================
@@ -1,3 +1,30 @@
+Release 4.5.10
+-------------------
+
+This is a maintenance release that fixes a number defects discovered since 4.5.9
+and upgrades HttpCore dependency to version 4.4.12.
+
+
+Changelog:
+-------------------
+
+* Refactor DefaultRedirectStrategy for subclassing.
+ Contributed by Gary Gregory <ggregory at apache.org>
+
+* Improved handling of request cancellation.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
+* Fixed concurrent use of threading unsafe HttpUriRequest messages.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
+* HTTPCLIENT-1997: Return the last domain segment instead of normalized domain name
+ from PublicSuffixMatcher#getDomainRoot in case there is no match.
+ Contributed by jeromedemangel <jeromedemangel at gmail.com>
+
+* Preserve original encoding of the URI path component if the URI is valid.
+ Contributed by Oleg Kalnichevski <olegk at apache.org>
+
+
Release 4.5.9
-------------------
=====================================
fluent-hc/pom.xml
=====================================
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-client</artifactId>
- <version>4.5.9</version>
+ <version>4.5.10</version>
</parent>
<artifactId>fluent-hc</artifactId>
<name>Apache HttpClient Fluent API</name>
=====================================
httpclient-cache/pom.xml
=====================================
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-client</artifactId>
- <version>4.5.9</version>
+ <version>4.5.10</version>
</parent>
<artifactId>httpclient-cache</artifactId>
<name>Apache HttpClient Cache</name>
=====================================
httpclient-osgi/pom.xml
=====================================
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-client</artifactId>
- <version>4.5.9</version>
+ <version>4.5.10</version>
</parent>
<artifactId>httpclient-osgi</artifactId>
<name>Apache HttpClient OSGi bundle</name>
=====================================
httpclient-win/pom.xml
=====================================
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-client</artifactId>
- <version>4.5.9</version>
+ <version>4.5.10</version>
</parent>
<artifactId>httpclient-win</artifactId>
<name>Apache HttpClient Windows features</name>
=====================================
httpclient/pom.xml
=====================================
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-client</artifactId>
- <version>4.5.9</version>
+ <version>4.5.10</version>
</parent>
<artifactId>httpclient</artifactId>
<name>Apache HttpClient</name>
=====================================
httpclient/src/main/java/org/apache/http/client/config/RequestConfig.java
=====================================
@@ -264,11 +264,10 @@ public class RequestConfig implements Cloneable {
/**
* Returns the timeout in milliseconds used when requesting a connection
- * from the connection manager. A timeout value of zero is interpreted
- * as an infinite timeout.
+ * from the connection manager.
* <p>
* A timeout value of zero is interpreted as an infinite timeout.
- * A negative value is interpreted as undefined (system default).
+ * A negative value is interpreted as undefined (system default if applicable).
* </p>
* <p>
* Default: {@code -1}
@@ -280,10 +279,9 @@ public class RequestConfig implements Cloneable {
/**
* Determines the timeout in milliseconds until a connection is established.
- * A timeout value of zero is interpreted as an infinite timeout.
* <p>
* A timeout value of zero is interpreted as an infinite timeout.
- * A negative value is interpreted as undefined (system default).
+ * A negative value is interpreted as undefined (system default if applicable).
* </p>
* <p>
* Default: {@code -1}
@@ -295,11 +293,11 @@ public class RequestConfig implements Cloneable {
/**
* Defines the socket timeout ({@code SO_TIMEOUT}) in milliseconds,
- * which is the timeout for waiting for data or, put differently,
+ * which is the timeout for waiting for data or, put differently,
* a maximum period inactivity between two consecutive data packets).
* <p>
* A timeout value of zero is interpreted as an infinite timeout.
- * A negative value is interpreted as undefined (system default).
+ * A negative value is interpreted as undefined (system default if applicable).
* </p>
* <p>
* Default: {@code -1}
=====================================
httpclient/src/main/java/org/apache/http/client/methods/AbstractExecutionAwareRequest.java
=====================================
@@ -27,8 +27,7 @@
package org.apache.http.client.methods;
import java.io.IOException;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicReference;
+import java.util.concurrent.atomic.AtomicMarkableReference;
import org.apache.http.HttpRequest;
import org.apache.http.client.utils.CloneUtils;
@@ -41,13 +40,11 @@ import org.apache.http.message.AbstractHttpMessage;
public abstract class AbstractExecutionAwareRequest extends AbstractHttpMessage implements
HttpExecutionAware, AbortableHttpRequest, Cloneable, HttpRequest {
- private final AtomicBoolean aborted;
- private final AtomicReference<Cancellable> cancellableRef;
+ private final AtomicMarkableReference<Cancellable> cancellableRef;
protected AbstractExecutionAwareRequest() {
super();
- this.aborted = new AtomicBoolean(false);
- this.cancellableRef = new AtomicReference<Cancellable>(null);
+ this.cancellableRef = new AtomicMarkableReference<Cancellable>(null, false);
}
/**
@@ -90,17 +87,19 @@ public abstract class AbstractExecutionAwareRequest extends AbstractHttpMessage
@Override
public void abort() {
- if (this.aborted.compareAndSet(false, true)) {
- final Cancellable cancellable = this.cancellableRef.getAndSet(null);
- if (cancellable != null) {
- cancellable.cancel();
+ while (!cancellableRef.isMarked()) {
+ final Cancellable actualCancellable = cancellableRef.getReference();
+ if (cancellableRef.compareAndSet(actualCancellable, actualCancellable, false, true)) {
+ if (actualCancellable != null) {
+ actualCancellable.cancel();
+ }
}
}
}
@Override
public boolean isAborted() {
- return this.aborted.get();
+ return this.cancellableRef.isMarked();
}
/**
@@ -108,8 +107,9 @@ public abstract class AbstractExecutionAwareRequest extends AbstractHttpMessage
*/
@Override
public void setCancellable(final Cancellable cancellable) {
- if (!this.aborted.get()) {
- this.cancellableRef.set(cancellable);
+ final Cancellable actualCancellable = cancellableRef.getReference();
+ if (!cancellableRef.compareAndSet(actualCancellable, cancellable, false, false)) {
+ cancellable.cancel();
}
}
@@ -123,9 +123,12 @@ public abstract class AbstractExecutionAwareRequest extends AbstractHttpMessage
/**
* @since 4.2
+ *
+ * @deprecated Do not use.
*/
+ @Deprecated
public void completed() {
- this.cancellableRef.set(null);
+ this.cancellableRef.set(null, false);
}
/**
@@ -134,11 +137,16 @@ public abstract class AbstractExecutionAwareRequest extends AbstractHttpMessage
* @since 4.2
*/
public void reset() {
- final Cancellable cancellable = this.cancellableRef.getAndSet(null);
- if (cancellable != null) {
- cancellable.cancel();
+ for (;;) {
+ final boolean marked = cancellableRef.isMarked();
+ final Cancellable actualCancellable = cancellableRef.getReference();
+ if (actualCancellable != null) {
+ actualCancellable.cancel();
+ }
+ if (cancellableRef.compareAndSet(actualCancellable, null, marked, false)) {
+ break;
+ }
}
- this.aborted.set(false);
}
}
=====================================
httpclient/src/main/java/org/apache/http/client/utils/URIUtils.java
=====================================
@@ -217,14 +217,17 @@ public class URIUtils {
uribuilder.setFragment(null);
}
if (flags.contains(UriFlag.NORMALIZE)) {
- final List<String> pathSegments = new ArrayList<String>(uribuilder.getPathSegments());
+ final List<String> originalPathSegments = uribuilder.getPathSegments();
+ final List<String> pathSegments = new ArrayList<String>(originalPathSegments);
for (final Iterator<String> it = pathSegments.iterator(); it.hasNext(); ) {
final String pathSegment = it.next();
if (pathSegment.isEmpty() && it.hasNext()) {
it.remove();
}
}
- uribuilder.setPathSegments(pathSegments);
+ if (pathSegments.size() != originalPathSegments.size()) {
+ uribuilder.setPathSegments(pathSegments);
+ }
}
if (uribuilder.isPathEmpty()) {
uribuilder.setPathSegments("");
=====================================
httpclient/src/main/java/org/apache/http/conn/util/PublicSuffixMatcher.java
=====================================
@@ -166,7 +166,7 @@ public final class PublicSuffixMatcher {
result = segment;
segment = nextSegment;
}
- return normalized;
+ return result;
}
/**
=====================================
httpclient/src/main/java/org/apache/http/impl/client/DefaultBackoffStrategy.java
=====================================
@@ -44,13 +44,12 @@ public class DefaultBackoffStrategy implements ConnectionBackoffStrategy {
@Override
public boolean shouldBackoff(final Throwable t) {
- return (t instanceof SocketTimeoutException
- || t instanceof ConnectException);
+ return t instanceof SocketTimeoutException || t instanceof ConnectException;
}
@Override
public boolean shouldBackoff(final HttpResponse resp) {
- return (resp.getStatusLine().getStatusCode() == HttpStatus.SC_SERVICE_UNAVAILABLE);
+ return resp.getStatusLine().getStatusCode() == HttpStatus.SC_SERVICE_UNAVAILABLE;
}
}
=====================================
httpclient/src/main/java/org/apache/http/impl/client/DefaultRedirectStrategy.java
=====================================
@@ -29,6 +29,7 @@ package org.apache.http.impl.client;
import java.net.URI;
import java.net.URISyntaxException;
+import java.util.Arrays;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -81,16 +82,26 @@ public class DefaultRedirectStrategy implements RedirectStrategy {
public static final DefaultRedirectStrategy INSTANCE = new DefaultRedirectStrategy();
- /**
- * Redirectable methods.
- */
- private static final String[] REDIRECT_METHODS = new String[] {
- HttpGet.METHOD_NAME,
- HttpHead.METHOD_NAME
- };
+ private final String[] redirectMethods;
public DefaultRedirectStrategy() {
+ this(new String[] {
+ HttpGet.METHOD_NAME,
+ HttpHead.METHOD_NAME
+ });
+ }
+
+ /**
+ * Constructs a new instance to redirect the given HTTP methods.
+ *
+ * @param redirectMethods The methods to redirect.
+ * @since 4.5.10
+ */
+ public DefaultRedirectStrategy(final String[] redirectMethods) {
super();
+ final String[] tmp = redirectMethods.clone();
+ Arrays.sort(tmp);
+ this.redirectMethods = tmp;
}
@Override
@@ -198,12 +209,7 @@ public class DefaultRedirectStrategy implements RedirectStrategy {
* @since 4.2
*/
protected boolean isRedirectable(final String method) {
- for (final String m: REDIRECT_METHODS) {
- if (m.equalsIgnoreCase(method)) {
- return true;
- }
- }
- return false;
+ return Arrays.binarySearch(redirectMethods, method) >= 0;
}
@Override
=====================================
httpclient/src/main/java/org/apache/http/impl/client/LaxRedirectStrategy.java
=====================================
@@ -47,24 +47,13 @@ public class LaxRedirectStrategy extends DefaultRedirectStrategy {
public static final LaxRedirectStrategy INSTANCE = new LaxRedirectStrategy();
- /**
- * Redirectable methods.
- */
- private static final String[] REDIRECT_METHODS = new String[] {
- HttpGet.METHOD_NAME,
- HttpPost.METHOD_NAME,
- HttpHead.METHOD_NAME,
- HttpDelete.METHOD_NAME
- };
-
- @Override
- protected boolean isRedirectable(final String method) {
- for (final String m: REDIRECT_METHODS) {
- if (m.equalsIgnoreCase(method)) {
- return true;
- }
- }
- return false;
+ public LaxRedirectStrategy() {
+ super(new String[] {
+ HttpGet.METHOD_NAME,
+ HttpPost.METHOD_NAME,
+ HttpHead.METHOD_NAME,
+ HttpDelete.METHOD_NAME
+ });
}
}
=====================================
httpclient/src/main/resources/mozilla/public-suffix-list.txt
=====================================
@@ -240,6 +240,8 @@ vic.au
wa.au
// 3LDs
act.edu.au
+catholic.edu.au
+eq.edu.au
nsw.edu.au
nt.edu.au
qld.edu.au
@@ -255,6 +257,9 @@ sa.gov.au
tas.gov.au
vic.gov.au
wa.gov.au
+// 4LDs
+education.tas.edu.au
+schools.nsw.edu.au
// aw : https://en.wikipedia.org/wiki/.aw
aw
@@ -4334,8 +4339,6 @@ niepce.museum
norfolk.museum
north.museum
nrw.museum
-nuernberg.museum
-nuremberg.museum
nyc.museum
nyny.museum
oceanographic.museum
@@ -6044,6 +6047,16 @@ org.so
// sr : https://en.wikipedia.org/wiki/.sr
sr
+// ss : https://registry.nic.ss/
+// Submitted by registry <technical at nic.ss>
+ss
+biz.ss
+com.ss
+edu.ss
+gov.ss
+net.ss
+org.ss
+
// st : http://www.nic.st/html/policyrules/
st
co.st
@@ -6786,6 +6799,9 @@ yt
// xn--e1a4c ("eu", Cyrillic) : EU
ею
+// xn--mgbah1a3hjkrd ("Mauritania", Arabic) : MR
+موريتانيا
+
// xn--node ("ge", Georgian Mkhedruli) : GE
გე
@@ -7012,7 +7028,7 @@ xxx
// ye : http://www.y.net.ye/services/domain_name.htm
*.ye
-// za : http://www.zadna.org.za/content/page/domain-information
+// za : https://www.zadna.org.za/content/page/domain-information/
ac.za
agric.za
alt.za
@@ -7024,6 +7040,7 @@ law.za
mil.za
net.za
ngo.za
+nic.za
nis.za
nom.za
org.za
@@ -7058,7 +7075,7 @@ org.zw
// newGTLDs
-// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2019-06-14T10:00:50-04:00
+// List of new gTLDs imported from https://www.icann.org/resources/registries/gtlds/v2/gtlds.json on 2019-09-26T16:43:02Z
// This list is auto-generated, don't edit it manually.
// aaa : 2015-02-26 American Automobile Association, Inc.
aaa
@@ -7423,9 +7440,6 @@ bms
// bmw : 2014-01-09 Bayerische Motoren Werke Aktiengesellschaft
bmw
-// bnl : 2014-07-24 Banca Nazionale del Lavoro
-bnl
-
// bnpparibas : 2014-05-29 BNP Paribas
bnpparibas
@@ -7738,7 +7752,7 @@ community
// company : 2013-11-07 Binky Moon, LLC
company
-// compare : 2015-10-08 iSelect Ltd
+// compare : 2015-10-08 Registry Services, LLC
compare
// computer : 2013-10-24 Binky Moon, LLC
@@ -7966,9 +7980,6 @@ duck
// dunlop : 2015-07-02 The Goodyear Tire & Rubber Company
dunlop
-// duns : 2015-08-06 The Dun & Bradstreet Corporation
-duns
-
// dupont : 2015-06-25 E. I. du Pont de Nemours and Company
dupont
@@ -8083,7 +8094,7 @@ family
// fan : 2014-03-06 Dog Beach, LLC
fan
-// fans : 2014-11-07 Fans TLD Limited
+// fans : 2014-11-07 ZDNS International Limited
fans
// farm : 2013-11-07 Binky Moon, LLC
@@ -8479,9 +8490,6 @@ homesense
// honda : 2014-12-18 Honda Motor Co., Ltd.
honda
-// honeywell : 2015-07-23 Honeywell GTLD LLC
-honeywell
-
// horse : 2013-11-21 Minds + Machines Group Limited
horse
@@ -8599,9 +8607,6 @@ ipiranga
// irish : 2014-08-07 Binky Moon, LLC
irish
-// iselect : 2015-02-11 iSelect Ltd
-iselect
-
// ismaili : 2015-08-06 Fondation Aga Khan (Aga Khan Foundation)
ismaili
@@ -8863,6 +8868,9 @@ lixil
// llc : 2017-12-14 Afilias Limited
llc
+// llp : 2019-08-26 Dot Registry LLC
+llp
+
// loan : 2014-11-20 dot Loan Limited
loan
@@ -9031,9 +9039,6 @@ mma
// mobile : 2016-06-02 Dish DBS Corporation
mobile
-// mobily : 2014-12-18 GreenTech Consultancy Company W.L.L.
-mobily
-
// moda : 2013-11-07 Dog Beach, LLC
moda
@@ -9508,7 +9513,7 @@ reit
// reliance : 2015-04-02 Reliance Industries Limited
reliance
-// ren : 2013-12-12 Beijing Qianxiang Wangjing Technology Development Co., Ltd.
+// ren : 2013-12-12 ZDNS International Limited
ren
// rent : 2014-12-04 XYZ.COM LLC
@@ -9703,7 +9708,7 @@ security
// seek : 2014-12-04 Seek Limited
seek
-// select : 2015-10-08 iSelect Ltd
+// select : 2015-10-08 Registry Services, LLC
select
// sener : 2014-10-24 Sener Ingeniería y Sistemas, S.A.
@@ -9835,6 +9840,9 @@ sony
// soy : 2014-01-23 Charleston Road Registry Inc.
soy
+// spa : 2019-09-19 Asia Spa and Wellness Promotion Council Limited
+spa
+
// space : 2014-04-03 DotSpace Inc.
space
@@ -9862,9 +9870,6 @@ staples
// star : 2015-01-08 Star India Private Limited
star
-// starhub : 2015-02-05 StarHub Ltd
-starhub
-
// statebank : 2015-03-12 STATE BANK OF INDIA
statebank
@@ -10126,7 +10131,7 @@ unicom
// university : 2014-03-06 Binky Moon, LLC
university
-// uno : 2013-09-11 Dot Latin LLC
+// uno : 2013-09-11 DotSite Inc.
uno
// uol : 2014-05-01 UBN INTERNET LTDA.
@@ -10528,9 +10533,6 @@ xin
// xn--mgbab2bd : 2013-10-31 CORE Association
بازار
-// xn--mgbb9fbpob : 2014-12-18 GreenTech Consultancy Company W.L.L.
-موبايلي
-
// xn--mgbca7dzdo : 2015-07-30 Abu Dhabi Systems and Information Centre
ابوظبي
@@ -10702,6 +10704,10 @@ barsy.ca
*.compute.estate
*.alces.network
+// Altervista: https://www.altervista.org
+// Submitted by Carlo Cannas <tech_staff at altervista.it>
+altervista.org
+
// alwaysdata : https://www.alwaysdata.com
// Submitted by Cyril <admin at alwaysdata.com>
alwaysdata.net
@@ -10815,6 +10821,12 @@ apigee.io
// Submitted by Thomas Orozco <thomas at aptible.com>
on-aptible.com
+// ASEINet : https://www.aseinet.com/
+// Submitted by Asei SEKIGUCHI <mail at aseinet.com>
+user.aseinet.ne.jp
+gv.vc
+d.gv.vc
+
// Asociación Amigos de la Informática "Euskalamiga" : http://encounter.eus/
// Submitted by Hector Martin <marcan at euskalencounter.org>
user.party.eus
@@ -11778,6 +11790,10 @@ gitlab.io
// Submitted by Mads Hartmann <mads at glitch.com>
glitch.me
+// GMO Pepabo, Inc. : https://pepabo.com/
+// Submitted by dojineko <admin at pepabo.com>
+lolipop.io
+
// GOV.UK Platform as a Service : https://www.cloud.service.gov.uk/
// Submitted by Tom Whitwell <tom.whitwell at digital.cabinet-office.gov.uk>
cloudapps.digital
@@ -11930,11 +11946,13 @@ ravendb.run
bpl.biz
orx.biz
ng.city
-ng.ink
biz.gl
+ng.ink
col.ng
+firm.ng
gen.ng
ltd.ng
+ng.school
sch.so
// Häkkinen.fi
@@ -12070,6 +12088,10 @@ leadpages.co
lpages.co
lpusercontent.com
+// Lelux.fi : https://lelux.fi/
+// Submitted by Lelux Admin <publisuffix at lelux.site>
+lelux.site
+
// Lifetime Hosting : https://Lifetime.Hosting/
// Submitted by Mike Fillator <support at lifetime.hosting>
co.business
@@ -12401,12 +12423,14 @@ nom.al
nym.by
nym.bz
nom.cl
+nym.ec
nom.gd
nom.ge
nom.gl
nym.gr
nom.gt
nym.gy
+nym.hk
nom.hn
nym.ie
nom.im
@@ -12658,11 +12682,6 @@ my-firewall.org
myfirewall.org
spdns.org
-// SensioLabs, SAS : https://sensiolabs.com/
-// Submitted by Fabien Potencier <fabien.potencier at sensiolabs.com>
-*.s5y.io
-*.sensiosite.cloud
-
// Service Online LLC : http://drs.ua/
// Submitted by Serhii Bulakh <support at drs.ua>
biz.ua
@@ -12752,6 +12771,11 @@ temp-dns.com
applicationcloud.io
scapp.io
+// Symfony, SAS : https://symfony.com/
+// Submitted by Fabien Potencier <fabien at symfony.com>
+*.s5y.io
+*.sensiosite.cloud
+
// Syncloud : https://syncloud.org
// Submitted by Boris Rybalkin <syncloud at syncloud.it>
syncloud.it
@@ -12772,6 +12796,7 @@ i234.me
myds.me
synology.me
vpnplus.to
+direct.quickconnect.to
// TAIFUN Software AG : http://taifun-software.de
// Submitted by Bjoern Henke <dev-server at taifun-software.de>
@@ -12905,6 +12930,10 @@ voorloper.cloud
// Submitted by Masayuki Note <masa at blade.wafflecell.com>
wafflecell.com
+// WebHare bv: https://www.webhare.com/
+// Submitted by Arnold Hendriks <info at webhare.com>
+*.webhare.dev
+
// WeDeploy by Liferay, Inc. : https://www.wedeploy.com
// Submitted by Henrique Vicente <security at wedeploy.com>
wedeploy.io
@@ -12935,6 +12964,12 @@ cistron.nl
demon.nl
xs4all.space
+// Yandex.Cloud LLC: https://cloud.yandex.com
+// Submitted by Alexander Lodin <security+psl at yandex-team.ru>
+yandexcloud.net
+storage.yandexcloud.net
+website.yandexcloud.net
+
// YesCourse Pty Ltd : https://yescourse.com
// Submitted by Atul Bhouraskar <atul at yescourse.com>
official.academy
@@ -12978,8 +13013,4 @@ virtualserver.io
site.builder.nu
enterprisecloud.nu
-// Zone.id : https://zone.id/
-// Submitted by Su Hendro <admin at zone.id>
-zone.id
-
// ===END PRIVATE DOMAINS===
=====================================
httpclient/src/test/java/org/apache/http/client/utils/TestURIUtils.java
=====================================
@@ -82,6 +82,8 @@ public class TestURIUtils {
Assert.assertEquals("http://thishost/Fragment_identifier%23Examples",
URIUtils.rewriteURI(
URI.create("http://thishost/Fragment_identifier%23Examples")).toString());
+ Assert.assertEquals("http://thathost/foo%3Abar", URIUtils.rewriteURI(
+ URI.create("http://thishost/foo%3Abar"), target).toString());
}
@Test
=====================================
httpclient/src/test/java/org/apache/http/conn/ssl/TestDefaultHostnameVerifier.java
=====================================
@@ -275,6 +275,18 @@ public class TestDefaultHostnameVerifier {
Assert.assertTrue(DefaultHostnameVerifier.matchIdentityStrict("mail.a.b.c.com", "m*.a.b.c.com"));
}
+ @Test
+ public void testHTTPCLIENT_1997() {
+ Assert.assertTrue(DefaultHostnameVerifier.matchIdentity(
+ "service.apps.dev.b.cloud.a", "*.apps.dev.b.cloud.a"));
+ Assert.assertTrue(DefaultHostnameVerifier.matchIdentityStrict(
+ "service.apps.dev.b.cloud.a", "*.apps.dev.b.cloud.a"));
+ Assert.assertTrue(DefaultHostnameVerifier.matchIdentity(
+ "service.apps.dev.b.cloud.a", "*.apps.dev.b.cloud.a", publicSuffixMatcher));
+ Assert.assertTrue(DefaultHostnameVerifier.matchIdentityStrict(
+ "service.apps.dev.b.cloud.a", "*.apps.dev.b.cloud.a", publicSuffixMatcher));
+ }
+
@Test // Check compressed IPv6 hostname matching
public void testHTTPCLIENT_1316() throws Exception{
final String host1 = "2001:0db8:aaaa:bbbb:cccc:0:0:0001";
=====================================
httpclient/src/test/java/org/apache/http/conn/util/TestPublicSuffixMatcher.java
=====================================
@@ -69,7 +69,9 @@ public class TestPublicSuffixMatcher {
Assert.assertEquals("blah.blah.tokyo.jp", matcher.getDomainRoot("blah.blah.tokyo.jp"));
Assert.assertEquals("blah.ac.jp", matcher.getDomainRoot("blah.blah.ac.jp"));
Assert.assertEquals("garbage", matcher.getDomainRoot("garbage"));
- Assert.assertEquals("garbage.garbage", matcher.getDomainRoot("garbage.garbage"));
+ Assert.assertEquals("garbage", matcher.getDomainRoot("garbage.garbage"));
+ Assert.assertEquals("garbage", matcher.getDomainRoot("*.garbage.garbage"));
+ Assert.assertEquals("garbage", matcher.getDomainRoot("*.garbage.garbage.garbage"));
}
@Test
=====================================
httpclient/src/test/java/org/apache/http/impl/client/integration/TestIdleConnectionEviction.java
=====================================
@@ -27,14 +27,14 @@
package org.apache.http.impl.client.integration;
+import java.net.URI;
import java.util.concurrent.TimeUnit;
import org.apache.http.HttpHost;
-import org.apache.http.HttpResponse;
import org.apache.http.client.ClientProtocolException;
-import org.apache.http.client.HttpClient;
+import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
-import org.apache.http.client.methods.HttpUriRequest;
+import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.IdleConnectionEvictor;
import org.apache.http.localserver.LocalServerTestBase;
import org.apache.http.util.EntityUtils;
@@ -53,10 +53,10 @@ public class TestIdleConnectionEviction extends LocalServerTestBase {
this.connManager, 50, TimeUnit.MILLISECONDS);
idleConnectionMonitor.start();
- final HttpGet httpget = new HttpGet("/random/1024");
+ final URI requestUri = new URI("/random/1024");
final WorkerThread[] workers = new WorkerThread[5];
for (int i = 0; i < workers.length; i++) {
- workers[i] = new WorkerThread(httpclient, target, httpget, 200);
+ workers[i] = new WorkerThread(httpclient, target, requestUri, 200);
}
for (final WorkerThread worker : workers) {
worker.start();
@@ -73,22 +73,22 @@ public class TestIdleConnectionEviction extends LocalServerTestBase {
static class WorkerThread extends Thread {
- private final HttpClient httpclient;
+ private final CloseableHttpClient httpclient;
private final HttpHost target;
- private final HttpUriRequest request;
+ private final URI requestUri;
private final int count;
private volatile Exception ex;
public WorkerThread(
- final HttpClient httpclient,
+ final CloseableHttpClient httpclient,
final HttpHost target,
- final HttpUriRequest request,
+ final URI requestUri,
final int count) {
super();
this.httpclient = httpclient;
this.target = target;
- this.request = request;
+ this.requestUri = requestUri;
this.count = count;
}
@@ -96,14 +96,18 @@ public class TestIdleConnectionEviction extends LocalServerTestBase {
public void run() {
try {
for (int i = 0; i < this.count; i++) {
- final HttpResponse response = this.httpclient.execute(this.target, this.request);
- final int status = response.getStatusLine().getStatusCode();
- if (status != 200) {
- this.request.abort();
- throw new ClientProtocolException("Unexpected status code: " + status);
+ final HttpGet httpget = new HttpGet(this.requestUri);
+ final CloseableHttpResponse response = this.httpclient.execute(this.target, httpget);
+ try {
+ final int status = response.getStatusLine().getStatusCode();
+ if (status != 200) {
+ throw new ClientProtocolException("Unexpected status code: " + status);
+ }
+ EntityUtils.consume(response.getEntity());
+ Thread.sleep(10);
+ } finally {
+ response.close();
}
- EntityUtils.consume(response.getEntity());
- Thread.sleep(10);
}
} catch (final Exception ex) {
this.ex = ex;
=====================================
httpmime/pom.xml
=====================================
@@ -28,7 +28,7 @@
<parent>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcomponents-client</artifactId>
- <version>4.5.9</version>
+ <version>4.5.10</version>
</parent>
<artifactId>httpmime</artifactId>
<name>Apache HttpClient Mime</name>
=====================================
pom.xml
=====================================
@@ -32,7 +32,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>httpcomponents-client</artifactId>
<name>Apache HttpComponents Client</name>
- <version>4.5.9</version>
+ <version>4.5.10</version>
<description>Apache HttpComponents Client is a library of components for building client side HTTP services</description>
<url>http://hc.apache.org/httpcomponents-client-ga/</url>
<inceptionYear>1999</inceptionYear>
@@ -60,13 +60,13 @@
<connection>scm:git:https://git-wip-us.apache.org/repos/asf/httpcomponents-client.git</connection>
<developerConnection>scm:git:https://git-wip-us.apache.org/repos/asf/httpcomponents-client.git</developerConnection>
<url>https://github.com/apache/httpcomponents-client/tree/${project.scm.tag}</url>
- <tag>4.5.9</tag>
+ <tag>4.5.10</tag>
</scm>
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
- <httpcore.version>4.4.11</httpcore.version>
+ <httpcore.version>4.4.12</httpcore.version>
<commons-logging.version>1.2</commons-logging.version>
<commons-codec.version>1.11</commons-codec.version>
<ehcache.version>2.6.11</ehcache.version>
View it on GitLab: https://salsa.debian.org/java-team/httpcomponents-client/commit/158314aa35f1823166bf74702ec431233c177912
--
View it on GitLab: https://salsa.debian.org/java-team/httpcomponents-client/commit/158314aa35f1823166bf74702ec431233c177912
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20191005/f71186a7/attachment.html>
More information about the pkg-java-commits
mailing list