Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Submitted By: Andrey Grebnev (agrebnev)
Assigned to: Greg Wilkins (gregwilkins)
Summary: Doubled query string and incorrect getParameter
I am trying to port my application AtLeap
(https://atleap.dev.java.net) under Jetty 5.1.4
AtLeap has already worked under Tomcat, Weblogic,
Websphere and Resin. However I confronted with some
difficulties in Jetty 5.1.4
When I call the request.getQueryString() I received as
result doubled query string (each parameter presents
two times). I found at line 247 in method
void dispatch(ServletRequest servletRequest,
ServletResponse servletResponse, int type)
the following code
// merge query string
if (oldQ!=null && oldQ.length()>0)
Where you can see that query string is really doubled.
But it is only one problem, there is another problem.
/** Get value as String.
* Single valued items are converted to a String with
* Object method. Multi valued entries are converted
to a comma separated
* List. No quoting of commas within values is
* @param name The entry key.
* @return String value.
public String getString(Object name)
However in JavaDocs of
public String getParameter(String name);
we can read
* <p>If you use this method with a multivalued
* parameter, the value returned is equal to the first
* in the array returned by
In result we have that Jetty getParameter method is
inconsistent with Servlet 2.4 specification. We should
have the first value of multivalued instead comma-