geoserver-shell
geoserver-shell copied to clipboard
Names of layers with spaces don't get escaped.
gs-shell>layer get --name 'getty:sunset buildings'
Command failed java.lang.IllegalArgumentException: Invalid uri 'http://geoserver:8080/geoserver/rest/layers/getty:sunset buildings.xml': escaped absolute path not valid
Invalid uri 'http://geoserver:8080/geoserver/rest/layers/getty:sunset buildings.xml': escaped absolute path not valid
gs-shell>layer get --name 'getty:sunset%20buildings'
sunset buildings
Title: null
Type: VECTOR
This is probably a problem for other values as well, I only just ran into it here.
Could we just use the URLUtil.encode function here? It is replacing all spaces with %20.