Polish ServletServerHttpRequest query param handling
The method returning query parameters now returns only query string parameters as opposed to any Servlet request parameter. This commit also adds a ReadOnlyMultiValueMap.
This commit is contained in:
@@ -33,6 +33,16 @@ import org.springframework.web.socket.WebSocketHandler;
|
||||
public interface SockJsService {
|
||||
|
||||
|
||||
/**
|
||||
* Process a SockJS request.
|
||||
*
|
||||
* @param request the current request
|
||||
* @param response the current response
|
||||
* @param handler the handler to process messages with
|
||||
*
|
||||
* @throws IOException raised if writing the to response of the current request fails
|
||||
* @throws SockJsProcessingException
|
||||
*/
|
||||
void handleRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler handler)
|
||||
throws IOException, SockJsProcessingException;
|
||||
|
||||
|
||||
@@ -34,6 +34,7 @@ import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.http.HttpMethod;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.InvalidMediaTypeException;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.server.ServerHttpRequest;
|
||||
import org.springframework.http.server.ServerHttpResponse;
|
||||
@@ -283,8 +284,8 @@ public abstract class AbstractSockJsService implements SockJsService {
|
||||
try {
|
||||
request.getHeaders();
|
||||
}
|
||||
catch (IllegalArgumentException ex) {
|
||||
// Ignore invalid Content-Type (TODO)
|
||||
catch (InvalidMediaTypeException ex) {
|
||||
logger.warn("Invalid media type ignored: " + ex.getMediaType());
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user