geoserver-shell icon indicating copy to clipboard operation
geoserver-shell copied to clipboard

Names of layers with spaces don't get escaped.

Open eigood opened this issue 6 years ago • 2 comments

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

eigood avatar May 08 '18 15:05 eigood

This is probably a problem for other values as well, I only just ran into it here.

eigood avatar May 08 '18 15:05 eigood

Could we just use the URLUtil.encode function here? It is replacing all spaces with %20.

jericks avatar May 09 '18 04:05 jericks