Ignore:
Timestamp:
2018-01-26T23:21:57+01:00 (23 months ago)
Author:
Don-vip
Message:

fix #15830 - Support (and autodetect) WMS 1.3.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/data/cache/JCSCachedTileLoaderJob.java

    r13230 r13358  
    1717import java.util.concurrent.TimeUnit;
    1818import java.util.regex.Matcher;
    19 import java.util.regex.Pattern;
    2019
    2120import org.apache.commons.jcs.access.behavior.ICacheAccess;
     
    5251    protected static final long ABSOLUTE_EXPIRE_TIME_LIMIT = TimeUnit.DAYS.toMillis(365);
    5352
    54     // Pattern to detect Tomcat error message. Be careful with change of format:
    55     // CHECKSTYLE.OFF: LineLength
    56     // https://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/valves/ErrorReportValve.java?r1=1740707&r2=1779641&pathrev=1779641&diff_format=h
    57     // CHECKSTYLE.ON: LineLength
    58     protected static final Pattern TOMCAT_ERR_MESSAGE = Pattern.compile(
    59         ".*<p><b>[^<]+</b>[^<]+</p><p><b>[^<]+</b> (?:<u>)?([^<]*)(?:</u>)?</p><p><b>[^<]+</b> (?:<u>)?[^<]*(?:</u>)?</p>.*",
    60         Pattern.CASE_INSENSITIVE);
    61 
    6253    /**
    6354     * maximum download threads that will be started
     
    370361                        String data = urlConn.fetchContent();
    371362                        if (!data.isEmpty()) {
    372                             Matcher m = TOMCAT_ERR_MESSAGE.matcher(data);
     363                            Matcher m = HttpClient.getTomcatErrorMatcher(data);
    373364                            if (m.matches()) {
    374365                                attributes.setErrorMessage(m.group(1).replace("'", "''"));
Note: See TracChangeset for help on using the changeset viewer.