Hi Randy,

Thanks for the report. The issue 236 has been created in order to answer your question.

Best regards,
Thierry

Randy Layman a écrit :
  When I send a multipart form upload to a restlet, I'm trying to verify that
I received an actual multipart upload with:
if (representation.getMediaType().equals(MediaType.MULTIPART_FORM_DATA))

  This is returning false because the multipart type's name is
multipart/form-data; boundary=...... The equals method is looking for an exact textual match on the name, so this doesn't work.

It seems to me that in HttpServerCall's getRequestEntityMethod, it should use MediaType's static valueOf method (so the description is set properly). I'm not quite sure where the boundary value should be removed -- either in the HttpServerCall.getRequestEntityMethod or MediaType.valueOf. I'm also not quite sure what else this might break -- to me it doesn't appear the the file
upload extension uses the boundary from the media type, but I don't know what
else might use extra characters in the media type's name.

  For now I'm working around this in my code, but I think it would be nice to
have this working in the framework.

  Randy

Reply via email to