BugRat Report # 112

Project: Tomcat Release: 3.1
Category: Bug Report SubCategory: New Bug Report
Class: swbug State: received
Priority: low Severity: non-critical
Confidence: public

Submitter: Robin Otte ( robin_otte@hotmail.com )
Date Submitted: Sep 13 2000, 07:08:50 CDT
Responsible: Z_Tomcat Alias ( tomcat-bugs@cortexity.com )

Synopsis:
HTTPServletRequest.getQueryString() erroneously returns null
Environment: (jvm, os, osrel, platform)
?, NT, 4.0, Windows

Additional Environment Description:

Report Description:
In org.apache.tomcat.core.RequestDispatcherImpl, in setPath(String), this.path is set to everything up to the "?", while this.queryString is set to everything after the "?". Then, in include(ServletRequest, ServletResponse), the line Request subRequest=context.getContextManager().createRequest( context, path ); passes only the path part (without the queryString) to org.apache.tomcat.core.ContextManager's createRequest(String) function, which again tries to strip off the before "?" and after "?" parts. Since the queryString has already been stripped off and is not passed to the createRequest function , the ContextManager's queryString variable is set to null, and if a call to HTTPServletRequest.getQueryString() (or any other function that uses the queryString) is made, it incorrectly returns null.

Workaround:
null

View this report online...