I have a bit of code that processes a multipart/form-data form. I'm
sending a test request using curl, e.g.:
curl -v -F "from=paul%40lucasmail.org" "http://localhost:8182/foo"
I have code that parses the form that starts off with:
final MediaType mediaType = request.getEntity().getMediaType();
final Form form =
MediaType.APPLICATION_WWW_FORM.equals( mediaType, true ) ||
MediaType.MULTIPART_FORM_DATA.equals( mediaType, true ) ?
request.getEntityAsForm() :
request.getResourceRef().getQueryAsForm();
The form data isn't parsed correctly: the one and only name is the
boundary string. The FormReader class doesn't seem to handle
multipart/form-data.
I'm using an older Restlet version (1.0.9), but I tried upgrading to
1.1.2 and it makes no difference.
How to I parse multipart/form-data forms correctly? (Preferably using
1.0.9.)
- Paul
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1188665