Index: trunk/src/org/openstreetmap/josm/gui/preferences/AddWMSLayerPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/preferences/AddWMSLayerPanel.java	(revision 4465)
+++ trunk/src/org/openstreetmap/josm/gui/preferences/AddWMSLayerPanel.java	(revision 4466)
@@ -28,4 +28,5 @@
 import java.util.Set;
 
+import java.util.regex.Pattern;
 import javax.swing.JButton;
 import javax.swing.JFrame;
@@ -304,5 +305,5 @@
         URL getCapabilitiesUrl = null;
         try {
-            if (!serviceUrlStr.trim().contains("capabilities")) {
+            if (!Pattern.compile(".*GetCapabilities.*", Pattern.CASE_INSENSITIVE).matcher(serviceUrlStr).matches()) {
                 // If the url doesn't already have GetCapabilities, add it in
                 getCapabilitiesUrl = new URL(serviceUrlStr + "VERSION=1.1.1&SERVICE=WMS&REQUEST=GetCapabilities");
