Revision 24768

View differences:

trunk/libraries/libRemoteServices/src/org/gvsig/remoteClient/wms/WMSProtocolHandler.java
93 93

  
94 94
    public void setHost(String _host)
95 95
    {
96
		try {
97
			// Validates the URL if doesn't produces an exception
98
			new URL(_host);
99

  
100
			int index = _host.indexOf("?");
101
			
102
			if (index == -1)
103
				host = _host;
104
			else
105
				host = _host.substring(0, index);
106
		}
107
		catch (MalformedURLException m) {
108
			// Bad URL -> hold it
109
			host = _host;
110
		}
96
		host = _host;
111 97
    }
112 98

  
113 99
    public String getPort()

Also available in: Unified diff