> -----Original Message-----
> From: Rémy Maucherat [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, May 02, 2007 11:13 PM
> On 5/2/07, Sebastiaan van Erk <[EMAIL PROTECTED]> wrote:
> > It's a race condition and the problem occurs quite infrequently
> > (especially with small request bodies). The larger the 
> request body of
> > the POST request, the more likely it is that the problem 
> occurs. I was
> > testing at a few thousand request per second, and even then 
> it rarely
> > showed up. The fact that other people out there are using 
> getParameter()
> > on Comet POST requests and expect it to work seems to me to 
> warrant 1)
> > acknowledgement that it is a bug, 2) a warning in the 
> documentation, or
> > 3) a request facade for the Comet API which throws an 
> exception when the
> > getParameter() method is called on a POST request.
> 
> Whatever ;)
> 
> Rémy
> 

I am working on a scenario with browsers as clients.
The client does requests with JavaScript code like this:

  req = new XMLHttpRequest();
  req.onreadystatechange = handler;
  req.open("post", 
"/somecontext/somecometservlet/somerequest?param1=val1&param2=val2" );
  req.send(null);

We intentionally use POST requests to avoid problems that occurred with some 
caches at customer sites and with web crawlers that monitor the GET requests of 
a browser and send the identical requests themselves to analyze the responses.
Thus, only with POST we can achieve an "exactly once" submission of the request.

However, by passing the request parameters in the URL (i.e. in the header and 
not in the body) I don't have any problems with reading the request parameters.

You can imagine, that I would not be happy if the API would only offer me a 
request facade that throws an exception when the servlet tries to access the 
parameters of a POST request.

Matthias

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to