Hi,
I think I have found an issue with the Geoserver REST API when it comes to escaping shapefile names containing a whitespace.
Here is an example,
Using the shapefile attached, execute the following
curl -v -u adminassword -XPUT -H "Content-type: text/plain" -d "file:///tmp/tasmania roads.shp" http://localhost:8080/geoserver/rest/workspaces/topp/datastores/test/external.shp
I would expect to see a new layer called "tasmania roads" in a new datastore called "test" in the "topp" workspace.
The workspace and datastore are fine however the layer is called "tasmania%20roads". This is turn breaks the layer preview with Geoserver returning the error, "Could not find layer topp:tasmania roads"
I have had a look at the issues currently lodged in Jira and it appears that there are no open tickets for this issue however the two issues linked below seem to have the same theme of escaping REST URLs.
http://jira.codehaus.org/browse/GEOS-4140 http://jira.codehaus.org/browse/GEOS-3755
Cheers Ben
|