Hi,
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.

Yes, I can imagine. It amazes me just what kind of hacks are sometimes necessary. :-)

Anyway, after thinking on it some more, I think the best solution would be a fix so that getParameter() in a POST request does a blocking read, the same way the headers are read. If you do getParameter() in a POST that automatically interferes with getInputStream() anyway, and expect data to arrive pretty much immediately so there is not really a good reason for not blocking in this case.

Regards,
Sebastiaan

---------------------------------------------------------------------
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