[Geoserver-devel] [jira] (GEOS-5651) Uploading smaller freemarker template file leads to invalid file on server

Robin Pradel created BugGEOS-5651
Uploading smaller freemarker template file leads to invalid file on server

Issue Type:

BugBug

Affects Versions:

2.2.4

Assignee:

Andrea Aime

Components:

REST

Created:

12/Feb/13 4:11 AM

Description:

The server has an template file data/workspaces/content.ftl with a size of e.g. 5 KB. The new template file is smaller, e.g. 4 KB, and should update the server version by uploading over REST-API. After a PUT request the resulting file is still 5 KB large but the first 4 KB of the file consists of the uploaded content. The remaining content is the rest of the old template file.
For me it looks like an override operation by bytes without treating the remaining old bytes on end of incoming file.
My current workaround is a prior deletion of the entire template file followed by the update request described above.

Environment:

Windows 7 64bit
java version “1.6.0_29”
Java™ SE Runtime Environment (build 1.6.0_29-b11)
Java HotSpot™ 64-Bit Server VM (build 20.4-b02, mixed mode)
Apache Tomcat 7.0.26

Project:

GeoServer

Priority:

MajorMajor

Reporter:

Robin Pradel

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)