Select to view content in your preferred language

ArcGis Runtime SDK for Java 10.2.4 comes with an old version of HttpClient. How can I use a newer version?

2399
3
09-09-2015 04:14 AM
TorstenKeim
Deactivated User

ArcGis Runtime SDK for Java 10.2.4 comes with an old version of HttpClient. How can I use a newer version?

0 Kudos
3 Replies
EricBader
Honored Contributor

Don't think it will be quite that easy to swap it out with the newer version, unfortunately. The API has only been tested and certified with the HTTPClient that was shipped with it. We have already updated the HttpClient libs with Quartz Beta 1, however.

0 Kudos
TorstenKeim
Deactivated User

I think I found a soluton:

I patched httpclient-4.4.1 by adding this to org.apache.http.impl.cookie.BrowserCompatSpec:

 

protected static final String[] DATE_PATTERNS = new String[] { DateUtils.PATTERN_RFC1123, DateUtils.PATTERN_RFC1036,

DateUtils.PATTERN_ASCTIME, "EEE, dd-MMM-yyyy HH:mm:ss z", "EEE, dd-MMM-yyyy HH-mm-ss z",

"EEE, dd MMM yy HH:mm:ss z", "EEE dd-MMM-yyyy HH:mm:ss z", "EEE dd MMM yyyy HH:mm:ss z",

"EEE dd-MMM-yyyy HH-mm-ss z", "EEE dd-MMM-yy HH:mm:ss z", "EEE dd MMM yy HH:mm:ss z", "EEE,dd-MMM-yy HH:mm:ss z",

"EEE,dd-MMM-yyyy HH:mm:ss z", "EEE, dd-MM-yyyy HH:mm:ss z", };

... and I removed the old httpclient which comes with ArcGis Runtime SDK for Java 10.2.4

EricBader
Honored Contributor

Cool!

However, be aware that this approach (replacing the httpclient) is not an officially-supported scenario.

So be careful!

0 Kudos