[Geoserver-devel] [jira] (GEOS-5480) Problem with uploading a shapefile into geoserver using cURL

Vasco Nunes created BugGEOS-5480
Problem with uploading a shapefile into geoserver using cURL

Issue Type:

BugBug

Affects Versions:

2.2.2

Assignee:

Andrea Aime

Components:

REST

Created:

27/Nov/12 6:29 AM

Description:

I’m having problems with adding layers to Geoserver using REST API.

I tried to put the zip file (localfile.zip) with the
following command

curl -u admin:geoserver -v -XPUT -H ‘Content-type: application/zip’ --data-binary @C:/x/test_data/localfile.zip http://localhost:8081/geoserver/rest/workspaces/test_VN/datastores/maisum/file.shp

But I got :

java.io.IOException: Wrong magic number, expected 9994, got 1347093252

It seems to be as if Geoserver has treated my zip file as a shape file, because a “maisum” directory was created in my " geoserver\data\data" directory, but there is only one file in there : localfile.shp that has the same size of the original zip file.

Environment:

Windows 7

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Vasco Nunes

This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your [JIRA administrators](https://jira.codehaus.org/secure/ContactAdministrators!default.jspa). For more information on JIRA, see: [http://www.atlassian.com/software/jira](http://www.atlassian.com/software/jira)