I have been having a problem for a while, that comes and goes. Recently it came back and won't go. :-( This is Restlet 2.1.4, Java EE edition.
Sometimes when a client posts a non-empty form with application/x-www-form-urlencoded, the form arrives empty at the @Post method. As you might be able to appreciate, this has been very difficult to debug due to the lazy evaluation techniques employed in Restlet. Unfortunately the Restlet application is large, and part of a huge servlet-based web app. I have not been able to boil this problem down to just the essentials that show the problem. Here is something similar to the server code: import org.restlet.Server; import org.restlet.data.Form; import org.restlet.data.Protocol; import org.restlet.resource.Post; import org.restlet.resource.ServerResource; public class FormProblem extends ServerResource { @Post public String testPost(Form form) { return form.toString(); } public static void main(String[] args) throws Exception { new Server(Protocol.HTTP, 8182, FormProblem.class).start(); } } As I said, this problem does not always happen. For a time it happened only on the first post and all subsequent ones were okay until the app was restarted. But now it is happening to me consistently (but again, not in that tiny sample). Has anyone seen this sort of behaviour? Can any Restlet developer suggest a strategy that will allow me to debug this? What is the earliest point in Restlet where I will be able to see the request body in a debugger? Thanks very much, Sean ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=3070111