Merge pull request #2825 from eclipse/jetty-9.4.x-issue-2824-request-parameters
Issue #2824 - Request.getParameters() should not reparse or recreate _parameters Map
This commit is contained in:
commit
8b7a88608a
|
@ -411,7 +411,7 @@ public class Request implements HttpServletRequest
|
||||||
_parameters=_contentParameters;
|
_parameters=_contentParameters;
|
||||||
else if (isNoParams(_contentParameters) || _contentParameters.size()==0)
|
else if (isNoParams(_contentParameters) || _contentParameters.size()==0)
|
||||||
_parameters=_queryParameters;
|
_parameters=_queryParameters;
|
||||||
else
|
else if(_parameters == null)
|
||||||
{
|
{
|
||||||
_parameters = new MultiMap<>();
|
_parameters = new MultiMap<>();
|
||||||
_parameters.addAllValues(_queryParameters);
|
_parameters.addAllValues(_queryParameters);
|
||||||
|
|
|
@ -20,6 +20,7 @@ package org.eclipse.jetty.server;
|
||||||
|
|
||||||
import static org.hamcrest.Matchers.containsString;
|
import static org.hamcrest.Matchers.containsString;
|
||||||
import static org.hamcrest.Matchers.is;
|
import static org.hamcrest.Matchers.is;
|
||||||
|
import static org.hamcrest.Matchers.not;
|
||||||
import static org.hamcrest.Matchers.startsWith;
|
import static org.hamcrest.Matchers.startsWith;
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertFalse;
|
import static org.junit.Assert.assertFalse;
|
||||||
|
@ -1252,7 +1253,7 @@ public class RequestTest
|
||||||
200, TimeUnit.MILLISECONDS
|
200, TimeUnit.MILLISECONDS
|
||||||
);
|
);
|
||||||
assertThat(response, containsString("200"));
|
assertThat(response, containsString("200"));
|
||||||
assertThat(response, Matchers.not(containsString("Connection: close")));
|
assertThat(response, not(containsString("Connection: close")));
|
||||||
assertThat(response, containsString("Hello World"));
|
assertThat(response, containsString("Hello World"));
|
||||||
|
|
||||||
response=_connector.getResponse(
|
response=_connector.getResponse(
|
||||||
|
@ -1282,7 +1283,7 @@ public class RequestTest
|
||||||
"\n"
|
"\n"
|
||||||
);
|
);
|
||||||
assertThat(response, containsString("200"));
|
assertThat(response, containsString("200"));
|
||||||
assertThat(response, Matchers.not(containsString("Connection: close")));
|
assertThat(response, not(containsString("Connection: close")));
|
||||||
assertThat(response, containsString("Hello World"));
|
assertThat(response, containsString("Hello World"));
|
||||||
|
|
||||||
response=_connector.getResponse(
|
response=_connector.getResponse(
|
||||||
|
|
Loading…
Reference in New Issue