285697 extract parameters if dispatch has query
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@638 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
c0fd7a89c9
commit
3c81bb4985
|
@ -2,6 +2,7 @@ jetty-7.0.0.RC3-SNAPSHOT
|
|||
+ 277403 remove system properties
|
||||
+ JETTY-1074 JMX thread manipulation
|
||||
+ Improved deferred authentication handling
|
||||
+ 285697 extract parameters if dispatch has query
|
||||
|
||||
jetty-7.0.0.RC2 29 June 2009
|
||||
+ 283844 Webapp / TLD errors are not clear
|
||||
|
|
|
@ -135,8 +135,8 @@ public class Dispatcher implements RequestDispatcher
|
|||
|
||||
// TODO - allow stream or writer????
|
||||
|
||||
DispatcherType old_type = baseRequest.getDispatcherType();
|
||||
Attributes old_attr=baseRequest.getAttributes();
|
||||
final DispatcherType old_type = baseRequest.getDispatcherType();
|
||||
final Attributes old_attr=baseRequest.getAttributes();
|
||||
MultiMap old_params=baseRequest.getParameters();
|
||||
try
|
||||
{
|
||||
|
@ -150,6 +150,13 @@ public class Dispatcher implements RequestDispatcher
|
|||
|
||||
if (query!=null)
|
||||
{
|
||||
// force parameter extraction
|
||||
if (old_params==null)
|
||||
{
|
||||
baseRequest.extractParameters();
|
||||
old_params=baseRequest.getParameters();
|
||||
}
|
||||
|
||||
MultiMap parameters=new MultiMap();
|
||||
UrlEncoded.decodeTo(query,parameters,request.getCharacterEncoding());
|
||||
|
||||
|
@ -165,7 +172,6 @@ public class Dispatcher implements RequestDispatcher
|
|||
for (int i=0;i<LazyList.size(values);i++)
|
||||
parameters.add(name, LazyList.get(values, i));
|
||||
}
|
||||
|
||||
}
|
||||
baseRequest.setParameters(parameters);
|
||||
}
|
||||
|
@ -205,14 +211,14 @@ public class Dispatcher implements RequestDispatcher
|
|||
base_response.fwdReset();
|
||||
request.removeAttribute(__JSP_FILE); // TODO remove when glassfish 1044 is fixed
|
||||
|
||||
String old_uri=baseRequest.getRequestURI();
|
||||
String old_context_path=baseRequest.getContextPath();
|
||||
String old_servlet_path=baseRequest.getServletPath();
|
||||
String old_path_info=baseRequest.getPathInfo();
|
||||
String old_query=baseRequest.getQueryString();
|
||||
Attributes old_attr=baseRequest.getAttributes();
|
||||
final String old_uri=baseRequest.getRequestURI();
|
||||
final String old_context_path=baseRequest.getContextPath();
|
||||
final String old_servlet_path=baseRequest.getServletPath();
|
||||
final String old_path_info=baseRequest.getPathInfo();
|
||||
final String old_query=baseRequest.getQueryString();
|
||||
final Attributes old_attr=baseRequest.getAttributes();
|
||||
final DispatcherType old_type=baseRequest.getDispatcherType();
|
||||
MultiMap old_params=baseRequest.getParameters();
|
||||
DispatcherType old_type=baseRequest.getDispatcherType();
|
||||
|
||||
try
|
||||
{
|
||||
|
@ -227,6 +233,13 @@ public class Dispatcher implements RequestDispatcher
|
|||
String query=_dQuery;
|
||||
if (query!=null)
|
||||
{
|
||||
// force parameter extraction
|
||||
if (old_params==null)
|
||||
{
|
||||
baseRequest.extractParameters();
|
||||
old_params=baseRequest.getParameters();
|
||||
}
|
||||
|
||||
// extract parameters from dispatch query
|
||||
MultiMap parameters=new MultiMap();
|
||||
UrlEncoded.decodeTo(query,parameters,request.getCharacterEncoding());
|
||||
|
|
|
@ -187,10 +187,10 @@ public class Request implements HttpServletRequest
|
|||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/*
|
||||
/**
|
||||
* Extract Paramters from query string and/or form _content.
|
||||
*/
|
||||
private void extractParameters()
|
||||
public void extractParameters()
|
||||
{
|
||||
if (_baseParameters == null)
|
||||
_baseParameters = new MultiMap(16);
|
||||
|
@ -214,7 +214,6 @@ public class Request implements HttpServletRequest
|
|||
try
|
||||
{
|
||||
_uri.decodeQueryTo(_baseParameters,_queryEncoding);
|
||||
|
||||
}
|
||||
catch (UnsupportedEncodingException e)
|
||||
{
|
||||
|
@ -224,7 +223,6 @@ public class Request implements HttpServletRequest
|
|||
Log.warn(e.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// handle any _content.
|
||||
|
|
Loading…
Reference in New Issue