Upload of any kind of file via rest API PUT /rest/resource/<path to file> leaves this file unusable.
The upload itself is successful, request returns 200 http status code, the file is saved there where it is supposed to land, but the content of the file is still wrapped in http multipart body envelope and therefore cannot be parsed.
Only one file is uploaded per request. It does not matter if it is clear text or binary file, the effect is the same. The file being uploaded is not a zip file, so no auto-extracting is involved.
Steps to reproduce:
1. create an empty json file called test.json and paste following content inside:
2. upload that file to a already existing workspace "topp" using /rest/resource rest API:
3. now go to the data_dir/workspaces/topp directory and you will find test.json with it's content wrapped, like this:
GeoServer 2.14.0 running on Ubuntu 16.04 LTS
Tested also on GeoServer 2.13.1 and 2.13.2, with same results.