Avoid double encoding URI in ServletServerHttpRequest
Issue: SPR-13876
This commit is contained in:
committed by
Rossen Stoyanchev
parent
a5f4aa6824
commit
5185953f29
@@ -20,7 +20,6 @@ import java.sql.Date;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
import org.springframework.scheduling.TaskScheduler;
|
||||
import org.springframework.web.socket.AbstractHttpRequestTests;
|
||||
import org.springframework.web.socket.WebSocketHandler;
|
||||
@@ -31,6 +30,7 @@ import org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSes
|
||||
import org.springframework.web.socket.sockjs.transport.session.PollingSockJsSession;
|
||||
import org.springframework.web.socket.sockjs.transport.session.StreamingSockJsSession;
|
||||
import org.springframework.web.socket.sockjs.transport.session.StubSockJsServiceConfig;
|
||||
import org.springframework.web.util.UriUtils;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertFalse;
|
||||
@@ -114,7 +114,8 @@ public class HttpSendingTransportHandlerTests extends AbstractHttpRequestTests
|
||||
setRequest("POST", "/");
|
||||
|
||||
if (callbackValue != null) {
|
||||
this.servletRequest.setQueryString("c=" + callbackValue);
|
||||
// need to encode the query parameter
|
||||
this.servletRequest.setQueryString("c=" + UriUtils.encodeQueryParam(callbackValue, "UTF-8"));
|
||||
this.servletRequest.addParameter("c", callbackValue);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user