DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4966>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4966

request.getParameter(String) SOMETIMES fail to parse the querystring





------- Additional Comments From [EMAIL PROTECTED]  2001-12-04 13:34 -------
Ok, I ran some tests today with both IBM1.3 (Linux) and Sun1.3.1 (Linux) with the 
following code :

  protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
  {
    // get requests and features
    String templateName = request.getParameter("t");

    if (templateName == null || templateName.equals(""))
    {
      // sout parameter and QueryString
      System.out.println((new Date())+" Parameter missing in request [" + 
request.getParameter("t") + "] in [" + request.getQueryString() + "]");

      // did we get ANY params?
      Enumeration enum = request.getParameterNames();
      while(enum.hasMoreElements())
      {
        String name = (String)enum.nextElement();
        String[] sarr = request.getParameterValues(name);
        for(int i1 = 0; i1 < sarr.length; i1++)
        {
          String s = sarr[i1];
          System.out.println(" --> " + name + " = " + s);
        }
      }
    }

    response.setContentType("text/plain");
    java.io.PrintWriter out = response.getWriter();
    out.println("TomcatTestServlet");
    out.close();
  }

The testcase was called 8 times/h for 8h and failed (IBM):
Tue Dec 04 11:04:33 GMT+01:00 2001 Parameter missing in request [null] in 
[t=billerud_day&f=pngm]
Tue Dec 04 12:14:34 GMT+01:00 2001 Parameter missing in request [null] in 
[t=billerud_day&f=pngm]
Tue Dec 04 17:12:36 CET 2001 Parameter missing in request [null] in 
[t=billerud_day&f=pngm]

e.g. neither the parameter "t" or "f" have been proparly parsed. The result with 
Sun1.3 was the same (failed 4 times in 8h). Itīs really tricky to find the cause when 
itīs so hard to reproduce (all bugs of the kind "sometime fails" are)! If I have time 
iīll try to run some tests on a w2k tomorrow.

Any thoughts?

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to