Changeset 4466 in josm for trunk


Ignore:
Timestamp:
2011-09-26T11:56:15+02:00 (13 years ago)
Author:
simon04
Message:

WMS: case-insensitive testing for existing GetCapabilities

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/preferences/AddWMSLayerPanel.java

    r4436 r4466  
    2828import java.util.Set;
    2929
     30import java.util.regex.Pattern;
    3031import javax.swing.JButton;
    3132import javax.swing.JFrame;
     
    304305        URL getCapabilitiesUrl = null;
    305306        try {
    306             if (!serviceUrlStr.trim().contains("capabilities")) {
     307            if (!Pattern.compile(".*GetCapabilities.*", Pattern.CASE_INSENSITIVE).matcher(serviceUrlStr).matches()) {
    307308                // If the url doesn't already have GetCapabilities, add it in
    308309                getCapabilitiesUrl = new URL(serviceUrlStr + "VERSION=1.1.1&SERVICE=WMS&REQUEST=GetCapabilities");
Note: See TracChangeset for help on using the changeset viewer.