Hi,
I am using an app written in playframework 2.4. The app is a file receiver and processor that is supposed to receive the files via post requests. I sent a tar.gz file via curl and ensured that the request verb was POST and the headers contained "Content-Type:multipart/form-data"
This is what my curl request looks like
curl -k -H "token:a" -H "Content-Type:multipart/form-data" --request POST
http://localhost:9000/receivefile --data @testdata.tar.gz
I consistently get a
[error] c.v.l.ErrorHandler -
[error] c.v.l.ErrorHandler -
[error] c.v.l.ErrorHandler - Missing boundary header
This error is emitted by the configured ErrorHandler before any business logic is hit.
This is what is invoked in the ErrorHandler with an empty message
@Override
public Promise<Result> onClientError(RequestHeader request, int statusCode, String message) {
Logger.of(this.getClass()).error(message);
ObjectNode result = Json.newObject();
result.put("statusCode", statusCode);
result.put("message", message);
return Promise.<Result>pure(play.mvc.Results.badRequest(result));
}
What am I missing to allow the file to upload successfully? The file is a genuine tar.gz file that works with other applications.
Thanks
Gaurav