Hello Stefan,

This is a known bug that I've just fixed. See this issue for details:

"getText() returns empty text with Tomcat"
http://restlet.tigris.org/issues/show_bug.cgi?id=843

The fix is available in the latest 2.0 snapshot.

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com


-----Message d'origine-----
De : [email protected] [mailto:[email protected]] 
Envoyé : jeudi 20 août 2009 18:43
À : [email protected]
Objet : Extracting POST parameters fails sporadically

Hello List.

I am using Restlet 2.0m4 (Java Enterprise Edition) on Tomcat 5.5.26 (Debian
Lenny), accessed through an Apache Webserver acting as the proxy.

I have a resource class that implements a POST method and expects some
parameters in the request. Most of the time, this works fine, but sometimes,
the request object returns an empty form (size 0).
I am generating requests using curl, and use the exact same command line
each time, so (unless there's bug in curl) the request should always be the
same, making Restlet the prime suspect.

Any ideas what might be happening? Or how I could narrow down the cause of
this?

Thanks & Regards
Stefan

Code snippet:

  @Post
  public Representation postInfo()
  {
    Form postForm = getRequest().getEntityAsForm();
    if (postForm.size() == 0)
    {
       //  :(
    }

    // ...
  }

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=23856
89

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2386322

Reply via email to