[Geoserver-devel] [jira] (GEOS-6606) Escape whitespace when adding an existing shapefile

Ben Khoo created an issue

GeoServer / BugGEOS-6606

Escape whitespace when adding an existing shapefile

Issue Type:

BugBug

Affects Versions:

2.5

Assignee:

Andrea Aime

Attachments:

test_shp.zip

Components:

REST

Created:

13/Aug/14 3:22 AM

Environment:

– Operating System –
OSX 10.9.4

– JVM Version –
Apple Inc.: 1.6.0_65 (Java HotSpot™ 64-Bit Server VM)

– Geoserver –
Version
2.5-SNAPSHOT

Git Revision
469f323f1f53f64ab3e65ff2746848b49c5426ed

Build Date
03-Aug-2014 16:56

GeoTools Version
11-SNAPSHOT (rev d365f33a505349746b15bef1dfffc99cde2cde68)
GeoWebCache Version
1.5-SNAPSHOT (rev e44af36fc28054134ace0ba3902d0645bddf857e/e44af36fc28054134ace0ba3902d0645bddf857e)

Labels:

rest url escape

Priority:

MajorMajor

Reporter:

Ben Khoo

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

Add Comment

Add Comment

This message was sent by Atlassian JIRA (v6.1.6#6162-sha1:7af547c)

Atlassian logo